-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add use_conda_env param and Fix mysql command bugs #41
base: master
Are you sure you want to change the base?
Conversation
rainoffallingstar
commented
Nov 20, 2024
•
edited
Loading
edited
- Add use_conda_env params to use certain conda envs with bwtool installed.
- Update mysql commands by adding "-A -P 3306" params for speed.
…and Update mysql commands to mariadb
R/trackplot.R
Outdated
|
||
cmd = paste("bwtool summary -with-sum -keep-bed -header", bedSimple, bw, paste0(op_dir, bn, ".summary")) | ||
if (!is.null(use_conda)){ | ||
cmd_conda = paste0("conda run -n ", use_conda) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
what is the use_conda
argument in this context? I guess it should be the environment name, but the main argument seems to be TRUE or FALSE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Indeed, the use_conda
argument should be designed to accept the name of the conda environment. It is not appropriate to simply name it use_conda
, as this could potentially mislead users. I suggest renaming it to use_conda_env
to avoid confusion and to clearly communicate the purpose of the argument.
I believe that bwtool is much easier to install via conda. I think this improvement would make this package more robust.
R/trackplot.R
Outdated
@@ -2397,7 +2427,7 @@ summarize_homer_annots = function(anno, sample_names = NULL, legend_font_size = | |||
} | |||
|
|||
.check_mysql = function(warn = FALSE){ | |||
check = as.character(Sys.which(names = 'mysql'))[1] | |||
check = as.character(Sys.which(names = 'mariadb'))[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has mysql
been deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using MariaDB on Arch Linux, and the mysql package is being deprecated. It is expected to be removed in a future release, and it's suggested to use mariadb instead. By the way, MariaDB is a fork of MySQL , which is originated from the same source but has better performents and easy to install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye, by the way, I've retained the original mysql
command in a separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I will review them soon.
R/trackplot.R
Outdated
#' @import data.table | ||
#' @examples | ||
#' bigWigs = system.file("extdata", "bw", package = "trackplot") |> list.files(pattern = "\\.bw$", full.names = TRUE) | ||
#' cd = read_coldata(bws = bigWigs, build = "hg19") | ||
#' oct4_loci = "chr6:31125776-31144789" | ||
#' t = track_extract(colData = cd, loci = oct4_loci, build = "hg19") | ||
#' @export | ||
track_extract = function(colData = NULL, loci = NULL, gene = NULL, binsize = 10, nthreads = 1, query_ucsc = TRUE, gtf = NULL, build = "hg38", padding = 0, ideoTblName = "cytoBand"){ | ||
track_extract = function(colData = NULL, loci = NULL, gene = NULL, binsize = 10, nthreads = 1, query_ucsc = TRUE, gtf = NULL, build = "hg38", padding = 0, ideoTblName = "cytoBand",use_conda = NULL){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, use_conda
shouldn't be the environment name instead of T/F.
…meter to use_conda_env for clarity.