Optimization: create allele list just once, not for each genotype
This commit is contained in:
parent
0a7137616c
commit
1e07e97b58
|
|
@ -43,15 +43,15 @@ public abstract class RankSumTest extends InfoFieldAnnotation implements Standar
|
||||||
final ArrayList<Double> altQuals = new ArrayList<Double>();
|
final ArrayList<Double> altQuals = new ArrayList<Double>();
|
||||||
|
|
||||||
if ( vc.isSNP() ) {
|
if ( vc.isSNP() ) {
|
||||||
|
final List<Byte> altAlleles = new ArrayList<Byte>();
|
||||||
|
for ( final Allele a : vc.getAlternateAlleles() )
|
||||||
|
altAlleles.add(a.getBases()[0]);
|
||||||
|
|
||||||
for ( final Genotype genotype : genotypes.iterateInSampleNameOrder() ) {
|
for ( final Genotype genotype : genotypes.iterateInSampleNameOrder() ) {
|
||||||
final AlignmentContext context = stratifiedContexts.get(genotype.getSampleName());
|
final AlignmentContext context = stratifiedContexts.get(genotype.getSampleName());
|
||||||
if ( context == null )
|
if ( context == null )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
final List<Byte> altAlleles = new ArrayList<Byte>();
|
|
||||||
for ( final Allele a : vc.getAlternateAlleles() )
|
|
||||||
altAlleles.add(a.getBases()[0]);
|
|
||||||
|
|
||||||
fillQualsFromPileup(ref.getBase(), altAlleles, context.getBasePileup(), refQuals, altQuals);
|
fillQualsFromPileup(ref.getBase(), altAlleles, context.getBasePileup(), refQuals, altQuals);
|
||||||
}
|
}
|
||||||
} else if ( vc.isIndel() || vc.isMixed() ) {
|
} else if ( vc.isIndel() || vc.isMixed() ) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue