currentAnnotation.setChromosome(variantMap.get("chromosome")); currentAnnotation.setStart(Integer.valueOf(variantMap.get("start"))); currentAnnotation.setEnd(Integer.valueOf(variantMap.get("end"))); currentAnnotation.setReference(variantMap.get("reference")); currentAnnotation.setAlternate(variantMap.get("alternative"));
protected static VariantAnnotation newVariantAnnotation(Variant variant) { VariantAnnotation va; va = new VariantAnnotation(); va.setChromosome(variant.getChromosome()); va.setReference(variant.getReference()); va.setAlternate(variant.getAlternate()); va.setStart(variant.getStart()); va.setEnd(variant.getEnd()); return va; }
variantAnnotation.setChromosome(variant.getChromosome()); variantAnnotation.setStart(variant.getStart()); variantAnnotation.setEnd(variant.getEnd()); variantAnnotation.setAlternate(variant.getAlternate()); variantAnnotation.setReference(variant.getReference());
@Override public List<VariantAnnotation> annotate(List<Variant> variants) throws VariantAnnotatorException { if (fail) { throw new VariantAnnotatorException("Fail because reasons"); } return variants.stream().map(v -> { VariantAnnotation a = new VariantAnnotation(); a.setChromosome(v.getChromosome()); a.setStart(v.getStart()); a.setEnd(v.getEnd()); a.setReference(v.getReference()); a.setAlternate(v.getAlternate()); a.setId("an id -- " + key); ConsequenceType ct = new ConsequenceType(); ct.setGeneName("a gene"); ct.setSequenceOntologyTerms(Collections.emptyList()); ct.setExonOverlap(Collections.emptyList()); ct.setTranscriptAnnotationFlags(Collections.emptyList()); a.setConsequenceTypes(Collections.singletonList(ct)); a.setAdditionalAttributes( Collections.singletonMap(GROUP_NAME.key(), new AdditionalAttribute(Collections.singletonMap(VARIANT_ID.key(), v.toString())))); return a; }).collect(Collectors.toList()); }