tximeta throws error when combining Salmon outputs from multiple datasets
1
0
Entering edit mode
@matmu
Last seen 6 months ago
Germany

When I try to apply tximeta on Salmon outputs from two different datasets I get the following error:

generating transcript ranges
Error in rearrangeInfReps(txi$infReps) : 
  all(sapply(infReps, ncol) == nreps) is not TRUE
Calls: tximeta -> rearrangeInfReps -> stopifnot

Can anyone explain this error? When I run tximeta for each of the two datasets independently it works as expected. I was able to remove the error by setting dropInfReps=TRUE. It's is not clear to me, however, what this flag actually does. Can I set it to TRUE for all tximeta runs?

My function call:

require(tximeta)
se = tximeta(df, type = "salmon", txOut = TRUE, countsFromAbundance = "no", dropInfReps=TRUE)

Session info:

R version 4.0.2 (2020-06-22)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS/LAPACK: /opt/conda/envs/rnaseq/lib/libopenblasp-r0.3.10.so

locale:
[1] C

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

other attached packages:
 [1] GenomicFeatures_1.40.0      AnnotationDbi_1.50.0       
 [3] stringr_1.4.0               SummarizedExperiment_1.18.1
 [5] DelayedArray_0.14.0         matrixStats_0.59.0         
 [7] Biobase_2.48.0              GenomicRanges_1.40.0       
 [9] GenomeInfoDb_1.24.0         IRanges_2.22.1             
[11] S4Vectors_0.26.0            BiocGenerics_0.34.0        
[13] tximeta_1.6.3               dplyr_1.0.6                

loaded via a namespace (and not attached):
 [1] httr_1.4.2                    jsonlite_1.7.2               
 [3] bit64_4.0.5                   AnnotationHub_2.20.0         
 [5] shiny_1.6.0                   assertthat_0.2.1             
 [7] interactiveDisplayBase_1.26.0 askpass_1.1                  
 [9] BiocManager_1.30.15           BiocFileCache_1.12.0         
[11] blob_1.2.1                    GenomeInfoDbData_1.2.4       
[13] Rsamtools_2.4.0               yaml_2.2.1                   
[15] progress_1.2.2                BiocVersion_3.11.1           
[17] pillar_1.6.1                  RSQLite_2.2.5                
[19] lattice_0.20-44               glue_1.4.2                   
[21] digest_0.6.27                 promises_1.2.0.1             
[23] XVector_0.28.0                htmltools_0.5.1.1            
[25] httpuv_1.6.1                  Matrix_1.3-4                 
[27] XML_3.99-0.6                  pkgconfig_2.0.3              
[29] biomaRt_2.44.0                zlibbioc_1.34.0              
[31] purrr_0.3.4                   xtable_1.8-4                 
[33] later_1.2.0                   BiocParallel_1.22.0          
[35] tibble_3.1.2                  openssl_1.4.4                
[37] AnnotationFilter_1.12.0       generics_0.1.0               
[39] ellipsis_0.3.2                withr_2.4.2                  
[41] cachem_1.0.5                  lazyeval_0.2.2               
[43] magrittr_2.0.1                crayon_1.4.1                 
[45] mime_0.10                     memoise_2.0.0                
[47] fansi_0.5.0                   tools_4.0.2                  
[49] prettyunits_1.1.1             hms_1.1.0                    
[51] lifecycle_1.0.0               ensembldb_2.12.1             
[53] Biostrings_2.56.0             compiler_4.0.2               
[55] rlang_0.4.11                  grid_4.0.2                   
[57] RCurl_1.98-1.3                tximport_1.16.0              
[59] rstudioapi_0.13               rappdirs_0.3.3               
[61] bitops_1.0-7                  DBI_1.1.1                    
[63] curl_4.3.1                    R6_2.5.0                     
[65] GenomicAlignments_1.24.0      rtracklayer_1.48.0           
[67] fastmap_1.1.0                 bit_4.0.4                    
[69] utf8_1.2.1                    ProtGenerics_1.20.0          
[71] readr_1.4.0                   stringi_1.4.6                
[73] Rcpp_1.0.6                    vctrs_0.3.8                  
[75] dbplyr_2.1.1                  tidyselect_1.1.1
tximeta • 909 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 2 hours ago
United States

It could be that you ran Salmon with different settings across the datasets?

One thing that tximport and tximeta do when importing Salmon data are to assemble the inferential replicate (infRep) matrices (Gibbs samples or bootstrap samples). If you have infReps for only a subset of the datasets, or different number of replicates, then we can't assemble the object properly (it would anyway break downstream methods that expect the same information across the samples in the object).

ADD COMMENT
1
Entering edit mode

You were right, the reason for this error error different values for --numBootstraps. In one dataset it was 100 and in the other 30. I somehow oversaw this one when comparing the parameters in the beginning. Sorry for that.

ADD REPLY
0
Entering edit mode

Thanks Michael! I will double check the Salmon settings and let you know

ADD REPLY

Login before adding your answer.

Traffic: 713 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6