pachterlab / sleuth

Differential analysis of RNA-Seq
http://pachterlab.github.io/sleuth
GNU General Public License v3.0
305 stars 95 forks source link

Error in bs_mat[, which_ids] #169

Closed Rdroit closed 6 years ago

Rdroit commented 6 years ago

Hi,

I was using a pipeline using Salmon Wasabi and Sleuth when i encountered this error:

Meta data loaded Arguments parsed reading in kallisto results dropping unused factor levels ......... normalizing est_counts 21061 targets passed the filter normalizing tpm merging in metadata aggregating by column: ens_gene 12956 genes passed the filter summarizing bootstraps .Error in bs_mat[, which_ids] : indice out of bounds Calls: ... apply_function -> FUN -> process_bootstrap -> moreover : Warning message: Column target_id joining character vector and factor, coercing into character vector Execution stopped

the traceback in R is :

traceback() 5: matrixStats::colVars(bs_mat[, which_ids]) 4: process_bootstrap(i, samp_name, kal_path, num_transcripts, est_counts_sf[[i]], read_bootstrap_tpm, ret$gene_mode, extra_bootstrap_summary, target_id, mappings, which_ids, ret$gene_column, ret$transform_fun) 3: FUN(X[[i]], ...) 2: apply_function(seq_along(kal_dirs), function(i) { samp_name <- sample_to_covariates$sample[i] kal_path <- get_kallisto_path(kal_dirs[i]) process_bootstrap(i, samp_name, kal_path, num_transcripts, est_counts_sf[[i]], read_bootstrap_tpm, ret$gene_mode, extra_bootstrap_summary, target_id, mappings, which_ids, ret$gene_column, ret$transform_fun) }) 1: sleuth::sleuth_prep(opt$meta, target_mapping = opt$t2g, aggregation_column = "ens_gene", num_cores = threads)

Do someone have an idea of what is going on here ?? Thanks :)

warrenmcg commented 6 years ago

Hi @Rdroit,

I see the warning Column target_id joining character vector and factor, coercing into character vector in your output, and I am reminded of issue #76. Is your t2g read from file? If so, is stringsAsFactors = FALSE? If not, see if that fixes the problem. If that is not the issue, can you let me know what where the factor column is?

Rdroit commented 6 years ago

Thank you a lot @warrenmcg :D you saved me, it fixed my problem. sorry for the time of response.

warrenmcg commented 6 years ago

Ok, I'm going to close this, but will add a line of code to force the t2g to have character columns.

pimentel commented 6 years ago

I think this is fixed, no? @warrenmcg

warrenmcg commented 6 years ago

@pimentel: yes this is fixed. I had opened it again because I hadn't made the commit. Since the commit is now included, it can be closed.