From f8571593431d0ffa607b3e3bb3510f810d714542 Mon Sep 17 00:00:00 2001 From: depristo Date: Wed, 6 Jan 2010 15:03:07 +0000 Subject: [PATCH] useful convenience function to get a genotype associated with a particular sample git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2515 348d0f76-0448-11de-a6fe-93d51630548a --- .../org/broadinstitute/sting/gatk/refdata/RodVCF.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java b/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java index ddd9b1f79..10b96fbeb 100755 --- a/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/RodVCF.java @@ -282,6 +282,16 @@ public class RodVCF extends BasicReferenceOrderedDatum implements VariationRod, return mCurrentRecord.getVCFGenotypeRecords(); } + /** + * Returns the genotype associated with sample, or null if the genotype is missing + * + * @param sampleName the name of the sample genotype to fetch + * @return + */ + public Genotype getGenotype(final String sampleName) { + return mCurrentRecord.getGenotype(sampleName); + } + /** * do we have the specified genotype? not all backedByGenotypes * have all the genotype data.