private List < String > calculateTranscriptHgvs ( Variant variant , Transcript transcript , String geneId ) { String mutationType = ">" ; // Populate HGVSName parse tree. HgvsStringBuilder hgvsStringBuilder = new HgvsStringBuilder ( ) ; // Populate coordinates. // Use cDNA coordinates. hgvsStringBuilder . setKind ( isCoding ( transcript ) ? HgvsStringBuilder . Kind . CODING : HgvsStringBuilder . Kind . NON_CODING ) ; hgvsStringBuilder . setCdnaStart ( genomicToCdnaCoord ( transcript , variant . getStart ( ) ) ) ; hgvsStringBuilder . setCdnaEnd ( hgvsStringBuilder . getCdnaStart ( ) ) ; // Populate prefix. hgvsStringBuilder . setTranscriptId ( transcript . getId ( ) ) ; hgvsStringBuilder . setGeneId ( geneId ) ; String reference ; String alternate ; // Convert alleles to transcript strand. if ( transcript . getStrand ( ) . equals ( "-" ) ) { reference = String . valueOf ( VariantAnnotationUtils . COMPLEMENTARY_NT . get ( variant . getReference ( ) . charAt ( 0 ) ) ) ; alternate = String . valueOf ( VariantAnnotationUtils . COMPLEMENTARY_NT . get ( variant . getAlternate ( ) . charAt ( 0 ) ) ) ; } else { reference = variant . getReference ( ) ; alternate = variant . getAlternate ( ) ; } // Populate alleles. hgvsStringBuilder . setMutationType ( mutationType ) ; hgvsStringBuilder . setReference ( reference ) ; hgvsStringBuilder . setAlternate ( alternate ) ; return Collections . singletonList ( hgvsStringBuilder . format ( ) ) ; }
Generates cdna HGVS names from an SNV .