I kept getting an error when trying to run HARMONIES and was able to find the line of code that was causing me problems -- in line 335 of 'main.R', sapply was returning 'name.idx' as a list instead of a vector, so in the next step where 'name.idx' is used to subset the abundance matrix it would throw an error.
If I use abundance.grp0 = abundance.ref0[unlist(name.idx),] in line 336, that fixes the issue.
I'm not sure if this could be related to the version of R I'm using to run HARMONIES, but I thought I'd share this here in case anyone else runs into this problem.
I kept getting an error when trying to run HARMONIES and was able to find the line of code that was causing me problems -- in line 335 of 'main.R', sapply was returning 'name.idx' as a list instead of a vector, so in the next step where 'name.idx' is used to subset the abundance matrix it would throw an error.
If I use
abundance.grp0 = abundance.ref0[unlist(name.idx),]
in line 336, that fixes the issue.I'm not sure if this could be related to the version of R I'm using to run HARMONIES, but I thought I'd share this here in case anyone else runs into this problem.