FunGeST / Palimpsest

An R package for studying mutational signatures and structural variant signatures along clonal evolution in cancer.
69 stars 19 forks source link

deconvolution_fit error and no piechart #10

Open ekfchan opened 5 years ago

ekfchan commented 5 years ago

Hi Palimpsest Dev Team,

I was going through the package's accompanying vignette http://nbviewer.jupyter.org/github/FunGeST/Palimpsest/blob/master/Files/vignette_palimpsest.pdf and came across an issue related to deconvolution_fit. At Section 5.3 of the vignette, I ran the following commands:

mycol=c("red","orange","yellow","green3","blue","violet","pink")
signatures_exp <- deconvolution_fit(vcf=vcf, type = "SNV", input_data = propMutsByCat, threshold = 5, input_signatures = denovo_signatures, sig_cols = mycol[-1],plot = T,resdir = resdir )
  1. The vignette did not define mycol so I defined it here (hoping I did the right thing).
  2. At completion of the execution, R reported there were warnings:
    
    > warnings()
    Warning messages:
    1: In prop.test(z[1], sum(z), p = 0.5) :
    Chi-squared approximation may be incorrect
    2: In prop.test(z[1], sum(z), p = 0.5) :
    Chi-squared approximation may be incorrect
    3: In prop.test(z[1], sum(z), p = 0.5) :
    Chi-squared approximation may be incorrect
    : 
    :
    43: In sig.fit$res.x/sig.tot :
    Recycling array of length 1 in vector-array arithmetic is deprecated.
    Use c() or as.vector() instead.

44: In text.default(1.1 P$x, 1.1 P$y, labels[i], xpd = TRUE, ... : "explode" is not a graphical parameter : 49: In text.default(1.1 P$x, 1.1 P$y, labels[i], xpd = TRUE, ... : "explode" is not a graphical parameter 50: In title(main = main, ...) : "explode" is not a graphical parameter


3. In the output folder, none of the piecharts were drawn (example attached) 
[CHC205T_Signature_Contribution.pdf](https://github.com/FunGeST/Palimpsest/files/2665529/CHC205T_Signature_Contribution.pdf)

Note that I installed Palimpsest (on my Mac) using `devtools::install_github("FunGeST/Palimpsest")` which did not include the test dataset, so I obtained it from here <https://github.com/FunGeST/Palimpsest/tree/master/RUNNING_PALIMPSEST_EXAMPLE>. Not sure if that makes a difference...? 

Thanks in advance for your help. 
Eva. 
jayendrashinde91 commented 5 years ago

Hi Eva, Thanks for reaching out. To help with the analysis using the toy dataset has been provided in the example script along with the package https://github.com/FunGeST/Palimpsest/blob/master/RUNNING_PALIMPSEST_EXAMPLE/Palimpsest_test_script.R

The script provides stepwise analysis to process the toy data and obtains the results as shown in the vignette. In this script, you will find a proper list of colors for signature visualization (section 2). Here is the code in case; library(RColorBrewer);qual_col_pals <- brewer.pal.info[brewer.pal.info$category == 'qual',] mycol <- unlist(mapply(brewer.pal, qual_col_pals$maxcolors, rownames(qual_col_pals))) mycol<- mycol[sample.int(length(mycol),nrow(denovo_signatures))];names(mycol) <- rownames(denovo_signatures)

You have missed out naming the variables in the mycol list. Hopefully, this solution will be of help to you. Best regards, Jay

ekfchan commented 5 years ago

Yup! Thanks for pointing out the R script; sorry I missed it.
The piecharts are now displaying. Though I'm still getting the warning messages. Something I should worry about?

Thanks!