tximeta link to transcriptome
1
0
Entering edit mode
eric.blanc • 0
@ericblanc-11613
Last seen 3.7 years ago

Hi,

I have troubles with using tximeta from the sample table (Cov below).

I loaded the sample table (3 columns, names (all unique), files (absolute paths to quant.sf) & condition (all "A")). I have created a linked transcriptome from downloaded files using:

makeLinkedTxome(
    indexDir=<abs path to salmon indices directory>, 
    source="Gencode", organism="Homo sapiens", release="31", genome="GRCh38", 
    fasta=<absolute path to the gentrome.fa file obtained from salmon tools>, 
    gtf=<absolute path to the GENCODE gtf file>, 
    write=TRUE
)

The command seems to be successful, it creates a json file near the salmon indices directory.

When I try to import the data, it fails:

> se <- tximeta(Cov)
Error in FUN(X[[i]], ...) : file.exists(jsonPath) is not TRUE
> traceback()
5: stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
4: stopifnot(file.exists(jsonPath))
3: FUN(X[[i]], ...)
2: lapply(files, getMetaInfo)
1: tximeta(Cov)

It seems that it can't find file aux_info/meta_info.json. Indeed, there are no such file, neither in the cache, nor in the indices, nor with the quant.sf files.

I am not sure what I am doing wrong here. I am using salmon 0.14.1, and the sessionInfo is shown below.

Thanks for your help, Eric

R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] tximeta_1.2.2 magrittr_1.5 

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.13.0 tximport_1.12.3            
 [3] progress_1.2.0              tidyselect_0.2.5           
 [5] purrr_0.3.2                 lattice_0.20-38            
 [7] stats4_3.6.0                BiocFileCache_1.8.0        
 [9] rtracklayer_1.43.6          GenomicFeatures_1.35.12    
[11] blob_1.1.1                  XML_3.98-1.19              
[13] rlang_0.3.4                 pillar_1.4.1               
[15] glue_1.3.1                  DBI_1.0.0                  
[17] ensembldb_2.8.0             BiocParallel_1.17.19       
[19] rappdirs_0.3.1              BiocGenerics_0.29.2        
[21] bit64_0.9-7                 dbplyr_1.4.2               
[23] matrixStats_0.54.0          GenomeInfoDbData_1.2.1     
[25] ProtGenerics_1.16.0         stringr_1.4.0              
[27] zlibbioc_1.29.0             Biostrings_2.51.5          
[29] memoise_1.1.0               Biobase_2.43.1             
[31] IRanges_2.17.6              biomaRt_2.39.4             
[33] GenomeInfoDb_1.19.3         parallel_3.6.0             
[35] curl_3.3                    AnnotationDbi_1.45.1       
[37] Rcpp_1.0.1                  readr_1.3.1                
[39] BiocManager_1.30.4          DelayedArray_0.9.9         
[41] S4Vectors_0.21.24           jsonlite_1.6               
[43] XVector_0.23.2              bit_1.1-14                 
[45] Rsamtools_1.99.6            hms_0.4.2                  
[47] digest_0.6.18               stringi_1.4.3              
[49] dplyr_0.8.1                 GenomicRanges_1.35.2       
[51] grid_3.6.0                  tools_3.6.0                
[53] bitops_1.0-6                lazyeval_0.2.2             
[55] RCurl_1.95-4.12             tibble_2.1.3               
[57] RSQLite_2.1.1               crayon_1.3.4               
[59] pkgconfig_2.0.2             Matrix_1.2-17              
[61] prettyunits_1.0.2           assertthat_0.2.1           
[63] httr_1.4.0                  AnnotationFilter_1.8.0     
[65] R6_2.4.0                    GenomicAlignments_1.19.1   
[67] compiler_3.6.0             
deseq2 • 1.1k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

Good question. It looks like I could definitely improve both the error messaging and documentation on this point:

The quant.sf files are just one part of the Salmon output directory. tximeta makes use of and requires the entire directory as it was output by Salmon. It's generally a good idea with any bioinformatic software output to preserve the entire output as is (if it outputs a directory of plaintext files instead of a single binarized file), as it will ensure that downstream software will work as intended.

ADD COMMENT
0
Entering edit mode

Ok I've updated the devel branch to have more messaging in the vignette, man pages and also the above error will now be more informative:

the quantification files exist, but the metadata files are missing. tximeta (and other downstream software) require the entire output directory of Salmon/Alevin, including the quantification files and many other files that contain critical metadata. make sure to preserve the entire directory for use with tximeta (and other downstream software).

ADD REPLY
0
Entering edit mode

Thanks for your answer, it makes perfect sense, and everything's working now.

One last comment if I may: the private function tximeta:::getMetaInfo appears to assume that salmon's --auxDir argument shouldn't be used (the aux_info default value is the only path compatible with tximeta). I missed that from the salmon & tximeta doc, perhaps you may want to highlight it a bit more...

Thanks again!

ADD REPLY
0
Entering edit mode

Oh wow, i didn't realize that was an option. Good for me to know. Now I know why Rob added these lines in tximport:

https://github.com/mikelove/tximport/blob/master/R/infReps.R#L28-L30

I'll copy something similar over to tximeta.

ADD REPLY
0
Entering edit mode

Ok this should be set now.

ADD REPLY

Login before adding your answer.

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