[ensembl-dev] slice edit based on variation

Anja Thormann anja at ebi.ac.uk
Tue Mar 6 09:31:57 GMT 2018


Hi Duarte,

we do have code that deals with a slightly different version of your use case. The code <https://github.com/Ensembl/ensembl-variation/blob/release/91/modules/Bio/EnsEMBL/Variation/TranscriptHaplotypeContainer.pm#L1157-L1160> we have constructs transcript haplotypes from phased variants. You could take a look and see if you could extract some of the code for your use case. But at the moment I cannot point you to any API function that could help you with your use case.

Kind regards,
Anja

> On 5 Mar 2018, at 14:49, Duarte Molha <duartemolha at gmail.com> wrote:
> 
> Hi guys
> 
> I was wondering if I could get some pointers from you about the best way to accomplish a task.
> 
> I have a genomic slice and an array of variations features that overlap that slice
> 
> Is there a elegant way of modifying the slice sequence to incorporate one or more of the alternative alleles of each variant without doing a bunch of substring concatenations?
> 
> for example for the sake of simplicity I have a 10 bp slice sequence on chr1:100-110 bp
> 
> AATTAGTATG
> 
> and I have a known variant at position 102 A/T
> 
> my required outcome would be 
> 
> A[T]TTAGTATG =>  ATTTAGTATG 
> 
> Ideally I would like to use the Perl api where possible and be able to generalise this process as best as possible so that i can input a variable number of variants of different types 
> For example, say that on the same 10 bp sequence I had 2 variations and one was a 1bp deletion:
> 
> AATTAGTATG 
> 
> var 1 pos 102 [A/T]
> var2  pos 106 [G/-]
> 
> the output would be 
> 
> A[T]TTA[-]TATG  =>  ATTTATATG 
> 
> Any suggestions?
> 
> Many thanks
> 
> Duarte
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20180306/6f620c29/attachment.html>


More information about the Dev mailing list