Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
7a5e1b5c
Commit
7a5e1b5c
authored
9 years ago
by
Sander van der Zeeuw
Browse files
Options
Downloads
Patches
Plain Diff
added fix mpileup.py scripts to scripts dir in shiva
parent
328be9a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/scripts/fix_mpileup.py
+49
-0
49 additions, 0 deletions
...l/lumc/sasc/biopet/pipelines/shiva/scripts/fix_mpileup.py
with
49 additions
and
0 deletions
public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/scripts/fix_mpileup.py
0 → 100644
+
49
−
0
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
)))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment