Added convenience methods in RodVCF to pull out all of the VCF data from the VCFRecord (e.g. getID(), getSamples(), getInfoValues())
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2374 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
bb312814a2
commit
e051311e8c
|
|
@ -13,6 +13,7 @@ import java.io.IOException;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -104,6 +105,11 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod,
|
|||
return mCurrentRecord.getType();
|
||||
}
|
||||
|
||||
public String getID() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getID();
|
||||
}
|
||||
|
||||
/**
|
||||
* are we a SNP? If not we're a Indel/deletion
|
||||
*
|
||||
|
|
@ -166,6 +172,16 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod,
|
|||
return mCurrentRecord.getNegLog10PError();
|
||||
}
|
||||
|
||||
public double getQual() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getQual();
|
||||
}
|
||||
|
||||
public boolean hasAlternateAllele() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.hasAlternateAllele();
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the alternate alleles. This method should return all the alleles present at the location,
|
||||
* NOT including the reference base. This is returned as a string list with no guarantee ordering
|
||||
|
|
@ -232,6 +248,11 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod,
|
|||
return mCurrentRecord.getReferenceForSNP();
|
||||
}
|
||||
|
||||
public boolean hasGenotypeData() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.hasGenotypeData();
|
||||
}
|
||||
|
||||
/**
|
||||
* get the genotype
|
||||
*
|
||||
|
|
@ -275,6 +296,36 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod,
|
|||
return mCurrentRecord.hasGenotype(x);
|
||||
}
|
||||
|
||||
public String[] getSampleNames() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getSampleNames();
|
||||
}
|
||||
|
||||
public Map<String, String> getInfoValues() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getInfoValues();
|
||||
}
|
||||
|
||||
public String[] getFilteringCodes() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getFilteringCodes();
|
||||
}
|
||||
|
||||
public boolean isFiltered() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.isFiltered();
|
||||
}
|
||||
|
||||
public boolean hasFilteringCodes() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.hasFilteringCodes();
|
||||
}
|
||||
|
||||
public String getFilterString() {
|
||||
assertNotNull();
|
||||
return mCurrentRecord.getFilterString();
|
||||
}
|
||||
|
||||
public VCFHeader getHeader() {
|
||||
return mReader.getHeader();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue