Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
miniannotator
Commits
d0cbe4a4
Commit
d0cbe4a4
authored
Sep 19, 2018
by
Christophe Klopp
Browse files
turned all deletion longer than 9 bases in introns and filtered bam with -q 2
parent
0f83d035
Changes
1
Hide whitespace changes
Inline
Side-by-side
miniannotator.py
View file @
d0cbe4a4
...
...
@@ -48,7 +48,7 @@ class Miniannotator:
minimap
=
[
self
.
conf
[
"minimap2"
],
"-ax"
,
"splice"
,
"-t"
,
str
(
self
.
conf
[
"threads"
]),
self
.
reference
,
self
.
assembly
]
samtools_sort
=
[
self
.
conf
[
"samtools"
],
"sort"
]
samtools_bam
=
[
self
.
conf
[
"samtools"
],
"view"
,
"-b"
,
"-o"
,
map_file
]
samtools_bam
=
[
self
.
conf
[
"samtools"
],
"view"
,
"-b"
,
"-q"
,
"2"
,
"-o"
,
map_file
]
p1
=
subprocess
.
Popen
(
minimap
,
stdout
=
subprocess
.
PIPE
)
p2
=
subprocess
.
Popen
(
samtools_sort
,
stdin
=
p1
.
stdout
,
stdout
=
subprocess
.
PIPE
)
p1
.
stdout
.
close
()
...
...
@@ -128,8 +128,15 @@ class Miniannotator:
"exon"
:
exon_nb
})
qstart
+=
length
elif
operation
==
2
:
# DELETION
indels
.
append
({
"type"
:
"del"
,
"start"
:
exon_end
+
1
,
"end"
:
exon_end
+
length
,
"exon"
:
exon_nb
})
# 1-based coords
exon_end
+=
length
if
length
<
10
indels
.
append
({
"type"
:
"del"
,
"start"
:
exon_end
+
1
,
"end"
:
exon_end
+
length
,
"exon"
:
exon_nb
})
# 1-based coords
exon_end
+=
length
else
exons
.
append
({
"start"
:
exon_start
+
1
,
"end"
:
exon_end
,
"nb"
:
exon_nb
})
# 1-based coords
complete
=
True
exon_nb
+=
1
exon_start
=
exon_end
+
length
exon_end
=
exon_start
elif
operation
==
3
:
# SPLIT
exons
.
append
({
"start"
:
exon_start
+
1
,
"end"
:
exon_end
,
"nb"
:
exon_nb
})
# 1-based coords
complete
=
True
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment