harmony icon indicating copy to clipboard operation
harmony copied to clipboard

Is dims.use actually working in RunHarmony?

Open cnk113 opened this issue 4 years ago • 7 comments

Hello,

I noticed the output RunHarmony (Seurat) has all 50 components from PCA, but I specified only using the top 10. Also when I specifically computed only 10 PCs and then RunHarmony on it, the output embedding is only 10. When using the top 10 from harmonized PCs from the original 50 gives me a different downstream clustering than computing only 10 PCs. Is it possible that it's using all components no matter what?

cnk113 avatar Apr 13 '20 06:04 cnk113

I encountered the same issue. Setting dims.use does not change the results, it uses all the PCs from the PCA in the object.

hummuscience avatar May 20 '20 08:05 hummuscience

Thanks for bringing this up. I have also been dealing with the same problem recently. It seems that modifying dim.use doesn't have any effect. Hope that we get a response from the developing team soon.

MohamedRefaat92 avatar Mar 17 '21 20:03 MohamedRefaat92

Hello, not the dev team, but are you both specifying the dims in this format "1:20" for example, and not just using dims.use = 20? I had the same issue not realizing it requires the same format you'd use for any seurat command specifying dims.

cswoboda avatar May 12 '21 18:05 cswoboda

Also facing the same issue over here.

nandomgu avatar Jun 11 '21 11:06 nandomgu

I should point out I ended up just redoing RunPCA with desired PCs after checking elbow plot (or jackstraw).

cnk113 avatar Jun 11 '21 23:06 cnk113

The same issue. 2022/1/20

Japrin avatar Jan 20 '22 09:01 Japrin

Hi, not a developer of the package, but indeed there is an issue, which I highlighted in issue #151 , the solution is add a single line

embedding <- embedding[, dims.use]

inside their function. If they do not update the package, you can copy locally the function, e.g. RunHarmony.Seurat, rename it so it does not conflict with Harmony's package and make the change yourselves.

Best, CAK

andreaskapou avatar Mar 25 '22 12:03 andreaskapou

Apologies for the late reply. This has been fixed in the newest version of harmony.

pati-ni avatar Oct 03 '23 15:10 pati-ni