Mercurial > repos > triasteran > ribogalaxy_umi_processing
diff UMI_riboseq_processing/UMI.py @ 1:5d0d5933d370 draft
Uploaded
author | triasteran |
---|---|
date | Sun, 19 Jun 2022 12:44:06 +0000 |
parents | ef98c6fad2a2 |
children | 6958515efa76 |
line wrap: on
line diff
--- a/UMI_riboseq_processing/UMI.py Sun Jun 19 11:29:41 2022 +0000 +++ b/UMI_riboseq_processing/UMI.py Sun Jun 19 12:44:06 2022 +0000 @@ -19,14 +19,14 @@ seq = lines[1] sep = lines[2] qual = lines[3] - trimmed_seq = seq[2:-11]+seq[-6:-1]+"\n" # fooprint + barcode - UMI = seq[0:2]+seq[-11:-6] #7nt in total + trimmed_seq = seq[2:-5]+"\n" # fooprint + barcode + UMI = seq[0:2]+seq[-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:-11]+qual[-6:-1]+"\n" + new_qual = qual[2:-5]+"\n" else: - new_qual = qual[2:-10]+qual[-6:-1] + new_qual = qual[2:-5] output.write(new_header) output.write(trimmed_seq) output.write(sep)