thelovelab / tximeta

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

issue importing alevin files with tximeta 1.20.0 #80

Closed csoneson closed 7 months ago

csoneson commented 7 months ago

In the current version of tximeta (v1.20.0, Bioc 3.18) we are running into problems when importing alevin data. I think it is related to this commit, and the problem appears when attempting to load the meta_info.json file - only "salmon" and "piscem" are valid type values for getMetaInfo() unless a custom path is provided, and setting a custom path for alevin doesn't seem to work (we'd have to go up from the quant directory and then into the aux_info directory).

More precisely:

> coldata <- data.frame(names = "S1",
+                       files = system.file("extdata/alevin/mouse1_LPS2_50/alevin/quants_mat.gz", 
+                                           package = "tximportData"))

> txi <- tximeta(coldata = coldata, 
+                type = "alevin")
Error in getMetaInfo(dirname(files), type = type, customMetaInfo = customMetaInfo) : 
  expected type = 'salmon' or 'piscem'

> txi <- tximeta(coldata = coldata,
+                type = "alevin",
+                customMetaInfo = "../aux_info/meta_info.json")
Error in getMetaInfo(dirname(files), type = type, customMetaInfo = customMetaInfo) : 

  the quantification files exist, but the metadata files are missing.
  tximeta (and other downstream software) require the entire output directory
  of Salmon/alevin, or for piscem the metadata files to be colocated with the
  quant files. The total output of Salmon/alevin/piscem includes files with
  critical metadata for tximeta to work. Alternatively, you can set
  skipMeta=TRUE or use tximport 

Of course setting skipMeta=TRUE works (and in this case it doesn't make much difference, it's mostly the metadata that is lost); I just wanted to check if it was an intended change (and if so, perhaps the documentation could be clarified). Thanks!

mikelove commented 7 months ago

Oops, I didn't check the alevin import and that metadata was working. I can take a look on Monday and sort this out.

Thanks for posting the issue.

mikelove commented 7 months ago

I pushed to devel and release just now.

csoneson commented 7 months ago

Brilliant, thanks! I can confirm that it seems to be working as expected 👍🏻