<div dir="ltr">I'm working on a VEP plugin where I need to look at a section of cDNA around the variant.<div><br></div><div>In a previous plugin, where I needed to do something similar with genomic DNA, I was able to get a slice from the VariationFeature and subslice it like this:</div><div><br></div><div>my $subseq = $vf->slice->sub_Slice($start, $end)->seq;<br></div><div><br></div><div>That worked really well and performed really well.</div><div><br></div><div>I can't find anything similar for the cDNA so I'm getting the spliced sequence from the transcript and then using substr() to do what sub_Slice did above.</div><div><br></div><div><div>my $cdna_seq = $transcript->spliced_seq;</div><div>my $subseq = substr($cdna_seq, $start, $end);</div></div><div><br></div><div>It works well enough, but performance is too poor to be useful, taking 2 or 3 seconds to get $subseq per transcript. I'm wondering if I'm going about things the wrong way and am skipping a cache or something with the methods I'm using.</div><div><br></div><div>Any ideas for how I can get better performance? Is there a better way to get a chunk of a transcript's spliced sequence?</div><div><br></div><div>Thanks,</div><div>Matt Wood</div><div>Codified Genomics</div></div>