Commit 7a5e1b5c authored by Sander van der Zeeuw's avatar Sander van der Zeeuw
Browse files

added fix scripts to scripts dir in shiva

parent 328be9a6
#!/usr/bin/env python
# Biopet is built on top of GATK Queue for building bioinformatic
# pipelines. It is mainly intended to support LUMC SHARK cluster which is running
# SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
# should also be able to execute Biopet tools and pipelines.
# Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
# Contact us at:
# A dual licensing mode is applied. The source code within this project that are
# not part of GATK Queue is freely available for non-commercial use under an AGPL
# license; For commercial users or users who do not want to follow the AGPL
# license, please contact us to obtain a separate license.
from __future__ import print_function
__author__="Wai Yi Leung"
import sys
if __name__ == "__main__":
Fix the mpileupformat for RNA mpileup
Solution offered by Irina Pulyakhina (LUMC-HG)
for line in sys.stdin:
l = line.strip().split("\t")
if l[3] == "0":
# no alignment to this position
print("\t".join(map(str, l)))
fix_col = l[4].replace('<', '').replace('>', '')
new_size = len(fix_col)
old_size = len(l[4])
if new_size != old_size:
l[4] = fix_col
l[3] = "{}".format(new_size)
if new_size == 0:
l[5] = ""
print("\t".join(map(str, l)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment