Bug fix: single unmapped read now keeps mapping qual 0 after remapping, not 37!
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1557 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
df11618092
commit
0721c450c2
|
|
@ -128,12 +128,12 @@ public class RemapAlignments extends CommandLineProgram {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( AlignmentUtils.isReadUnmapped(read) ) totalUnmappedReads++;
|
if ( AlignmentUtils.isReadUnmapped(read) ) totalUnmappedReads++;
|
||||||
else {
|
|
||||||
// destroy mate pair mapping information, if any (we will need to reconstitute pairs after remapping both ends):
|
// destroy mate pair mapping information, if any (we will need to reconstitute pairs after remapping both ends):
|
||||||
read.setMateReferenceIndex(SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX);
|
read.setMateReferenceIndex(SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX);
|
||||||
read.setMateAlignmentStart(SAMRecord.NO_ALIGNMENT_START);
|
read.setMateAlignmentStart(SAMRecord.NO_ALIGNMENT_START);
|
||||||
// if ( read.getReadPairedFlag() ) System.out.println("PAIRED READ!!");
|
// if ( read.getReadPairedFlag() ) System.out.println("PAIRED READ!!");
|
||||||
}
|
|
||||||
totalRecords++;
|
totalRecords++;
|
||||||
|
|
||||||
if ( totalRecords % 1000000 == 0 ) System.out.println(totalRecords + " valid records processed");
|
if ( totalRecords % 1000000 == 0 ) System.out.println(totalRecords + " valid records processed");
|
||||||
|
|
@ -203,9 +203,13 @@ public class RemapAlignments extends CommandLineProgram {
|
||||||
|
|
||||||
// technically, if edit distance of the read is equal to max_diff used in alignments,
|
// technically, if edit distance of the read is equal to max_diff used in alignments,
|
||||||
// we should have set 25...
|
// we should have set 25...
|
||||||
r.setMappingQuality(37);
|
if ( AlignmentUtils.isReadUnmapped(r) ) {
|
||||||
r.setAttribute("X0", new Integer(1));
|
r.setMappingQuality(0);
|
||||||
r.setAttribute("X1", new Integer(0));
|
} else {
|
||||||
|
r.setMappingQuality(37);
|
||||||
|
r.setAttribute("X0", new Integer(1));
|
||||||
|
r.setAttribute("X1", new Integer(0));
|
||||||
|
}
|
||||||
r.setNotPrimaryAlignmentFlag(false);
|
r.setNotPrimaryAlignmentFlag(false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue