Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
7a5e1b5c
Commit
7a5e1b5c
authored
Jan 18, 2016
by
Sander van der Zeeuw
Browse files
added fix mpileup.py scripts to scripts dir in shiva
parent
328be9a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/scripts/fix_mpileup.py
0 → 100644
View file @
7a5e1b5c
#!/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: sasc@lumc.nl
#
# 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)
http://www.biostars.org/p/78542/
"""
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
)))
continue
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
)))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment