I've struggled getting music_prop to complete with my data and have run it in debugging mode following the code through the functions to see if I could identify the issue.
What I've found is that music_basis returns a large matrix, but it lacks the row names with gene IDs so when
cm.gene = intersect( row names(sc.basis$Disgn.mtx), bulk.gene ) runs the intersection is empty.
The rownames appear to be lost in the line
y = counts(x)[, clusters %in% ct & samples %in% sid]
when this is a single row it returns as a vector (which the following lines test for) and the rowname is lost.
music_prop then stops with the error "Too few common genes!", which is not what the issue actually is, as far as I can tell.
I've struggled getting
music_prop
to complete with my data and have run it in debugging mode following the code through the functions to see if I could identify the issue.What I've found is that
music_basis
returns a large matrix, but it lacks the row names with gene IDs so whencm.gene = intersect( row names(sc.basis$Disgn.mtx), bulk.gene )
runs the intersection is empty.The rownames appear to be lost in the line
y = counts(x)[, clusters %in% ct & samples %in% sid]
when this is a single row it returns as a vector (which the following lines test for) and the rowname is lost.music_prop
then stops with the error "Too few common genes!", which is not what the issue actually is, as far as I can tell.