BatchMerge - AlleleVCF --> AllelesVCF, this (combined with Eric's fix) will solve James P.'s forum issue.
After viewing results on real case/control data from RAW -- it's really working quite well. ReadIndels, however, needs to use a T-test rather than a U-test, especially in deep coverage (at indel sites, the reads with indels will have mostly the same number of CIGAR indel elements -- one -- which doesn't really play nicely with the UTest when sample sets are large). Modified ReadsLargeInsertSize to be a two-way test (e.g. ReadsLarge and ReadsSmall). BaseQualityScore also suffers from the same issue as read indels, so switching over to a T-test in that case as well. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5653 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
1c32deb108
commit
e5ef8388fc
|
|
@ -56,6 +56,7 @@ public class RAWSampleStats extends LocusWalker<MapHolder,RegionalAssociationHan
|
||||||
if ( ! first ) {
|
if ( ! first ) {
|
||||||
contextBuf.append(";");
|
contextBuf.append(";");
|
||||||
} else {
|
} else {
|
||||||
|
contextBuf.append("\t");
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
contextBuf.append(entry.getKey().getId());
|
contextBuf.append(entry.getKey().getId());
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,5 @@ public class BaseQualityScore extends ValueTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean usePreviouslySeenReads() { return true; }
|
public boolean usePreviouslySeenReads() { return true; }
|
||||||
|
public boolean useTStatistic() { return true; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ public class MismatchRate extends ValueTest {
|
||||||
Object stats = sampleStats.get(sample.getId());
|
Object stats = sampleStats.get(sample.getId());
|
||||||
double mn;
|
double mn;
|
||||||
double std;
|
double std;
|
||||||
|
double mmr = calcMMR(pileup);
|
||||||
if ( stats instanceof Pair ) {
|
if ( stats instanceof Pair ) {
|
||||||
mn = ((Pair<Double,Double>)stats).first;
|
mn = ((Pair<Double,Double>)stats).first;
|
||||||
std = ((Pair<Double,Double>)stats).second;
|
std = ((Pair<Double,Double>)stats).second;
|
||||||
|
|
@ -62,10 +63,10 @@ public class MismatchRate extends ValueTest {
|
||||||
if ( std <= 0.0 ) {
|
if ( std <= 0.0 ) {
|
||||||
std = 1.0;
|
std = 1.0;
|
||||||
}
|
}
|
||||||
ra.add(pileup.size());
|
ra.add(mmr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Arrays.asList((Number) ((calcMMR(pileup) - mn) / std));
|
return Arrays.asList((Number) ((mmr - mn) / std));
|
||||||
}
|
}
|
||||||
|
|
||||||
public double calcMMR(ReadBackedPileup rbp) {
|
public double calcMMR(ReadBackedPileup rbp) {
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,5 @@ public class ReadIndels extends ValueTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean usePreviouslySeenReads() { return false; }
|
public boolean usePreviouslySeenReads() { return false; }
|
||||||
|
public boolean useTStatistic() { return true; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,10 @@ import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
|
||||||
* Time: 3:31 PM
|
* Time: 3:31 PM
|
||||||
* To change this template use File | Settings | File Templates.
|
* To change this template use File | Settings | File Templates.
|
||||||
*/
|
*/
|
||||||
public class ReadsLargeInsertSize extends ProportionTest {
|
public class ReadsAberrantInsertSize extends ProportionTest {
|
||||||
|
|
||||||
private int THRESHOLD;
|
private int HI_THRESHOLD;
|
||||||
|
private int LO_THRESHOLD;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pair<Number,Number> map(ReadBackedPileup rbp) {
|
public Pair<Number,Number> map(ReadBackedPileup rbp) {
|
||||||
|
|
@ -24,7 +25,7 @@ public class ReadsLargeInsertSize extends ProportionTest {
|
||||||
for (PileupElement e : rbp ) {
|
for (PileupElement e : rbp ) {
|
||||||
if ( e.getRead().getReadPairedFlag() ) {
|
if ( e.getRead().getReadPairedFlag() ) {
|
||||||
++total;
|
++total;
|
||||||
if ( e.getRead().getInferredInsertSize() > THRESHOLD ) {
|
if ( e.getRead().getInferredInsertSize() > HI_THRESHOLD || e.getRead().getInferredInsertSize() < LO_THRESHOLD ) {
|
||||||
++wonky;
|
++wonky;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +36,8 @@ public class ReadsLargeInsertSize extends ProportionTest {
|
||||||
|
|
||||||
public void init(RegionalAssociationWalker parent) {
|
public void init(RegionalAssociationWalker parent) {
|
||||||
super.init(parent);
|
super.init(parent);
|
||||||
THRESHOLD = 150;
|
HI_THRESHOLD = 200;
|
||||||
|
LO_THRESHOLD = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean usePreviouslySeenReads() { return false; }
|
public boolean usePreviouslySeenReads() { return false; }
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package org.broadinstitute.sting.oneoffprojects.walkers.association.modules.casecontrol;
|
||||||
|
|
||||||
|
import net.sf.samtools.CigarOperator;
|
||||||
|
import org.broadinstitute.sting.utils.collections.Pair;
|
||||||
|
import org.broadinstitute.sting.utils.pileup.PileupElement;
|
||||||
|
import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by IntelliJ IDEA.
|
||||||
|
* User: chartl
|
||||||
|
* Date: 4/15/11
|
||||||
|
* Time: 12:54 PM
|
||||||
|
* To change this template use File | Settings | File Templates.
|
||||||
|
*/
|
||||||
|
public class ReadsWithIndels extends ProportionTest {
|
||||||
|
|
||||||
|
public Pair<Number,Number> map(ReadBackedPileup pileup) {
|
||||||
|
int numReads = 0;
|
||||||
|
int numWithIndels = 0;
|
||||||
|
for ( PileupElement e : pileup ) {
|
||||||
|
++numReads;
|
||||||
|
if ( e.getRead().getCigar().getCigarElements().contains(CigarOperator.DELETION) || e.getRead().getCigar().getCigarElements().contains(CigarOperator.INSERTION)) {
|
||||||
|
++numWithIndels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Pair<Number,Number>(numWithIndels,numReads);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean usePreviouslySeenReads() { return false; }
|
||||||
|
}
|
||||||
|
|
@ -53,7 +53,7 @@ class batchMergePipeline extends QScript {
|
||||||
this.baq = BAQ.CalculationMode.CALCULATE_AS_NECESSARY
|
this.baq = BAQ.CalculationMode.CALCULATE_AS_NECESSARY
|
||||||
}
|
}
|
||||||
this.intervals :+= extractIntervals.listOut
|
this.intervals :+= extractIntervals.listOut
|
||||||
this.alleleVCF = combineVCFs.outVCF
|
this.allelesVCF = combineVCFs.outVCF
|
||||||
this.jarFile = new File(stingDir+"/dist/GenomeAnalysisTK.jar")
|
this.jarFile = new File(stingDir+"/dist/GenomeAnalysisTK.jar")
|
||||||
this.memoryLimit = 4
|
this.memoryLimit = 4
|
||||||
this.scatterCount = 60
|
this.scatterCount = 60
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue