importing salmon rnaseq quant with tximeta
1
0
Entering edit mode
@omidalamdari-22702
Last seen 4.0 years ago

I'm trying to import salmon quant tables with tximeta.

I did the transcript quantification with salmon as below:

salmon quant -i ../gencode.v32_salmon0.14.1 -l A \
         -1 ${samp}_1.fastq.gz \
         -2 ${samp}_2.fastq.gz \
         --numGibbsSamples 20 \
         -p 8 --gcBias --validateMappings -o ../salmon_quant/${samp}_quant

When I'm trying to import it as a summarized experiment in R I get the following error.

> se <- tximeta(coldata)
importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 
couldn't find matching transcriptome, returning un-ranged SummarizedExperiment
Error in stopifnot(all(sapply(infReps, ncol) == nreps)) : 
  (list) object cannot be coerced to type 'integer'

I don't know what's going and appreciate the help. Thanks

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] tximeta_1.2.2        TSAtools_0.0.0.9000  GOfuncR_1.4.0       
 [4] vioplot_0.3.4        zoo_1.8-7            sm_2.2-5.6          
 [7] rtracklayer_1.44.4   GenomicRanges_1.36.1 GenomeInfoDb_1.20.0 
[10] IRanges_2.18.3       S4Vectors_0.22.1     BiocGenerics_0.30.0 

loaded via a namespace (and not attached):
 [1] Biobase_2.44.0              httr_1.4.1                 
 [3] jsonlite_1.6                bit64_0.9-7                
 [5] gtools_3.8.1                assertthat_0.2.1           
 [7] BiocFileCache_1.8.0         blob_1.2.0                 
 [9] GenomeInfoDbData_1.2.1      Rsamtools_2.0.3            
[11] progress_1.2.2              pillar_1.4.3               
[13] RSQLite_2.2.0               backports_1.1.5            
[15] lattice_0.20-38             glue_1.3.1                 
[17] digest_0.6.23               XVector_0.24.0             
[19] Matrix_1.2-18               XML_3.98-1.20              
[21] pkgconfig_2.0.3             biomaRt_2.40.5             
[23] zlibbioc_1.30.0             purrr_0.3.3                
[25] BiocParallel_1.18.1         tibble_2.1.3               
[27] AnnotationFilter_1.8.0      SummarizedExperiment_1.14.1
[29] GenomicFeatures_1.36.4      lazyeval_0.2.2             
[31] magrittr_1.5                crayon_1.3.4               
[33] memoise_1.1.0               tools_3.6.1                
[35] prettyunits_1.1.0           hms_0.5.3                  
[37] matrixStats_0.55.0          stringr_1.4.0              
[39] DelayedArray_0.10.0         AnnotationDbi_1.46.1       
[41] ensembldb_2.8.1             Biostrings_2.52.0          
[43] compiler_3.6.1              mapplots_1.5.1             
[45] rlang_0.4.2                 grid_3.6.1                 
[47] RCurl_1.95-4.12             tximport_1.12.3            
[49] rstudioapi_0.10             rappdirs_0.3.1             
[51] bitops_1.0-6                tcltk_3.6.1                
[53] DBI_1.1.0                   curl_4.3                   
[55] R6_2.4.1                    GenomicAlignments_1.20.1   
[57] knitr_1.26                  dplyr_0.8.3                
[59] bit_1.1-15                  zeallot_0.1.0              
[61] ProtGenerics_1.16.0         readr_1.3.1                
[63] stringi_1.4.5               Rcpp_1.0.3                 
[65] vctrs_0.2.1                 dbplyr_1.4.2               
[67] tidyselect_0.2.5            xfun_0.12
tximeta salmon deseq2 • 1.3k views
ADD COMMENT
0
Entering edit mode

Hi Mike,

I hope you're doing good. You were partially correct. Two of my samples didn't have the inferential replicates. and that was triggering the:

Error in stopifnot(all(sapply(infReps, ncol) == nreps)) : 
  (list) object cannot be coerced to type 'integer'

I removed them from the coldata data.frame, but I still get the non-matchon Txom error.

> se <- tximeta(coldata)
importing quantifications
reading in files with read_tsv
1 2 3 4 
couldn't find matching transcriptome, returning un-ranged SummarizedExperiment

Here is the content of one of the meta_info.json files

{
    "salmon_version": "0.14.1",
    "samp_type": "gibbs",
    "opt_type": "vb",
    "quant_errors": [],
    "num_libraries": 1,
    "library_types": [
        "ISR"
    ],
    "frag_dist_length": 1001,
    "seq_bias_correct": false,
    "gc_bias_correct": true,
    "num_bias_bins": 4096,
    "mapping_type": "mapping",
    "num_valid_targets": 226608,
    "num_decoy_targets": 0,
    "num_eq_classes": 427701,
    "serialized_eq_classes": false,
    "eq_class_properties": [
        "range_factorized"
    ],
    "length_classes": [
        538,
        717,
        1193,
        2355,
        104301
    ],
    "index_seq_hash": "4260e6940afd09855e30858f10b1382e01f2dc08d0c8148e279649e8f97cf722",
    "index_name_hash": "9edc28415f23c1eea85c9be24269e331797556a48d56c21158af37951b737bfc",
    "index_seq_hash512": "2bc9ae123f8d65c9f4b90fed5c1ebd2346920a7c48719b2b60b97274c348ecdf9b53758a497c290504a0327f231d29b4be33e838df788b3a0fbf1a73c25b5f4f",
    "index_name_hash512": "1c892eab443b9c19feb67e86c065e8f33daa3156b3366c72349e31d15260a956fb0878b0b6ff7687ebb5fdf7c0bc2da3b538aa3310f95bfeba479c0a339053ef",
    "num_bootstraps": 20,
    "num_processed": 24194375,
    "num_mapped": 16906153,
    "num_decoy_fragments": 0,
    "num_dovetail_fragments": 65886,
    "num_fragments_filtered_vm": 1422690,
    "num_alignments_below_threshold_for_mapped_fragments_vm": 4519308,
    "percent_mapped": 69.87637829040841,
    "call": "quant",
    "start_time": "Fri Jan 10 18:32:07 2020",
    "end_time": "Fri Jan 10 18:36:03 2020"
}

Thanks again, Omid.

ADD REPLY
0
Entering edit mode

Great, so there's no more error, the message above just means that your transcriptome is not a match for the records in tximeta 1.2.2 Which transcriptome are you using?

I'll work on some better messaging for when there is a mix of data with and without inf reps.

ADD REPLY
0
Entering edit mode

Thanks, Upgraded the tximeta to 1.4.2 and it identified the Gencode v32 correctly.

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

Thanks for the report.

It looks like I should add some more checks here, but what I'd guess is happening is that not all of the samples have inferential replicates, and this is breaking code that assumes they all do have inferential replicates.

Can you check by looking into the meta_info.json file for each sample to see that they all have inferential replicates?

ADD COMMENT
0
Entering edit mode

I've added a more helpful error message in devel to detect these cases (it's a tximport message in this case).

ADD REPLY

Login before adding your answer.

Traffic: 941 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