AllenInstitute / scrattch.mapping

Genearlized mapping scripts for RNA-seq and Patch-seq data
8 stars 2 forks source link

writePatchseqMarkers having trouble with matrix rather than anno file inputs #22

Closed xpliu16 closed 1 year ago

xpliu16 commented 1 year ago

In the example comments, it seems that we could use the counts and metadata matrices directly as inputs, rather than the feather filenames. However, when I actually try to do this, I get an error at: if (class(counts) == "character"). I believe this is because:

class(query.counts_sub) [1] "matrix" "array" class(query.counts_sub) == "character" [1] FALSE FALSE (two values going into the if statement)

So I tried: query.counts_sub_df <- as.data.frame(query.counts_sub) But then I got: Error in writePatchseqQCmarkers(counts = query.counts_sub_df, metadata = query.metadata_sub, : counts must be some kind of matrix or a file name.

I think this has some useful ideas: https://stackoverflow.com/questions/64660948/issue-with-creating-a-matrix-in-r

UCDNJJ commented 1 year ago

We've resolved these issue points in v0.2 where writePatchseqMarkers is replaced by buildPatchseqTaxonomy which only takes in a taxonomy anndata object remove any requirement on the user to format matrices or strings as you've mentioned.

I'm going to close this issue for now but please re-open if your points haven't been addressed in v0.2 of scrattch.mapping.