stianlagstad / chimeraviz

chimeraviz is an R package that automates the creation of chimeric RNA visualizations.
36 stars 14 forks source link

Plotting with no bam file? #61

Closed ahdee closed 5 years ago

ahdee commented 5 years ago

Hi I'm wondering if it is possible to plot without a bam file? So I ran fusioncatcher and one of the fusions I'm interested is this.

[1] "Fusion object"
[1] "id: 4"
[1] "Fusion tool: fusioncatcher"
[1] "Genome version: hg19"
[1] "Gene names: COL1A1-SERPING1"
[1] "Chromosomes: chr17-chr11"
[1] "Strands: -,+"
[1] "In-frame?: TRUE"

I only have a bamfile generated previously from a STAR alingment. So I'm wondering since I don't care about coverage can I just have a plot drawn without the bamfile? When I tried to run it with the STAR bam file,

 plot_fusion(
        fusion = draw.fuse, # the fusion above of interest
        edb = edb,
        bamfile = bamfile, # the star bam file
        reduce_transcripts = T
    )

I get an error,

Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") : 
  solving row 1: negative widths are not allowed

Also if not for this error, often I get other fusions that just refuses to plot because I think the bam file is somehow does not have the reads?

thanks!

stianlagstad commented 5 years ago

Hi,

Several of the plots can be plotted without coverage information. Take a look at the package vignette and look at the methods called without bamfiles there.

Are you able to share the fusion result file and the bamfile you used when you got that error? Then I can look into it.

ahdee commented 5 years ago

@stianlagstad yes thank you I'm aware of the other functions like the circos plots but what is really want are the plot generated by plot_fusion with the nice chromosome annotations on top. Here is an example from fusion_catcher that has issues, both fusions do not work using hg19. https://www.dropbox.com/s/jrokxtwmhxy85ra/test-final-list_candidate-fusion-genes.txt?dl=1

It would be great if I can somehow generate this plot without the coverage bam. Thanks! Ahdee

stianlagstad commented 5 years ago

Thanks @ahdee! Would you be able to share the bamfile that you used as well?

I think that a plot with the chromosome ideograms and transcripts (= plot_fusion without the coverage data) is a good idea, so I'll definitely add that :)

ahdee commented 5 years ago

@stianlagstad great thanks the ideograms & transcripts without coverage would be an awesome addition since often, at least for me, I just need to plot out the fusion. Hmm the bamfile is quite large. Let me think about how to perhaps curve out just the genes of interest, however again this was just complete with a simple STAR alignment and will probably not contain any of the fusion junction reads.

stianlagstad commented 5 years ago

The changes have been made. In version 1.8.5 (when built by Bioconductor - you can see the current version is still 1.8.4 here) of chimeraviz you'll be able to call plot_fusion without both bamfile and bedgraphfile :) I'll leave the issue open until you've verified that it works alright.

ahdee commented 5 years ago

@stianlagstad great thanks. Sorry I have not seen this until today. I will check it out tomorrow!

ahdee commented 5 years ago

@stianlagstad just checked it and it works great! thank you. Any chance to add the Cytogenetic location on top of the ideogram?

stianlagstad commented 5 years ago

@ahdee Glad it works! Could you open a new issue for that? I'll close this one.