public SequenceOntologyTermComparisonObject(String transcriptId, SequenceOntologyTerm sequenceOntologyTerm) { this.transcriptId = transcriptId; this.name = sequenceOntologyTerm.getName(); this.accession = sequenceOntologyTerm.getAccession(); } //
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); } } } } }
String accession = sequenceOntologyTerm.getAccession(); int so = parseConsequenceType(accession); addNotNull(soList, so);
int soNumber = Integer.parseInt(sequenceOntologyTerm.getAccession().substring(3)); soAccessions.add(soNumber);
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(); }