thelovelab / tximeta

Transcript quantification import with automatic metadata detection
https://thelovelab.github.io/tximeta/
66 stars 11 forks source link

tximeta returns Error: lexical error: invalid string in json text. #62

Closed Shellfishgene closed 2 years ago

Shellfishgene commented 2 years ago

Hi!

Just wanted to give tximeta a try, however I get an error running the main function. The example in the manual where the data comes from tximportData works. Below toy example does not work, not sure why. Also tried with full path, same result. I updated all Bioconductor packages today. (Also previously reported here it seems).

> files <- file.path("test", "quant.sf") 
> file.exists(files)
[1] TRUE
> coldata <- data.frame(files, names="test", temp="H", stringsAsFactors=FALSE)
> coldata
          files names temp
1 test/quant.sf  test    H
> se <- tximeta(coldata)
Error: lexical error: invalid string in json text.
                                       test/cmd_info.json
                     (right here) ------^
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] BiocGenerics_0.38.0 tximeta_1.10.0      forcats_0.5.1       stringr_1.4.0       dplyr_1.0.7         purrr_0.3.4        
 [7] readr_2.1.1         tidyr_1.1.4         tibble_3.1.6        ggplot2_3.3.5       tidyverse_1.3.1    

loaded via a namespace (and not attached):
  [1] colorspace_2.0-2              rjson_0.2.21                  ellipsis_0.3.2                XVector_0.32.0               
  [5] GenomicRanges_1.44.0          fs_1.5.2                      rstudioapi_0.13               bit64_4.0.5                  
  [9] interactiveDisplayBase_1.30.0 AnnotationDbi_1.54.1          fansi_1.0.2                   lubridate_1.8.0              
 [13] xml2_1.3.3                    tximport_1.20.0               cachem_1.0.6                  jsonlite_1.7.3               
 [17] Rsamtools_2.8.0               broom_0.7.11                  dbplyr_2.1.1                  png_0.1-7                    
 [21] shiny_1.7.1                   BiocManager_1.30.16           compiler_4.1.0                httr_1.4.2                   
 [25] backports_1.4.1               assertthat_0.2.1              Matrix_1.3-4                  fastmap_1.1.0                
 [29] lazyeval_0.2.2                cli_3.1.0                     later_1.3.0                   htmltools_0.5.2              
 [33] prettyunits_1.1.1             tools_4.1.0                   gtable_0.3.0                  glue_1.6.0                   
 [37] GenomeInfoDbData_1.2.6        rappdirs_0.3.3                Rcpp_1.0.8                    Biobase_2.52.0               
 [41] cellranger_1.1.0              vctrs_0.3.8                   Biostrings_2.60.2             rtracklayer_1.52.1           
 [45] rvest_1.0.2                   mime_0.12                     lifecycle_1.0.1               restfulr_0.0.13              
 [49] ensembldb_2.16.4              XML_3.99-0.8                  AnnotationHub_3.0.2           zlibbioc_1.38.0              
 [53] scales_1.1.1                  vroom_1.5.7                   ProtGenerics_1.24.0           hms_1.1.1                    
 [57] promises_1.2.0.1              MatrixGenerics_1.4.3          SummarizedExperiment_1.22.0   AnnotationFilter_1.16.0      
 [61] yaml_2.2.1                    curl_4.3.2                    memoise_2.0.1                 biomaRt_2.48.3               
 [65] stringi_1.7.6                 RSQLite_2.2.9                 BiocVersion_3.13.1            S4Vectors_0.30.2             
 [69] BiocIO_1.2.0                  GenomicFeatures_1.44.2        filelock_1.0.2                BiocParallel_1.26.2          
 [73] GenomeInfoDb_1.28.4           rlang_0.4.12                  pkgconfig_2.0.3               bitops_1.0-7                 
 [77] matrixStats_0.61.0            lattice_0.20-44               GenomicAlignments_1.28.0      bit_4.0.4                    
 [81] tidyselect_1.1.1              magrittr_2.0.1                R6_2.5.1                      IRanges_2.26.0               
 [85] generics_0.1.1                DelayedArray_0.18.0           DBI_1.1.2                     pillar_1.6.4                 
 [89] haven_2.4.3                   withr_2.4.3                   KEGGREST_1.32.0               RCurl_1.98-1.5               
 [93] modelr_0.1.8                  crayon_1.4.2                  utf8_1.2.2                    BiocFileCache_2.0.0          
 [97] tzdb_0.2.0                    progress_1.2.2                grid_4.1.0                    readxl_1.3.1                 
[101] blob_1.2.2                    reprex_2.0.1                  digest_0.6.29                 xtable_1.8-4                 
[105] httpuv_1.6.5                  munsell_0.5.0        
mikelove commented 2 years ago

Can you show ls test? It seems that some versions of jsonlite don't report when the file is missing.

Also if file test/cmd_info.json exists can you show its contents?

Shellfishgene commented 2 years ago

Duh, I had only copied the quant.sf files because they are the only ones referenced in coldata. Then the weird error confused me and I thought tximeta was trying to create the json file. Now I saw there's even a note in the manual about the input. Sorry!