quick changes for G
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3500 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
907931c902
commit
4d1a6b3d99
|
|
@ -40,6 +40,7 @@ import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.RMD;
|
import org.broadinstitute.sting.gatk.walkers.RMD;
|
||||||
import org.broadinstitute.sting.gatk.walkers.Requires;
|
import org.broadinstitute.sting.gatk.walkers.Requires;
|
||||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||||
|
import org.broadinstitute.sting.utils.MathUtils;
|
||||||
import org.broadinstitute.sting.utils.genotype.vcf.VCFReader;
|
import org.broadinstitute.sting.utils.genotype.vcf.VCFReader;
|
||||||
|
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
|
|
@ -79,16 +80,12 @@ public class ProduceBeagleInputWalker extends RodWalker<Integer, Integer> {
|
||||||
public Integer map( RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context ) {
|
public Integer map( RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context ) {
|
||||||
|
|
||||||
if( tracker != null ) {
|
if( tracker != null ) {
|
||||||
EnumSet<VariantContext.Type> vc = EnumSet.of(VariantContext.Type.SNP);
|
|
||||||
GenomeLoc loc = context.getLocation();
|
GenomeLoc loc = context.getLocation();
|
||||||
VariantContext vc_eval;
|
VariantContext vc_eval;
|
||||||
|
|
||||||
|
vc_eval = tracker.getVariantContext(ref,"vcf", null, loc, false);
|
||||||
try {
|
if ( vc_eval == null || vc_eval.isFiltered() )
|
||||||
vc_eval = tracker.getVariantContext(ref,"vcf", vc, loc, true);
|
|
||||||
} catch (java.util.NoSuchElementException e) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
// output marker ID to Beagle input file
|
// output marker ID to Beagle input file
|
||||||
beagleWriter.print(String.format("%s ",vc_eval.getLocation().toString()));
|
beagleWriter.print(String.format("%s ",vc_eval.getLocation().toString()));
|
||||||
|
|
@ -105,7 +102,7 @@ public class ProduceBeagleInputWalker extends RodWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !vc_eval.hasGenotypes() )
|
if ( !vc_eval.hasGenotypes() )
|
||||||
return null;
|
return 0;
|
||||||
|
|
||||||
Map<String, Genotype> genotypes = vc_eval.getGenotypes();
|
Map<String, Genotype> genotypes = vc_eval.getGenotypes();
|
||||||
for ( String sample : samples ) {
|
for ( String sample : samples ) {
|
||||||
|
|
@ -123,7 +120,7 @@ public class ProduceBeagleInputWalker extends RodWalker<Integer, Integer> {
|
||||||
Double dg = Double.valueOf(gl);
|
Double dg = Double.valueOf(gl);
|
||||||
if (dg> maxLikelihood)
|
if (dg> maxLikelihood)
|
||||||
maxLikelihood = dg;
|
maxLikelihood = dg;
|
||||||
|
|
||||||
likeArray.add(dg);
|
likeArray.add(dg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue