add parallel option to target creator for masking out reads with bad mates
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3663 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
6a23edd911
commit
4a451949ba
|
|
@ -67,6 +67,9 @@ public class RealignerTargetCreator extends RodWalker<RealignerTargetCreator.Eve
|
|||
@Argument(fullName="maxIntervalSize", shortName="maxInterval", doc="maximum interval size", required=false)
|
||||
protected int maxIntervalSize = 500;
|
||||
|
||||
@Argument(fullName="realignReadsWithBadMates", required=false, doc="Should we try to realign paired-end reads whose mates map to other chromosomes?")
|
||||
protected boolean REALIGN_BADLY_MATED_READS = false;
|
||||
|
||||
@Override
|
||||
public boolean generateExtendedEvents() { return true; }
|
||||
|
||||
|
|
@ -129,8 +132,11 @@ public class RealignerTargetCreator extends RodWalker<RealignerTargetCreator.Eve
|
|||
int mismatchQualities = 0, totalQualities = 0;
|
||||
byte refBase = ref.getBase();
|
||||
for (PileupElement p : pileup ) {
|
||||
// check the ends of the reads to see how far they extend
|
||||
SAMRecord read = p.getRead();
|
||||
if ( !REALIGN_BADLY_MATED_READS && read.getReadPairedFlag() && !read.getMateUnmappedFlag() && read.getMateReferenceIndex() != read.getReferenceIndex() )
|
||||
continue;
|
||||
|
||||
// check the ends of the reads to see how far they extend
|
||||
furthestStopPos = Math.max(furthestStopPos, read.getAlignmentEnd());
|
||||
|
||||
// is it a deletion? (sanity check in case extended event missed it)
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ public class RealignerTargetCreatorIntegrationTest extends WalkerTest {
|
|||
public void testIntervals() {
|
||||
|
||||
WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec(
|
||||
"-T RealignerTargetCreator -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000 -o %s",
|
||||
"-T RealignerTargetCreator -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000 -o %s --realignReadsWithBadMates",
|
||||
1,
|
||||
Arrays.asList("d21e83a8b0d3f63acd9ca3b0b636e515"));
|
||||
executeTest("test standard", spec1);
|
||||
|
||||
WalkerTest.WalkerTestSpec spec2 = new WalkerTest.WalkerTestSpec(
|
||||
"-T RealignerTargetCreator -D /humgen/gsa-hpprojects/GATK/data/dbsnp_129_b36.rod -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000 -o %s",
|
||||
"-T RealignerTargetCreator -D /humgen/gsa-hpprojects/GATK/data/dbsnp_129_b36.rod -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000 -o %s --realignReadsWithBadMates",
|
||||
1,
|
||||
Arrays.asList("bfccfa50f62d10ee2fe8cfa68fb70002"));
|
||||
executeTest("test dbsnp", spec2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue