private String getMostSevereConsequenceType(List<ConsequenceType> consequenceTypeList) { int max = -1; String mostSevereConsequencetype = null; for (ConsequenceType consequenceType : consequenceTypeList) { for (SequenceOntologyTerm sequenceOntologyTerm : consequenceType.getSequenceOntologyTerms()) { try { int rank = VariantAnnotationUtils.SO_SEVERITY.get(sequenceOntologyTerm.getName()); if (rank > max) { max = rank; mostSevereConsequencetype = sequenceOntologyTerm.getName(); } } catch (Exception e) { int a = 1; } } } return mostSevereConsequencetype; }
private SequenceOntologyTerm newSequenceOntologyTerm(String name) { return new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(name), name); }
public SequenceOntologyTermComparisonObject(String transcriptId, SequenceOntologyTerm sequenceOntologyTerm) { this.transcriptId = transcriptId; this.name = sequenceOntologyTerm.getName(); this.accession = sequenceOntologyTerm.getAccession(); } //
if (VariantAnnotationUtils.CODING_SO_NAMES.contains(sequenceOntologyTermList.get(i).getName())) { sequenceOntologyTermList.remove(i); } else { .add(new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(newSoName), newSoName));
SequenceOntologyTerm sequenceOntologyTerm = new SequenceOntologyTerm(); sequenceOntologyTerm.setAccession("SO:" + String.format("%07d", soAcc)); sequenceOntologyTerm.setName(ConsequenceTypeMappings.accessionToTerm.get(soAcc)); if (consequenceTypeMap.get(fields[0]).getSequenceOntologyTerms() == null) { consequenceTypeMap.get(fields[0]).setSequenceOntologyTerms(new ArrayList<>()); SequenceOntologyTerm sequenceOntologyTerm = new SequenceOntologyTerm(); sequenceOntologyTerm.setAccession("SO:" + String.format("%07d", soAcc)); sequenceOntologyTerm.setName(ConsequenceTypeMappings.accessionToTerm.get(soAcc));
private void updateVariantSetStats(VariantAnnotation annotation) { if (annotation != null) { for (ConsequenceType consequenceType : annotation.getConsequenceTypes()) { String biotype = consequenceType.getBiotype(); if (StringUtils.isNotEmpty(biotype)) { stats.addVariantBiotypeCounts(biotype, 1); } if (consequenceType.getSequenceOntologyTerms() != null) { for (SequenceOntologyTerm term : consequenceType.getSequenceOntologyTerms()) { stats.addConsequenceTypeCounts(term.getAccession(), 1); } } } } }
if (VariantAnnotationUtils.CODING_SO_NAMES.contains(sequenceOntologyTermList.get(i).getName())) { sequenceOntologyTermList.remove(i); } else { .add(new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(newSoName), newSoName));
String accession = sequenceOntologyTerm.getAccession(); int so = parseConsequenceType(accession); addNotNull(soList, so);
private boolean isCoding(ConsequenceType consequenceType) { for (SequenceOntologyTerm sequenceOntologyTerm : consequenceType.getSequenceOntologyTerms()) { if (VariantAnnotationUtils.CODING_SO_NAMES.contains(sequenceOntologyTerm.getName())) { return true; } } return false; }
public static VariantAnnotationProto.ConsequenceType createConsequenceType(ConsequenceType type) { VariantAnnotationProto.ConsequenceType.Builder builder= VariantAnnotationProto.ConsequenceType.newBuilder() .setGeneName(type.getGeneName()) .setEnsemblGeneId(type.getEnsemblGeneId()) .setEnsemblTranscriptId(type.getEnsemblTranscriptId()) .setStrand(type.getStrand()) .setBiotype(type.getBiotype()) .setCDnaPosition(type.getCdnaPosition()) .setCdsPosition(type.getCdsPosition()) .setCodon(type.getCodon()) .setProteinVariantAnnotation(createProteinVariantAnnotation(type.getProteinVariantAnnotation())); List<SequenceOntologyTerm> sequenceOntologyTerms = type.getSequenceOntologyTerms(); if (sequenceOntologyTerms != null) { for (SequenceOntologyTerm so : sequenceOntologyTerms) { VariantAnnotationProto.SequenceOntologyTerm.Builder soBuilder = VariantAnnotationProto.SequenceOntologyTerm.newBuilder() .setAccession(so.getAccession()) .setName(so.getName()); builder.addSequenceOntologyTerms(soBuilder.build()); } } return builder.build(); }
private SequenceOntologyTerm newSequenceOntologyTerm(String name) { return new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(name), name); }
int soNumber = Integer.parseInt(sequenceOntologyTerm.getAccession().substring(3)); soAccessions.add(soNumber);
private String getMostSevereConsequenceType(List<ConsequenceType> consequenceTypeList) { int max = -1; String mostSevereConsequencetype = null; for (ConsequenceType consequenceType : consequenceTypeList) { for (SequenceOntologyTerm sequenceOntologyTerm : consequenceType.getSequenceOntologyTerms()) { try { int rank = VariantAnnotationUtils.SO_SEVERITY.get(sequenceOntologyTerm.getName()); if (rank > max) { max = rank; mostSevereConsequencetype = sequenceOntologyTerm.getName(); } } catch (Exception e) { int a = 1; } } } return mostSevereConsequencetype; }
private SequenceOntologyTerm newSequenceOntologyTerm(String name) { return new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(name), name); }
private boolean isCoding(ConsequenceType consequenceType) { for (SequenceOntologyTerm sequenceOntologyTerm : consequenceType.getSequenceOntologyTerms()) { if (VariantAnnotationUtils.CODING_SO_NAMES.contains(sequenceOntologyTerm.getName())) { return true; } } return false; }
public static SequenceOntologyTerm newSequenceOntologyTerm(String name) throws SOTermNotAvailableException { return new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(name), name); }
for (SequenceOntologyTerm so: consequenceType.getSequenceOntologyTerms()) { if (LOF.contains(so.getName())) { acmg.add("PVS1"); if ("synonymous_variant".equals(so.getName())) { for (EvidenceEntry evidenceEntry : variant.getAnnotation().getTraitAssociation()) { if ("clinvar".equals(evidenceEntry.getSource().getName()) if (PROTEIN_LENGTH_CHANGING.contains(so.getName()) && "protein_coding".equals(consequenceType.getBiotype())) { acmg.add("PM4");
public static SequenceOntologyTerm newSequenceOntologyTerm(String name) throws SOTermNotAvailableException { return new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(name), name); }
private ConsequenceType buildConsequenceType(String geneName, String ensemblGeneId, String ensemblTranscriptId, String strand, String biotype, List<Document> exonOverlap, List<String> transcriptAnnotationFlags, Integer cDnaPosition, Integer cdsPosition, String codon, List<String> soNameList, ProteinVariantAnnotation proteinVariantAnnotation) { List<SequenceOntologyTerm> soTerms = new ArrayList<>(soNameList.size()); for (String soName : soNameList) { soTerms.add(new SequenceOntologyTerm(ConsequenceTypeMappings.getSoAccessionString(soName), soName)); } List<ExonOverlap> exonOverlapList = new ArrayList<>(exonOverlap.size()); for (Document document : exonOverlap) { ExonOverlap e = new ExonOverlap( document.getString(CT_EXON_OVERLAP_NUMBER_FIELD), getDefault(document, CT_EXON_OVERLAP_PERCENTAGE_FIELD, 0F)); exonOverlapList.add(e); } return new ConsequenceType(geneName, ensemblGeneId, ensemblTranscriptId, strand, biotype, exonOverlapList, transcriptAnnotationFlags, cDnaPosition, cdsPosition, codon, proteinVariantAnnotation, soTerms); }