Further bug fixes/cleanups for PrintReadsWalker
This commit is contained in:
parent
a2d90a3590
commit
7140280bf6
|
|
@ -114,17 +114,9 @@ public class PrintReadsWalker extends ReadWalker<SAMRecord, SAMFileWriter> {
|
||||||
}
|
}
|
||||||
if (SAMPLES_SPECIFIED ) {
|
if (SAMPLES_SPECIFIED ) {
|
||||||
// user specified samples to select
|
// user specified samples to select
|
||||||
String readSample = read.getReadGroup().getSample();
|
// todo - should be case-agnostic but for simplicity and speed this is ignored.
|
||||||
boolean found = false;
|
// todo - can check at initialization intersection of requested samples and samples in BAM header to further speedup.
|
||||||
for (String sampleSelected : samplesToChoose) {
|
if (!samplesToChoose.contains(read.getReadGroup().getSample()))
|
||||||
if (readSample.equalsIgnoreCase(sampleSelected)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue