Removing obsolete rod; no longer needed given previous addition to SampleUtils.
JIRA GSA-318 git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3572 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
c671864228
commit
b75ded61b8
|
|
@ -28,7 +28,6 @@ import org.broadinstitute.sting.gatk.refdata.*;
|
|||
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
|
||||
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackCreationException;
|
||||
import org.broadinstitute.sting.gatk.refdata.tracks.RODRMDTrack;
|
||||
import org.broadinstitute.sting.oneoffprojects.refdata.HapmapVCFROD;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -61,7 +60,6 @@ public class RODTrackBuilder implements RMDTrackBuilder {
|
|||
Types.put("Intervals", IntervalRod.class);
|
||||
Types.put("GLF", RodGLF.class);
|
||||
Types.put("PicardDbSNP", rodPicardDbSNP.class);
|
||||
Types.put("HapmapVCF", HapmapVCFROD.class);
|
||||
Types.put("Beagle", BeagleROD.class);
|
||||
Types.put("Plink", PlinkRod.class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
package org.broadinstitute.sting.oneoffprojects.refdata;
|
||||
|
||||
import org.broad.tribble.vcf.VCFHeader;
|
||||
import org.broad.tribble.vcf.VCFRecord;
|
||||
import org.broadinstitute.sting.gatk.refdata.BasicReferenceOrderedDatum;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.broadinstitute.sting.utils.StingException;
|
||||
import org.broadinstitute.sting.utils.genotype.DiploidGenotype;
|
||||
import org.broadinstitute.sting.utils.genotype.vcf.VCFReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: chartl
|
||||
* Date: Jan 29, 2010
|
||||
*/
|
||||
public class HapmapVCFROD extends BasicReferenceOrderedDatum implements Iterator<HapmapVCFROD> {
|
||||
// This is a (hopefully temporary) wrapper class for certain VCF files that we want to protect from
|
||||
// utilities that grab genotypes or sample names across all VCF files
|
||||
|
||||
private VCFRecord record;
|
||||
private VCFReader reader;
|
||||
|
||||
public VCFReader getReader() {
|
||||
return reader;
|
||||
}
|
||||
|
||||
public VCFRecord getRecord() {
|
||||
return record;
|
||||
}
|
||||
|
||||
public HapmapVCFROD(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public HapmapVCFROD(String name, VCFRecord currentRecord, VCFReader reader) {
|
||||
super(name);
|
||||
this.record = currentRecord;
|
||||
this.reader = reader;
|
||||
}
|
||||
|
||||
public Object initialize(final File source) throws FileNotFoundException {
|
||||
reader = new VCFReader(source);
|
||||
if (reader.hasNext()) record = reader.next();
|
||||
return reader.getHeader();
|
||||
}
|
||||
|
||||
public boolean parseLine(Object obj, String[] args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public double getNegLog10PError() {
|
||||
return record.getNegLog10PError();
|
||||
}
|
||||
public String getReference() {
|
||||
return record.getReference();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return record.toString();
|
||||
}
|
||||
|
||||
public List<String> getAlternateAlleleList() {
|
||||
return record.getAlternateAlleleList();
|
||||
}
|
||||
|
||||
public boolean isDeletion() {
|
||||
return record.isDeletion();
|
||||
}
|
||||
|
||||
public GenomeLoc getLocation() {
|
||||
return GenomeLocParser.createGenomeLoc(record.getChr(),record.getStart());
|
||||
}
|
||||
|
||||
public boolean isBiallelic() {
|
||||
return record.isBiallelic();
|
||||
}
|
||||
|
||||
public boolean isIndel() {
|
||||
return record.isIndel();
|
||||
}
|
||||
|
||||
public boolean isSNP() {
|
||||
return record.isSNP();
|
||||
}
|
||||
|
||||
public boolean isReference() {
|
||||
return record.isReference();
|
||||
}
|
||||
|
||||
public double getNonRefAlleleFrequency() {
|
||||
return record.getNonRefAlleleFrequency();
|
||||
}
|
||||
|
||||
public char getAlternativeBaseForSNP() {
|
||||
return record.getAlternativeBaseForSNP();
|
||||
}
|
||||
|
||||
public boolean isInsertion() {
|
||||
return record.isInsertion();
|
||||
}
|
||||
|
||||
public List<String> getAlleleList() {
|
||||
return record.getAlleleList();
|
||||
}
|
||||
|
||||
public char getReferenceForSNP() {
|
||||
return record.getReferenceForSNP();
|
||||
}
|
||||
|
||||
public boolean hasGenotype(DiploidGenotype g) {
|
||||
return false;
|
||||
//return rod.hasGenotype(g);
|
||||
}
|
||||
|
||||
public VCFHeader getHeader() {
|
||||
return record.getHeader();
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return reader.hasNext();
|
||||
}
|
||||
|
||||
public HapmapVCFROD next() {
|
||||
return new HapmapVCFROD(name, record, reader);
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException("Unable to remove");
|
||||
}
|
||||
|
||||
public static HapmapVCFROD createIterator(String name, File file) {
|
||||
HapmapVCFROD vcf = new HapmapVCFROD(name);
|
||||
try {
|
||||
vcf.initialize(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new StingException("Unable to load file",e);
|
||||
}
|
||||
return vcf;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package org.broadinstitute.sting.oneoffprojects.walkers.annotator;
|
||||
|
||||
import org.broad.tribble.vcf.VCFInfoHeaderLine;
|
||||
import org.broad.tribble.vcf.VCFRecord;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.gatk.contexts.StratifiedAlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
|
||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||
import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
|
||||
import org.broadinstitute.sting.oneoffprojects.refdata.HapmapVCFROD;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
@ -34,17 +34,17 @@ public class ThousandGenomesAnnotator implements InfoFieldAnnotation {
|
|||
if ( tracker == null )
|
||||
return null;
|
||||
|
||||
HapmapVCFROD pilot1 = tracker.lookup("pilot1",HapmapVCFROD.class);
|
||||
HapmapVCFROD pilot2 = tracker.lookup("pilot2",HapmapVCFROD.class);
|
||||
VCFRecord pilot1 = tracker.lookup("pilot1", VCFRecord.class);
|
||||
VCFRecord pilot2 = tracker.lookup("pilot2", VCFRecord.class);
|
||||
|
||||
String result;
|
||||
|
||||
if ( pilot1 == null && pilot2 == null) {
|
||||
result = "0";
|
||||
} else {
|
||||
if ( pilot1 != null && ! pilot1.getRecord().isFiltered() ) {
|
||||
if ( pilot1 != null && ! pilot1.isFiltered() ) {
|
||||
result = "1";
|
||||
} else if ( pilot2 != null && !pilot2.getRecord().isFiltered() ) {
|
||||
} else if ( pilot2 != null && !pilot2.isFiltered() ) {
|
||||
result = "1";
|
||||
} else {
|
||||
result = "0";
|
||||
|
|
|
|||
Loading…
Reference in New Issue