Closed sigven closed 1 month ago
Hi @sigven, thanks for your comments:
I came across that need as well, but I could not find a special solution. Btw, did you notice the black/gray dots here above horizontal line at 0? Each dot is a breakpoint, and it's black if the segment has a Major+minor allele counts that exceeds the Y-axis plot. So there you see that there are certainly focal amplifications on chromsome 7, some with more than 6 copies... can you suggest something better? Maybe some ad-hoc visualisation?
the plotly
thing seems usefull, can you give me some code to reproduce it? I can definitely change the behaviour of the chromosome
argument, I never thought it would make much sense as it is done now..
Hi @sigven still interested on this?
Hi @caravagn, yeah indeed! Sorry for not responding, I hope to get back to you shortly.
Hi @caravagn (cc @pdiakumis),
Truly sorry for the very late response and follow-up on this matter. We have been working hard to use your package inside PCGR, where we want to plot allele-specific copy number input from tumor samples for clinical interpretation. Notably, PCGR relies upon the Conda framework, and we have struggled to make CNAqc
install and work in our production environment, particularly due to its multiple dependencies that are currently hosted in multiple GitHub repositories (meaning they are non-Condarized). Again, we think the plot is very elegant and the functionality is very good, and would be great to expand upon, but currently we are unable to make it work properly in our production environment.
kind regards, Sigve
Hi @sigven this is more clear now; I would love to see it used in your tool. Maybe we can help with this, let me talk with the guys and see if we can consider improving dependencies (some might be not strictly required).
Could you please clarify in which form you would like the package to be installable? Is the problem that the package depends on too many other packages for your internal use?
@luca-dex I might need you help on this.
@luca-dex Regarding dependencies I think that
crayon
, we use it for colours, maybe we can do everything with cli
ggpubr
, we use to assemble plots, maybe the same plots can be obtained using a facet strategy and just ggplot
ggrepel
, required to annotate driver events and fragmentation via geom_text_repel
, but not-necessary if we switch to simpler type of annotations in baseline ggplot
BMix
, required for peak detectionvcfR
, used only in the vignettesclisymbols
, required with cli
RColorBrewer
, VariantAnnotation
, GenomicRanges
, AnnotationDbi
, required to annotate driver eventseasypar
, required for automatic loopsgtools
, required only for its mixedsort
akima
, required for auto-tolerancecowplot
, redundant with ggpubr
ggsci
, we use it for colours, maybe we can just explcit colour codespeakPick
, required for peaksreadr
, required for VEP inputsComplexHeatmap
, required for cohort plotsHello Giulio,
Thanks for getting back to us, but please don't spend time on refactoring your codebase for our needs. As Sigve mentioned, we are only interested in the CNA segment plotting functionality that comes with CNAqc (which we could probably handle with a custom ggplot2 + plotly solution if we wanted some interactivity).
The way we handle dependencies in PCGR is via conda (https://docs.conda.io/en/latest/) which is a great tool for managing R/Py/Perl pkgs and other bioinformatics tools.
R pkgs can be converted into conda pkgs fairly easily if they are on CRAN/Bioconductor. Things get a bit trickier if they're only on GitHub, especially if their dependencies are also GitHub-only.
From CNAqc's DESCRIPTION I can see multiple caravagn
/caravagnalab
dependencies (which is perfectly fine, I do that a lot too!). But these would be required to be firstly tagged and released, and then condarised themselves. There are probably other dependencies in there that would also need to be condarised. This is an arduous process and frankly not worth the effort for one plot.
We are currently handling the installation of CNAqc into our conda environments simply by using remotes::install_github("caravagnalab/CNAqc")
. This adds an extra 15-20min to our GitHub Actions pipeline, but works fine on Linux (but not MacOS). It's okay for now, but we will be looking into replacing this at some point.
Hi @pdiakumis, I see, thanks for clarifying, I can then close this.
Then maybe the best for you is to re-use our code from
Best,
Giulio
Hi,
Thanks for a very nice package with lots of great functionality for copy-number processing and visualization. This is really missing from other packages. Great work! I have been playing a bit with data from our tumor samples, and want to share some thoughts on the visualization function
plot_segments
:plot_segments
to plotly, i.e.plotly::ggplotly(CNAqc::plot_segments(x))
, which, if working optimally, would give the users a powerful oppertunity to interact with the segments (and potentially annotations therein), being able to zoom in on particular chromosomes etc. I thought that restricting thechromosomes
argument inplot_segments
would give me a higher-resolution view of a particular chromosome, but it seems that the whole genome track is also plotted for this?Happy to get your input on these matters:-)
kind regards, Sigve