stianlagstad / chimeraviz

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

Request for support for importing other fusion calls #47

Closed MrsLaviniaG closed 5 years ago

MrsLaviniaG commented 6 years ago

Hi, can I submit a request for support for importing data from pizzly? (or providing a generic import function so data from fusion-finders not currently supported can be converted and then imported?)

Many thanks.

stianlagstad commented 6 years ago

Hi @MrsLaviniaG! Thank you for your interest in chimeraviz :) Is it https://github.com/pmelsted/pizzly? Do you happen to have an example output file? If not I can see if I can run pizzly myself, but that will be at a later time.

You might be able to look at one of the other import functions (e.g. ericscript or defuse) and modify that to work with pizzly yourself :)

MrsLaviniaG commented 6 years ago

Thanks for looking at my issue. Yes, that is the correct link. The vanilla output from pizzly is either a FASTA file of the fusion sequences (filtered and unfiltered), a JSON file, or a TSV of the genes with the breakpoints indicated relative to the transcript, e.g.

geneA.name geneA.id geneB.name geneB.id paircount splitcount transcripts.list

IL32 ENSG00000008517 DCAF6 ENSG00000143164 0 1 ENST00000525643_0:446_ENST00000367843_939:

I have been using https://github.com/MattBashton/grolar to parse these results. Thank you for highlighting the links to specific import functions, I will take a look.

MrsLaviniaG commented 6 years ago

Hi Stian, I am interested in two fusion callers, oncofuse and pizzly. I have modified import_defuse.R to import oncofuse information. The fusion information is read into R, but the fusion properties are not quite right (e.g. get_fusion_by_id fails with "Error in FUN(X[[i]], ...) : trying to get slot "id" from an object of a basic class ("NULL") with no slots"), although the imported data looks correct, e.g.

oncofuse[1] [[1]] [1] "Fusion object" [1] "id: 1" [1] "Fusion tool: oncofuse" [1] "Genome version: hg19" [1] "Gene names: PGC-CLTC" [1] "Chromosomes: chr6-chr17" [1] "Strands: +,+" [1] "In-frame?: FALSE"

I have attached my script and an example output from oncofuse, if you have a chance to look at them. If this import script is successful, then with only very minor modifications, pizzly output could also be read into chimeraviz. oncofuse_example_and_import.zip

Many thanks,

Lavinia.

stianlagstad commented 6 years ago

I just tried your import function and it looks like it's working as expected on my end :) Here's an example:

> oncofuse833ke <- system.file(
+   "extdata",
+   "oncofuse.outfile",
+   package="chimeraviz")
> fusions <- import_oncofuse(oncofuse833ke, "hg19", 3)
There were 29 warnings (use warnings() to see them)
> fusions
[[1]]
[1] "Fusion object"
[1] "id: 1"
[1] "Fusion tool: oncofuse"
[1] "Genome version: hg19"
[1] "Gene names: PGC-CLTC"
[1] "Chromosomes: chr6-chr17"
[1] "Strands: +,+"
[1] "In-frame?: FALSE"

[[2]]
[1] "Fusion object"
[1] "id: 6"
[1] "Fusion tool: oncofuse"
[1] "Genome version: hg19"
[1] "Gene names: ILF2-PLK2"
[1] "Chromosomes: chr1-chr5"
[1] "Strands: +,+"
[1] "In-frame?: FALSE"

[[3]]
[1] "Fusion object"
[1] "id: 7"
[1] "Fusion tool: oncofuse"
[1] "Genome version: hg19"
[1] "Gene names: IL1R1-MET"
[1] "Chromosomes: chr2-chr7"
[1] "Strands: +,+"
[1] "In-frame?: FALSE"

Take a look at https://github.com/stianlagstad/chimeraviz/pull/48/files (it's just your code with a simple test).

MrsLaviniaG commented 5 years ago

Apologies for the very slow reply, thanks so much Stian, this is great!

stianlagstad commented 5 years ago

No worries @MrsLaviniaG ! I cleaned up https://github.com/stianlagstad/chimeraviz/pull/48 a bit to remove the network calls. I think users could rather add that code themselves to populate the Fusion objects with the ensembl ids. I'll merge it once the travis build passes, and then I'll close this issue.

stianlagstad commented 5 years ago

Build passed and PR merged in. Thanks again @MrsLaviniaG !