Code Monkey home page Code Monkey logo

biocompr's People

Contributors

romanschefzik avatar vemabi avatar yoannpa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

biocompr's Issues

fill option

Good afternoon,

To the cross.biplot could you maybe add an option to indicate a 'fill' option, as for the PCAWG palette it works better if you use shape 21 (and up), but that requires "fill" and not "color".

Gr
Miranda

ggcoverage: Bars appear to be plotted on top of each other when log scale is used.

Hi Yoann,
I tried out the ggcoverage function in R 3.6.2.
When I set the log.scaled argument to T, the bars appeared to be placed on top of each other rather than next to each other.
Here is a minimal example:

library(ggplot2)
library(data.table)

code of ggcoverage function copied from GitHub

data_for_plotting <- as.data.table(data.frame(col1 = c("C", "B", "A", "D", "E"), col2 = 100:104, col3 = 35:39))
plot <- ggcoverage(data_for_plotting, log.scaled = T)
print(plot)

I hope this helps with improving the package :).
ggcoverage_trial_plot.pdf

Best wishes
Niklas

Error in fancy.hist(): could not find function "mclapply"

library(BiocompR)
fancy.hist(rnorm(100, 5, 1), xmax = 10)

results in

Error in mclapply(seq(length(xbreaks) - 1), mc.cores = ncores, function(i) { :
could not find function "mclapply"

I guess the import of "parallel" package is missing when executing library(BiocompR)

executing library(parallel) prior to running above code solved the problem.

Heatmap on chromosomes

Would it be possible to add a function that can create a heatmap along chromosomes? Thank you :)

ggbipca() gradient color scale

Hi Yoann,

Description
I'm trying to color the points with a gradient color scale and not by groups.
Below, I used the mtcars data set to replicate my issue. After performing the PCA, I wanted to create a biplot with the points colored by weight on a gradient scale. Instead, the separate values are treated as individual groups and the colors do not represent the gradient.

I think it would be beneficial to add an option to color the points on a gradient scale.

To replicate
mtcars.pca <- prcomp(mtcars[,c(1:5,7,10,11)], center = TRUE, scale. = TRUE)
ggbipca(prcomp.res = mtcars.pca, data = mtcars, color.data = "wt")

Thank you!

Missing Dependency "Hmisc"

When attempting to install BiocompR package (using R 4.0.2) following instructions in the Readme
i get the following error.

devtools::install()
Skipping 1 packages not available: IRanges
✓ checking for file ‘/home/david/Downloads/BiocompR-master/DESCRIPTION’ ...
─ preparing ‘BiocompR’:
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘BiocompR_0.0.68.tar.gz’
Running /usr/lib/R/bin/R CMD INSTALL /tmp/Rtmpk6eJ9o/BiocompR_0.0.68.tar.gz --install-tests
installing to library ‘/home/david/R/x86_64-pc-linux-gnu-library/4.0’
installing source package ‘BiocompR’ ...
using staged installation
R
byte-compile and prepare package for lazy loading
Error in FUN(X[[i]], ...) : there is no package called ‘Hmisc’
Error: unable to load R code in package ‘BiocompR’
Execution halted
ERROR: lazy loading failed for package ‘BiocompR’
removing ‘/home/david/R/x86_64-pc-linux-gnu-library/4.0/BiocompR’
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command 'R' failed, exit status: 1, stdout & stderr were printed
Type .Last.error.trace to see where the error occured
.Last.error.trace
Stack trace:
devtools::install()
pkgbuild::with_build_tools(required = FALSE, callr::rcmd("INSTALL", ...
callr::rcmd("INSTALL", c(install_path, opts), echo = !quiet, ...
callr:::run_r(options)
base:::with(options, with_envvar(env, do.call(processx::run, ...
base:::with.default(options, with_envvar(env, do.call(processx::run, ...
base:::eval(substitute(expr), data, enclos = parent.frame())
base:::eval(substitute(expr), data, enclos = parent.frame())
callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, ...
base:::force(code)
base:::do.call(processx::run, c(list(bin, args = real_cmdargs, ...
(function (command = NULL, args = character(), error_on_status = TRUE, ...
throw(new_process_error(res, call = sys.call(), echo = echo, ...
x System command 'R' failed, exit status: 1, stdout & stderr were printed

Installing package "Hmisc" using install.packages("Hmisc") solved the problem.

ggvolcano.free(,force.label=c()) shows no labels if overlapping

Hi Yoann,

Description
just a little feedback on the ggvolcano.free() function. Currently I am trying to display 34 genes within the volcano plot using the force.label=c() argument. As those labels seem to be to close together and ggrepel does not tolerate the overlap, non of the labels are returned.

Warning messages:
1: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
2: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
3: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
4: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
5: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
6: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
7: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
8: ggrepel: 17 unlabeled data points (too many overlaps). Consider increasing max.overlaps
9: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
.....

To reproduce
volcano.plot<-ggvolcano.free(data=input.data, x.cutoff = 0.01, p.cutoff=0.05, force.label =c('REXO5', 'C18orf54','CCT6P1','CEP72','POLE2','MCM4','HELLS','CCT6P1','ANKRD20A11P','EHMT2','LIN9','PAXIP1' ))

You can find the complete script with input data under the following DFKZ path: /.../.../.../data/rathgeber/scripts/neuroblastoma/Methylation_Analysis/Make_gene_methylation_TelNet_genes_BiocompR_volcano_plot.R

Suggestion how to fix
You could tune the ggrepel argument "force" to increase the labels' distance

Session information
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /usr/lib64/libblas.so.3.4.2
LAPACK: /usr/lib64/liblapack.so.3.4.2

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] dplyr_1.0.7 BiocompR_0.0.149 ggplot2_3.3.5 data.table_1.14.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 rstudioapi_0.13 magrittr_2.0.1 tidyselect_1.1.1 munsell_0.5.0
[6] colorspace_2.0-2 R6_2.5.0 rlang_0.4.11 fansi_0.5.0 tools_4.0.0
[11] grid_4.0.0 gtable_0.3.0 utf8_1.2.2 cli_3.0.1 DBI_1.1.1
[16] withr_2.4.2 ellipsis_0.3.2 digest_0.6.27 assertthat_0.2.1 tibble_3.1.3
[21] lifecycle_1.0.0 crayon_1.4.1 farver_2.1.0 purrr_0.3.4 vctrs_0.3.8
[26] ggrepel_0.9.1 glue_1.4.2 labeling_0.4.2 compiler_4.0.0 pillar_1.6.2
[31] generics_0.1.0 scales_1.1.1 pkgconfig_2.0.3
There were 12 warnings (use warnings() to see them)

warnings()
Warning messages:
1: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
2: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
3: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
4: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
5: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
6: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
7: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
8: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
9: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
10: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
11: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps
12: ggrepel: 11 unlabeled data points (too many overlaps). Consider increasing max.overlaps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.