dmnfarrell / dmnfarrell.github.io

my pages
Other
5 stars 2 forks source link

https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner #15

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Bioinformatics and other bits - A sequence alignment viewer with Bokeh and Panel

https://dmnfarrell.github.io/bioinformatics/bokeh-sequence-aligner

moody789 commented 1 year ago

What does your 'test.aln' file look like?

dmnfarrell commented 1 year ago

It's a fasta alignment just like you see in the video eg:

>seq1
ATTGCTTA
>seq2
TTTGCTCA
moody789 commented 1 year ago

Thanks, that was helpful! Is there a way to edit the code to align sequences of different sizes that are located in various chromosomal coordinates?

On Wed, May 24, 2023 at 7:42 AM Damien Farrell @.***> wrote:

It's a fasta alignment just like you see in the video eg:

seq1 ATTGCTTA seq2 TTTGCTCA

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dmnfarrell_dmnfarrell.github.io_issues_15-23issuecomment-2D1560963714&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=LU8U4uFXQ_KTgVEHqvQWXQ&m=-vTCks8TkmE5PO_TIF_eCmSTgLHW-0-wkPSK2LbzH07bZRcUhzZYjjcF62nPfJ8i&s=N0i5ofKWjAZsyzqHUFwE3VRIlFbTKO1L6xjtX-JwbJ0&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_A34M2H5SY6JSGS65CTKTI23XHXXZJANCNFSM6AAAAAAYMCEZMA&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=LU8U4uFXQ_KTgVEHqvQWXQ&m=-vTCks8TkmE5PO_TIF_eCmSTgLHW-0-wkPSK2LbzH07bZRcUhzZYjjcF62nPfJ8i&s=HpBAEQE9ekS6E0SIyq0U60nMbKZCuLNHf0Pitzk5odE&e= . You are receiving this because you commented.Message ID: @.***>

oleksulkowski commented 1 year ago

Hi, I was playing with your sequence viewer and I wanted to leave these observations:

  1. In newer versions of Bokeh, you'll need to change plot_height and plot_width parameters in the figure() function to height and width.
  2. When I loaded longer, multiple sequences, panning on p1 would break it. This is because Bokeh introduces level of detail adjustments after 2000 text glyphs. Thankfully, you can disable this functionality with lod_threshold=None as a parameter. I can see your gif works with more than 2000 glyphs, so some updates might have broken the LOD capability.
dmnfarrell commented 1 year ago

Thanks for these comments. I can add them to the post.

Hi, I was playing with your sequence viewer and I wanted to leave these observations:

  1. In newer versions of Bokeh, you'll need to change plot_height and plot_width parameters in the figure() function to height and width.
  2. When I loaded longer, multiple sequences, panning on p1 would break it. This is because Bokeh introduces level of detail adjustments after 2000 text glyphs. Thankfully, you can disable this functionality with lod_threshold=None as a parameter. I can see your gif works with more than 2000 glyphs, so some updates might have broken the LOD capability.
dmnfarrell commented 1 year ago

This is outside the scope of the code example I'm afraid. You'd have to write the code to extract the sequences from your chromosome at the right places and then provide them in a fasta file.

Thanks, that was helpful! Is there a way to edit the code to align sequences of different sizes that are located in various chromosomal coordinates?