}
/**
- * A convenience method to get the AF value for the given alternate allele
- * index
- *
- * @param variant
- * @param alleleIndex
- * @return
- */
- protected float getAlleleFrequency(VariantContext variant, int alleleIndex)
- {
- float score = 0f;
- String attributeValue = getAttributeValue(variant,
- ALLELE_FREQUENCY_KEY, alleleIndex);
- if (attributeValue != null)
- {
- try
- {
- score = Float.parseFloat(attributeValue);
- } catch (NumberFormatException e)
- {
- // leave as 0
- }
- }
-
- return score;
- }
-
- /**
* A convenience method to get an attribute value for an alternate allele
*
* @param variant
type = getOntologyTerm(consequence);
}
- float score = getAlleleFrequency(variant, altAlleleIndex);
-
SequenceFeature sf = new SequenceFeature(type, alleles, featureStart,
- featureEnd, score, FEATURE_GROUP_VCF);
+ featureEnd, FEATURE_GROUP_VCF);
sf.setSource(sourceId);
sf.setValue(Gff3Helper.ALLELES, alleles);