mapWriter.println(variant.getChromosome() + "\t" + variant.getId() + "\t0\t" + variant.getStart());
mustSearchVariation.get(i).setId(cacheVariant.getId()); if (mustSearchVariation.get(i).getAnnotation() == null) { mustSearchVariation.get(i).setAnnotation(new VariantAnnotation());
private void generateReportedVariants(List<Variant> variantList, Phenotype phenotype, Panel diseasePanel, ClinicalProperty.ModeOfInheritance moi, Map<String, ReportedVariant> reportedVariantMap) { for (Variant variant : variantList) { if (!reportedVariantMap.containsKey(variant.getId())) { reportedVariantMap.put(variant.getId(), new ReportedVariant(variant.getImpl(), 0, new ArrayList<>(), Collections.emptyList(), Collections.emptyMap())); } ReportedVariant reportedVariant = reportedVariantMap.get(variant.getId()); // Sanity check if (variant.getAnnotation() != null && ListUtils.isNotEmpty(variant.getAnnotation().getConsequenceTypes())) { for (ConsequenceType ct: variant.getAnnotation().getConsequenceTypes()) { // Create the reported event ReportedEvent reportedEvent = new ReportedEvent() .setId("JT-PF-" + reportedVariant.getReportedEvents().size()) .setPhenotypes(Collections.singletonList(phenotype)) .setConsequenceTypeIds(Collections.singletonList(ct.getBiotype())) .setGenomicFeature(new GenomicFeature(ct.getEnsemblGeneId(), ct.getEnsemblTranscriptId(), ct.getGeneName(), null, null)) .setModeOfInheritance(moi) .setPanelId(diseasePanel.getDiseasePanel().getId()); // TODO: add additional reported event fields // Add reported event to the reported variant reportedVariant.getReportedEvents().add(reportedEvent); } } } }
mustSearchVariation.get(i).setId(cacheVariant.getId()); if (mustSearchVariation.get(i).getAnnotation() == null) { mustSearchVariation.get(i).setAnnotation(new VariantAnnotation());
private void generateReportedVariants(VariantQueryResult<Variant> variantQueryResult, Phenotype phenotype, Panel diseasePanel, ClinicalProperty.ModeOfInheritance moi, Penetrance penetrance, Map<String, ReportedVariant> reportedVariantMap) { for (Variant variant: variantQueryResult.getResult()) { if (!reportedVariantMap.containsKey(variant.getId())) { reportedVariantMap.put(variant.getId(), new ReportedVariant(variant.getImpl(), 0, new ArrayList<>(), Collections.emptyList(), Collections.emptyMap())); } ReportedVariant reportedVariant = reportedVariantMap.get(variant.getId()); // Sanity check if (variant.getAnnotation() != null && ListUtils.isNotEmpty(variant.getAnnotation().getConsequenceTypes())) { for (ConsequenceType ct: variant.getAnnotation().getConsequenceTypes()) { // Create the reported event ReportedEvent reportedEvent = new ReportedEvent() .setId("JT-PF-" + reportedVariant.getReportedEvents().size()) .setPhenotypes(Collections.singletonList(phenotype)) .setConsequenceTypeIds(Collections.singletonList(ct.getBiotype())) .setGenomicFeature(new GenomicFeature(ct.getEnsemblGeneId(), ct.getEnsemblTranscriptId(), ct.getGeneName(), null, null)) .setModeOfInheritance(moi) .setPanelId(diseasePanel.getDiseasePanel().getId()) .setPenetrance(penetrance); // TODO: add additional reported event fields // Add reported event to the reported variant reportedVariant.getReportedEvents().add(reportedEvent); } } } }
String idForVcf = getIdForVcf(variant.getId(), variant.getNames());
variantSearchModel.setVariantId(variant.getId()); variantSearchModel.setChromosome(variant.getChromosome()); variantSearchModel.setStart(variant.getStart());
if (expected.getId() == null) { expected.setId(expected.toString());
private Variant newVariant(Variant variant, VariantKeyFields keyFields, StructuralVariation sv) { Variant normalizedVariant = new Variant(variant.getChromosome(), keyFields.getStart(), keyFields.getEnd(), keyFields.getReference(), keyFields.getAlternate()) .setId(variant.getId()) .setNames(variant.getNames()) .setStrand(variant.getStrand()); if (sv != null) { if (normalizedVariant.getSv() != null) { // CI positions may change during the normalization. Update them. normalizedVariant.getSv().setCiStartLeft(sv.getCiStartLeft()); normalizedVariant.getSv().setCiStartRight(sv.getCiStartRight()); normalizedVariant.getSv().setCiEndLeft(sv.getCiEndLeft()); normalizedVariant.getSv().setCiEndRight(sv.getCiEndRight()); } else { normalizedVariant.setSv(sv); } // Variant will never have CopyNumber, because the Alternate is normalized from <CNxx> to <CNV> normalizedVariant.getSv().setCopyNumber(keyFields.getCopyNumber()); normalizedVariant.getSv().setType(VariantBuilder.getCNVSubtype(keyFields.getCopyNumber())); } return normalizedVariant; // normalizedVariant.setAnnotation(variant.getAnnotation()); // if (isSymbolic(variant)) { // StructuralVariation sv = getStructuralVariation(normalizedVariant, keyFields, null); // normalizedVariant.setSv(sv); // } }