@@ -110,7 +110,7 @@ def checkCBUMI(filename,out,CB,UMI):
110
110
if CB == 'CR' :
111
111
subprocess .run ('samtools view %s | head -100| grep "CR:Z:" | wc -l > %s_scTEtmp/o1/testCR.txt' % (filename ,out ),shell = True )
112
112
time .sleep (2 ) #subprocess need take some time
113
- o = open ('%s_scTEtmp/o1/testCR.txt' % (out ),'rU ' )
113
+ o = open ('%s_scTEtmp/o1/testCR.txt' % (out ),'r ' )
114
114
for l in o :
115
115
l = l .strip ()
116
116
if int (l ) < 100 :
@@ -119,7 +119,7 @@ def checkCBUMI(filename,out,CB,UMI):
119
119
elif CB == 'CB' :
120
120
subprocess .run ('samtools view %s | head -100| grep "CB:Z:" | wc -l > %s_scTEtmp/o1/testCR.txt' % (filename ,out ),shell = True )
121
121
time .sleep (2 ) #subprocess need take some time
122
- o = open ('%s_scTEtmp/o1/testCR.txt' % (out ),'rU ' )
122
+ o = open ('%s_scTEtmp/o1/testCR.txt' % (out ),'r ' )
123
123
for l in o :
124
124
l = l .strip ()
125
125
if int (l ) < 100 :
@@ -129,7 +129,7 @@ def checkCBUMI(filename,out,CB,UMI):
129
129
if UMI == 'UR' :
130
130
subprocess .run ('samtools view %s | head -100| grep "UR:Z:" | wc -l > %s_scTEtmp/o1/testUMI.txt' % (filename ,out ),shell = True )
131
131
time .sleep (2 )
132
- o = open ('%s_scTEtmp/o1/testUMI.txt' % (out ),'rU ' )
132
+ o = open ('%s_scTEtmp/o1/testUMI.txt' % (out ),'r ' )
133
133
for l in o :
134
134
l = l .strip ()
135
135
if int (l ) < 100 :
@@ -138,7 +138,7 @@ def checkCBUMI(filename,out,CB,UMI):
138
138
elif UMI == 'UB' :
139
139
subprocess .run ('samtools view %s | head -100| grep "UB:Z:" | wc -l > %s_scTEtmp/o1/testUMI.txt' % (filename ,out ),shell = True )
140
140
time .sleep (2 )
141
- o = open ('%s_scTEtmp/o1/testUMI.txt' % (out ),'rU ' )
141
+ o = open ('%s_scTEtmp/o1/testUMI.txt' % (out ),'r ' )
142
142
for l in o :
143
143
l = l .strip ()
144
144
if int (l ) < 100 :
0 commit comments