loomR icon indicating copy to clipboard operation
loomR copied to clipboard

Combine Issue

Open gewirtz opened this issue 7 years ago • 6 comments

Hi, I'm trying to combine loom objects titled test and test2. (edit: I'm working with the development branch of loomR) test:

Class: loom
Filename: <redacted>
Access type: H5F_ACC_RDWR
Listing:
       name    obj_type dataset.dims dataset.type_class
  col_attrs   H5I_GROUP         <NA>               <NA>
 col_graphs   H5I_GROUP         <NA>               <NA>
     layers   H5I_GROUP         <NA>               <NA>
     matrix H5I_DATASET 5000 x 33593          H5T_FLOAT
  row_attrs   H5I_GROUP         <NA>               <NA>
 row_graphs   H5I_GROUP         <NA>               <NA>

test2:

Class: loom
Filename: <redacted>
Access type: H5F_ACC_RDWR
Listing:
       name    obj_type dataset.dims dataset.type_class
  col_attrs   H5I_GROUP         <NA>               <NA>
 col_graphs   H5I_GROUP         <NA>               <NA>
     layers   H5I_GROUP         <NA>               <NA>
     matrix H5I_DATASET 5000 x 33593          H5T_FLOAT
  row_attrs   H5I_GROUP         <NA>               <NA>
 row_graphs   H5I_GROUP         <NA>               <NA>

And when I try: combine(c(test, test2), filename = "combined.loom") I get

Error in combine(c(test, test2), filename = "combined.loom") : 
  Each entry in the list of looms to combine must have a length of one.

Additionally, when I close the connections and provide the filenames to combine I get this error: Error in h5attr(this, "chunks") : Attribute does not exist

Any help would be appreciated, thank you!!

gewirtz avatar May 21 '18 20:05 gewirtz

Try passing the two loom objects as a list instead of a vector:

test.combined <- combine(looms = list(test, test2), filename = "combined.loom")

mojaveazure avatar May 22 '18 21:05 mojaveazure

That gives me the same error as if I made it a vector.

combine(looms=list(test,test2), filename = "combined.loom")
Error in combine(loom = list(test, test2), filename = "combined.loom") : 
  Each entry in the list of looms to combine must have a length of one

gewirtz avatar May 23 '18 01:05 gewirtz

Combine looms

mojaveazure avatar May 31 '18 16:05 mojaveazure

Whoops, sorry about that. I found the error and pushed a fix to the develop branch. Can you install that and give it a try?

devtools::install_github(repo = 'mojaveazure/loomR', ref = 'develop')

mojaveazure avatar Jun 13 '18 16:06 mojaveazure

Hm, reinstalled and using the same code as before I now get:

Error in h5attr(this, "chunks") : Attribute does not exist

gewirtz avatar Jun 13 '18 17:06 gewirtz

Whoops, my bad. I wasn't properly checking for certain HDF5 attributes. Try reinstalling and running combine again.

mojaveazure avatar Jun 13 '18 18:06 mojaveazure