Another check to deal with bad reads (BWA output throws bad exceptions)
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@298 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
3f75fc4e83
commit
d1c5e986d5
|
|
@ -130,7 +130,10 @@ public class GenomeLoc implements Comparable<GenomeLoc> {
|
|||
}
|
||||
|
||||
public static GenomeLoc genomicLocationOf(final SAMRecord read) {
|
||||
return new GenomeLoc(read.getReferenceName(), read.getAlignmentStart(), read.getAlignmentEnd());
|
||||
String contig = read.getReferenceName();
|
||||
if (read.getReadUnmappedFlag())
|
||||
contig = null;
|
||||
return new GenomeLoc(contig, read.getAlignmentStart(), read.getAlignmentEnd());
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue