changeset 3:d27375bc4a1c draft

Uploaded
author triasteran
date Mon, 20 Jun 2022 08:02:35 +0000
parents 6958515efa76
children a580e700aac3
files UMI_riboseq_processing/UMI.py UMI_riboseq_processing/UMI_riboseq.xml
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/UMI_riboseq_processing/UMI.py	Mon Jun 20 07:27:23 2022 +0000
+++ b/UMI_riboseq_processing/UMI.py	Mon Jun 20 08:02:35 2022 +0000
@@ -19,14 +19,14 @@
             seq = lines[1]
             sep = lines[2]
             qual = lines[3]
-            trimmed_seq = seq[2:-5]+"\n" # fooprint + barcode
-            UMI = seq[0:2]+seq[-5:].strip('\n') #7nt in total; 5'NN and last 3'NNNNN  
+            trimmed_seq = seq[2:-6]+"\n" # fooprint + barcode
+            UMI = seq[0:2]+seq.rstrip()[-5:] #7nt in total; 5'NN and last 3'NNNNN  
             split_header = header.split(" ")
             new_header = split_header[0]+"_"+UMI+" "+split_header[1]
             if qual[-1:] == "\n":
-                new_qual = qual[2:-5]+"\n"
+                new_qual = qual[2:-6]+"\n"
             else:
-                new_qual = qual[2:-5]
+                new_qual = qual[2:-6]
             output.write(new_header)
             output.write(trimmed_seq) 
             output.write(sep) 
--- a/UMI_riboseq_processing/UMI_riboseq.xml	Mon Jun 20 07:27:23 2022 +0000
+++ b/UMI_riboseq_processing/UMI_riboseq.xml	Mon Jun 20 08:02:35 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="UMI_riboseq" name="move UMIs from reads to header" version="0.1.2">
+<tool id="UMI_riboseq" name="move UMIs from reads to header" version="0.1.3">
 <requirements>
 </requirements>
 <command detect_errors="exit_code">