File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/main/groovy/com/milaboratory/migec Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ while ((header1 = reader1.readLine()) != null) {
192192 seq2 = reader2. readLine()
193193 reader2. readLine()
194194 reader2. readLine()
195+
196+ if (header2 == null ){
197+ println " [ERROR] R1 file has more reads than R2"
198+ System . exit(1 )
199+ }
195200 }
196201
197202 if (seq1. length() >= MIN_READ_SZ && (! paired || seq2. length() >= MIN_READ_SZ )) {
@@ -210,6 +215,16 @@ while ((header1 = reader1.readLine()) != null) {
210215 " unique UMIs so far ${ migData[0].size()} "
211216 }
212217}
218+
219+ if (paired) {
220+ header2 = reader2. readLine()
221+
222+ if (header2 != null ){
223+ println " [ERROR] R2 file has more reads than R1"
224+ System . exit(1 )
225+ }
226+ }
227+
213228println " [${ new Date()} $scriptName ] Processed $nReads reads, " +
214229 " unique UMIs ${ migData[0].size()} "
215230
You can’t perform that action at this time.
0 commit comments