import does not work with devel version
1
0
Entering edit mode
marc.tormo • 0
@marctormo-23189
Last seen 2.5 years ago
UPF (Barcelona)

Hi there,

I'm trying to import a "loom" file with the devel version and I'm getting an error:

>library(LoomExperiment)

> scle <- LoomExperiment::import("l5_all.agg.loom", type="SingleCellLoomExperiment")
Error in normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE,  : 
  invalid [[ subscript type: NULL

This same command works perfectly with R version 3.6.

Does anyone have any clue? Thanks

> sessionInfo()
R Under development (unstable) (2020-04-14 r78227)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /gpfs42/robbyfs/homes/aplic/noarch/software/OpenBLAS/0.3.1-GCC-7.3.0-2.30/lib/libopenblas_nehalemp-r0.3.1.so

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=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] LoomExperiment_1.5.2        rtracklayer_1.47.0         
 [3] rhdf5_2.31.10               SingleCellExperiment_1.9.3 
 [5] SummarizedExperiment_1.17.5 DelayedArray_0.13.12       
 [7] matrixStats_0.56.0          Biobase_2.47.3             
 [9] GenomicRanges_1.39.3        GenomeInfoDb_1.23.17       
[11] IRanges_2.21.8              S4Vectors_0.25.15          
[13] BiocGenerics_0.33.3        

loaded via a namespace (and not attached):
 [1] magrittr_1.5             XVector_0.27.2           GenomicAlignments_1.23.2
 [4] zlibbioc_1.33.1          BiocParallel_1.21.2      lattice_0.20-41         
 [7] stringr_1.4.0            tools_4.1.0              grid_4.1.0              
[10] HDF5Array_1.15.18        crayon_1.3.4             Matrix_1.2-18           
[13] GenomeInfoDbData_1.2.3   Rhdf5lib_1.9.3           bitops_1.0-6            
[16] RCurl_1.98-1.2           stringi_1.4.6            compiler_4.1.0          
[19] Biostrings_2.55.7        Rsamtools_2.3.7          XML_3.99-0.3     
LoomExperiment • 1.4k views
ADD COMMENT
0
Entering edit mode

This looks like a version mis-match error; can you confirm BiocManager::valid() returns TRUE? Can you also report, immediately after the error, the result of traceback()? And finally, can you make your example reproducible by using the loom file distributed with the package

fl = system.file(package="LoomExperiment", "extdata", "L1_DRG_20_example.loom")
LoomExperiment::import(fl, type = "SingleCellLoomExperiment")

or some other publicly available loom file?

ADD REPLY
0
Entering edit mode

Thanks Martin,

Yes, the result of BiocManager::valid() is TRUE.

The result of traceback() is:

> traceback()
16: stop("invalid [[ subscript type: ", subscript_type)
15: normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE, 
        allow.nomatch = TRUE)
14: getListElement(x@listData, i, exact = exact)
13: getListElement(x@listData, i, exact = exact)
12: getListElement(x, i, ...)
11: getListElement(x, i, ...)
10: .nextMethod(x = x, i = i)
9: callNextMethod()
8: df[[rowname]]
7: df[[rowname]]
6: .importLoom_DataFrame(con, "/col_attrs", colnames_attr, unlist(metadata[reducedDims_names]))
5: .local(con, ...)
4: import(FileForFormat(con), ...)
3: import(FileForFormat(con), ...)
2: LoomExperiment::import("l5_all.agg.loom", type = "SingleCellLoomExperiment")
1: LoomExperiment::import("l5_all.agg.loom", type = "SingleCellLoomExperiment")

Also, I am able to import the example loom file:

> fl = system.file(package="LoomExperiment", "extdata", "L1_DRG_20_example.loom")
> LoomExperiment::import(fl, type = "SingleCellLoomExperiment")
class: SingleCellLoomExperiment 
dim: 20 20 
metadata(0):
assays(1): matrix
rownames: NULL
rowData names(7): Accession Gene ... X_Total X_Valid
colnames: NULL
colData names(103): Age AnalysisPool ... cDNA_Lib_Ok ngperul_cDNA
reducedDimNames(0):
altExpNames(0):
rowGraphs(0): NULL
colGraphs(2): KNN MKNN

So, the problem is with the data I downloaded from http://mousebrain.org/, then?

Many thanks

ADD REPLY
0
Entering edit mode

To me it looks like another bug in LoomExperiment. The data comes from https://storage.googleapis.com/linnarsson-lab-loom/l5_all.agg.loom and is easily reproducible

url = "https://storage.googleapis.com/linnarsson-lab-loom/l5_all.agg.loom"
path = BiocFileCache::bfcrpath(rnames = url)
LoomExperiment::import(path)

with

> LoomExperiment::import(path)
Error in normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE,  :
  invalid [[ subscript type: NULL

Thanks for the additional information (the source of the data) to make this reproducible. I'll direct the appropriate person to this (and your other issue)

ADD REPLY
0
Entering edit mode

Thank you very much, Martin

ADD REPLY
0
Entering edit mode

I don't get this message when I run it on Ubuntu...

> url <- "https://storage.googleapis.com/linnarsson-lab-loom/l5_all.agg.loom"
> path <- BiocFileCache::bfcrpath(rnames = url)
> LoomExperiment::import(path)
sessionInfo()
class: LoomExperiment 
dim: 27998 265 
metadata(0):
assays(5): matrix enrichment enrichment_q trinaries
  trinaries_0.05
rownames: NULL
rowData names(7): Accession Gene ... X_Total X_Valid
colnames: NULL
colData names(214): Age_6w Age_. ... Tissue_Thal X_Total
rowGraphs(0): NULL
colGraphs(0): NULL
<details><summary>sessionInfo()</summary>

R version 4.0.0 beta (2020-04-14 r78225)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 19.10

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.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] nvimcom_0.9-83 colorout_1.2-2

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.17.5 tidyselect_1.0.0           
 [3] purrr_0.3.3                 HDF5Array_1.15.18          
 [5] lattice_0.20-41             rhdf5_2.31.10              
 [7] vctrs_0.2.4                 stats4_4.0.0               
 [9] BiocFileCache_1.11.5        rtracklayer_1.47.0         
[11] blob_1.2.1                  XML_3.99-0.3               
[13] rlang_0.4.5                 pillar_1.4.3               
[15] glue_1.4.0                  DBI_1.1.0                  
[17] BiocParallel_1.21.2         rappdirs_0.3.1             
[19] SingleCellExperiment_1.9.3  BiocGenerics_0.33.3        
[21] bit64_0.9-7                 dbplyr_1.4.2               
[23] matrixStats_0.56.0          GenomeInfoDbData_1.2.3     
[25] lifecycle_0.2.0             stringr_1.4.0              
[27] zlibbioc_1.33.1             Biostrings_2.55.7          
[29] memoise_1.1.0               Biobase_2.47.3             
[31] IRanges_2.21.8              GenomeInfoDb_1.23.17       
[33] LoomExperiment_1.5.2        parallel_4.0.0             
[35] curl_4.3                    fansi_0.4.1                
[37] Rcpp_1.0.4.6                DelayedArray_0.13.12       
[39] S4Vectors_0.25.15           XVector_0.27.2             
[41] bit_1.1-15.2                Rsamtools_2.3.7            
[43] digest_0.6.25               stringi_1.4.6              
[45] dplyr_0.8.5                 GenomicRanges_1.39.3       
[47] grid_4.0.0                  cli_2.0.2                  
[49] tools_4.0.0                 bitops_1.0-6               
[51] magrittr_1.5                RCurl_1.98-1.1             
[53] tibble_3.0.0                RSQLite_2.2.0              
[55] crayon_1.3.4                pkgconfig_2.0.3            
[57] ellipsis_0.3.0              Matrix_1.2-18              
[59] assertthat_0.2.1            httr_1.4.1                 
[61] Rhdf5lib_1.9.2              R6_2.4.1                   
[63] GenomicAlignments_1.23.2    compiler_4.0.0             
</details>
ADD REPLY
0
Entering edit mode

I opened an issue https://github.com/Bioconductor/LoomExperiment/issues/13 and did some initial debugging; I'm not sure Marcel why it does not fail for you?

ADD REPLY
0
Entering edit mode

I had the fix already applied in my system without knowing it. There is a pending PR here: https://github.com/Bioconductor/LoomExperiment/pull/12

After reinstalling from BiocManager, I get the same error:

> url <- "https://storage.googleapis.com/linnarsson-lab-loom/l5_all.agg.loom"
> path <- BiocFileCache::bfcrpath(rnames = url)
> LoomExperiment::import(path)
Error in normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE,  : 
  invalid [[ subscript type: NULL
ADD REPLY
2
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

This is fixed in version 1.5.3, which will be available in the 'devel' branch in 48 hours and in the the new Bioconductor release later in the week.

ADD COMMENT
0
Entering edit mode

Thanks, it works now.

ADD REPLY

Login before adding your answer.

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