Skip to content

Commit a6430ac

Browse files
Fix with BAM having GN:- tag for not genic reads
1 parent 90a098d commit a6430ac

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

SoloTE_1.02/SoloTE_pipeline.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ def processPerChrom(chromosome,inputfile,outdir,outbasename):
6060

6161

6262
outsammultnmax_value = (list(filter(lambda x:'outSAMmultNmax 1' in x,co_line.split("--"))))
63-
#print(len(outsammultnmax_value))
63+
print(len(outsammultnmax_value))
6464
if len(outsammultnmax_value)!=1:
6565
print("outSAMmultNmax 1 option missing in BAM file")
66-
# exit()
66+
exit()
6767

68-
##samtags_from_star = (list(filter(lambda x:'outSAMattributes' in x,co_line.split("--"))))
69-
##print(samtags_from_star[0])
70-
##
71-
##if "CB" in samtags_from_star[0] and "UB" in samtags_from_star[0]:
72-
## print("CB and UB tags present in BAM file")
73-
##else:
74-
## print("CB and UB tags not present in BAM file")
75-
## exit()
68+
samtags_from_star = (list(filter(lambda x:'outSAMattributes' in x,co_line.split("--"))))
69+
print(samtags_from_star[0])
70+
71+
if "CB" in samtags_from_star[0] and "UB" in samtags_from_star[0]:
72+
print("CB and UB tags present in BAM file")
73+
else:
74+
print("CB and UB tags not present in BAM file")
75+
exit()
7676

7777
cpus = sys.argv[2]
7878
outbase = sys.argv[3]
@@ -87,10 +87,6 @@ def processPerChrom(chromosome,inputfile,outdir,outbasename):
8787
workingdir = os.getcwd()
8888
#finaldir = os.getcwd()+"/"+outbase+"_SoloTE_output"
8989
finaldir = outbase+"/"+outprefix+"_SoloTE_output"
90-
print(finaldir)
91-
print(outdir)
92-
print(outbase)
93-
print(outprefix)
9490

9591
outbase = outprefix
9692

0 commit comments

Comments
 (0)