Created
April 16, 2015 14:58
-
-
Save marcelm/8406e8a48995b766051c to your computer and use it in GitHub Desktop.
hack to print out qualities in cutadapt’s info file (will crash when trimming FASTA files)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/cutadapt/scripts/cutadapt.py w/cutadapt/scripts/cutadapt.py | |
index 855721d..2eaf435 100755 | |
--- i/cutadapt/scripts/cutadapt.py | |
+++ w/cutadapt/scripts/cutadapt.py | |
@@ -155,6 +155,7 @@ class AdapterCutter(object): | |
# TODO write only one line, even for multiple matches | |
for match in matches: | |
seq = match.read.sequence | |
+ qualities = match.read.qualities | |
if match is None: | |
print(match.read.name, -1, seq, sep='\t', file=self.info_file) | |
else: | |
@@ -167,6 +168,9 @@ class AdapterCutter(object): | |
seq[match.rstart:match.rstop], | |
seq[match.rstop:], | |
match.adapter.name, | |
+ qualities[0:match.rstart], | |
+ qualities[match.rstart:match.rstop], | |
+ qualities[match.rstop:], | |
sep='\t', file=self.info_file | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment