a fix for a situation where a chromosome on the reference file contains no reads, and doesn't align to the bam file. This came up using reference 18, which has chomosomes like chr1_random that aren't in all BAM files.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@649 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ee02b61068
commit
8d43ec3d7e
|
|
@ -285,11 +285,13 @@ public class SAMDataSource implements SimpleDataSource {
|
|||
iter.queryContained(lastReadPos.getContig(), (int) lastReadPos.getStop(), -1);
|
||||
|
||||
// move the number of reads we read from the last pos
|
||||
boolean atLeastOneReadSeen = false; // we have a problem where some chomesomes don't have a single read (i.e. the chrN_random chrom.)
|
||||
while (iter.hasNext() && this.readsAtLastPos > 0) {
|
||||
iter.next();
|
||||
--readsAtLastPos;
|
||||
atLeastOneReadSeen = true;
|
||||
}
|
||||
if (readsAtLastPos != 0) {
|
||||
if (readsAtLastPos != 0 && atLeastOneReadSeen) {
|
||||
throw new SimpleDataSourceLoadException("Seek problem: reads at last position count != 0");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue