useful convenience function to get a genotype associated with a particular sample

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2510 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2010-01-06 14:53:56 +00:00
parent ec774f62be
commit bca3d1b943
1 changed files with 10 additions and 0 deletions

View File

@ -417,6 +417,16 @@ public class VCFRecord implements Variation, VariantBackedByGenotype {
return names;
}
public VCFGenotypeRecord getGenotype(final String sampleName) {
for ( VCFGenotypeRecord rec : getVCFGenotypeRecords() ) {
if ( rec.getSampleName().equals(sampleName) ) {
return rec;
}
}
return null;
}
public String getGenotypeFormatString() {
return mGenotypeFormatString;
}// the formatting string for our genotype records