Closed ahdee closed 7 months ago
There is a dedicated script to annotate exon numbers:
https://github.com/suhrig/arriba/blob/master/scripts/annotate_exon_numbers.sh
No need to export it from draw_fusions.sh
. If you still want to export it from draw_fusions.sh
, let me know and I can help you with this.
thanks @suhrig - if possible it would be great if I can export from the draw_fusions.R - the reason is because I've actually extracted the functions from it and use it universally to draw fusions from agnostically from other callers as well. Thus it would be great if I can just have it as single R function. thanks as usual.
Here is a modified version of draw_fusions.R
which prints the exons closest to the fusion breakpoints:
As you can see, I only added 4 lines: 990, 991, 1000, 1001
@suhrig thank you so much. This will help tremendously. I also made an ugly hack earlier this week by stealing it from the render itself, basically sucking up all the exons and towards the end did something like this.
if ( test$direction1 == "upstream"){
this_exon_left = exons1 [ min (this_exon_left) - 1, ]$exonNumber
} else {
this_exon_left = exons1 [ max (this_exon_left) - 1, ]$exonNumber
}
if ( test$direction2 == "downstream" ){
this_exon_right = exons2 [ max ( this_exon_right) - 1, ]$exonNumber
}else {
this_exon_right = exons2 [ min (this_exon_right) + 1, ]$exonNumber
}
Hi - thanks for awesome fusion caller - one of the best hands down. One thing I'm trying to do is to find a way to export the exon number ( where the break occurs) during the time it draws the fusion.
not sure if its possible, but I'm looking at the code at the moment and I can see that the lines drawn are based of some sort of coordinate. For example.
it draws the lines surrounding the exons like so.
so the question what would i have to do is extract the "exonNumber" border for the dfs exons1 and exons2. Here is a picture of the output and I can see visually that it breaks on IGFBP5: exon 1 and ALK: exon 18 however I would like to have the ability to extract this as text.![image](https://github.com/suhrig/arriba/assets/9808122/507977fa-fb7b-4d3d-a955-236ca6147626)
This will be extremely useful for me, thanks in advance!