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
Blaise LI
libhts
Commits
58a71439
Commit
58a71439
authored
Sep 03, 2018
by
Blaise Li
Browse files
Factorized code (MAPQ filtering, RPK, rTRPM).
parent
fd4e0679
Changes
1
Hide whitespace changes
Inline
Side-by-side
libhts/libhts.py
View file @
58a71439
...
...
@@ -268,6 +268,25 @@ def make_seeding_function(seeding_string):
return
seeding_function
def
aligner2min_mapq
(
aligner
,
wildcards
):
"""
Option to filter on MAPQ value in featureCounts.
What minimal MAPQ value should a read have to be considered uniquely mapped?
See <https://sequencing.qcfail.com/articles/mapq-values-are-really-useful-but-their-implementation-is-a-mess/>.
"""
mapped_type
=
wildcards
.
mapped_type
if
mapped_type
.
startswith
(
"unique_"
):
if
aligner
==
"hisat2"
:
return
"-Q 60"
elif
aligner
==
"bowtie2"
:
return
"-Q 23"
else
:
raise
NotImplementedError
(
f
"
{
aligner
}
not handled (yet?)"
)
else
:
return
""
## Not sure this is a good idea...
# def masked_gmean(a, axis=0, dtype=None):
# """Modified from stats.py."""
...
...
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