We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The R script trackplot.R use BWTool to extract from bigwig files,
.get_summaries = function(bedSimple, bigWigs, op_dir = getwd(), nthreads = 1){ #bedSimple = temp_op_bed; bigWigs = list.files(path = "./", pattern = "bw"); op_dir = getwd(); nthreads = 1 op_dir = paste0(op_dir, "/") if(!dir.exists(paths = op_dir)){ dir.create(path = op_dir, showWarnings = FALSE, recursive = TRUE) } message(paste0("Extracting signals")) summaries = parallel::mclapply(bigWigs, FUN = function(bw){ bn = gsub(pattern = "\\.bw$|\\.bigWig$", replacement = "", x = basename(bw)) message(paste0(" Processing ", bn, " ..")) cmd = paste("bwtool summary -with-sum -keep-bed -header", bedSimple, bw, paste0(op_dir, bn, ".summary")) system(command = cmd, intern = TRUE) paste0(op_dir, bn, ".summary") }, mc.cores = nthreads) summary_list = lapply(summaries, function(x){ x = data.table::fread(x) colnames(x)[1] = 'chromosome' x = x[,.(chromosome, start, end, size, max)] if(all(is.na(x[,max]))){ message("No signal! Possible cause: chromosome name mismatch between bigWigs and queried loci.") x[, max := 0] } x }) #Remove intermediate files lapply(summaries, function(x) system(command = paste0("rm ", x), intern = TRUE)) system(command = paste0("rm ", bedSimple), intern = TRUE) names(summary_list) = gsub(pattern = "*\\.summary$", replacement = "", x = basename(path = unlist(summaries))) summary_list }
but a error.
Extracting signals Processing SRR2970503 .. Processing SRR2970502 .. Processing SRR2970504 .. Processing SRR2970502 .. Processing SRR2970506 .. invalid unsigned integer: "4e+05" invalid unsigned integer: "4e+05" invalid unsigned integer: "4e+05" invalid unsigned integer: "4e+05" Processing SRR2970502 .. invalid unsigned integer: "4e+05" invalid unsigned integer: "4e+05" Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table Calls: track_extract ... colnames<- -> names<- -> names<-.data.table -> setnames
It always happes when have a number have five zeros at the end between start and end, how can I solve this problem.
The text was updated successfully, but these errors were encountered:
solved by add options(scipen = 999) to not use scientific notation.
options(scipen = 999)
Sorry, something went wrong.
No branches or pull requests
The R script trackplot.R use BWTool to extract from bigwig files,
but a error.
It always happes when have a number have five zeros at the end between start and end, how can I solve this problem.
The text was updated successfully, but these errors were encountered: