Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kataegis, loading data #122

Closed
brucemoran opened this issue Jan 12, 2021 · 2 comments
Closed

Kataegis, loading data #122

brucemoran opened this issue Jan 12, 2021 · 2 comments

Comments

@brucemoran
Copy link

Hi Sigve,

Two things:

1::
I have a case with 991 potential kataegis events identified (113 are ' high confidence'), but in the 'Main results' block at top of report it shows 'Kataegis events: NA'.

I had a look to find where this is reported but couldn't find it?

I then wanted a rainfall plot, so readr::read_tsv(<filename>.tsv.gz, skip=1), and proceeded through the code, it failed on a few fronts (colnames etc.) but got there in the end. (NB I'm happy to fork and pull req. for a rainfall plot addition if that's of interest for reports).

2:
Now wondering, could you add a method/flag to capture data from PCGR so users can reload the environment?

I know this could get quite big if for example BSGenome are saved. But saving pcg_report object as rds would be really useful (for me!).

Again, sorry if I missed this and it's already available!

Thanks,

Bruce

@sigven
Copy link
Owner

sigven commented Jan 13, 2021

Hi Bruce,

Regarding 2), check out the JSON output, which essentially stores the pcg_report object. You can then load this file in R and make any data available for other custom analyses you see fit (see also the FAQ #3). I'll dig into the kataegis issue a bit more, that seems like a bug, is it showing the same ('NA') also for the flexdashboard HTML? Btw, There should also be a rainfall plot for the flexdashboard that is not yet incorporated in the rmarkdown output (reckon it might be inspected better for the dashboard output given its a bit wider than the rmarkdown).

regards,
Sigve

@brucemoran
Copy link
Author

Hi Sigve,

OK, sorry I see FAQ #3, I knew you'd have a way somewhere, I've never used json so probably mentally bypassed it. Nice method.

I am not getting a flexdb HTML output. I'm on 0.9.0rc, but not running Docker, might need to update through Conda? So can't comment on kataegis/rainfall, agree the image width affects the plot so is probably not worthwhile from Rmarkdown HTML (though I'll probably keep using that as we like it!).

As you know, here is where pcg_report$content$value_box$kataegis is defined as 'NA'.

Not sure what way you want to report, a simple length(pcg_report$content$kataegis$events)?

Or high confidence:

ka <- lapply(pcg_report$content$kataegis$events, function(f){
                if(f$confidence == 3){return(f)}
          })
length(ka[lengths(ka) != 0])

Thanks as always, feel free to close!

Bruce

@sigven sigven closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants