SnapATAC icon indicating copy to clipboard operation
SnapATAC copied to clipboard

RunDiffusionMaps fails with pmat

Open suragnair opened this issue 4 years ago • 10 comments

I'm trying to do dimensionality reduction using the pmat instead of bmat. However, the trainRegression function has the bmat hardcoded, which causes RunDiffusionMaps to fail.

https://github.com/r3fang/SnapATAC/blob/c3ab177558f0fe9c47cbd68969df7b06de5b07d9/R/utilities.R#L125-L126

There is also a typo here in runDiffusionMapsExtension:

https://github.com/r3fang/SnapATAC/blob/c3ab177558f0fe9c47cbd68969df7b06de5b07d9/R/runLDM.R#L222-L223

suragnair avatar Feb 06 '20 21:02 suragnair

Hi, I face a similar issue when I try to run RunDiffusionMaps with pmat instead of bmat. Here is the error I get (at the trainRegression function) :

Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Error in density.default(x = row.covs, bw = "nrd", adjust = 1) : need at least 2 points to select a bandwidth automatically

shaistamadad avatar Mar 08 '21 18:03 shaistamadad

I met the same error, how can I solve this problem? please help me image

yuxuanChen777 avatar Jun 16 '22 11:06 yuxuanChen777

I've pushed some fixes here https://github.com/kundajelab/SnapATAC/tree/4cb43f7, you can try this version.

suragnair avatar Jun 16 '22 15:06 suragnair

I've pushed some fixes here https://github.com/kundajelab/SnapATAC/tree/4cb43f7, you can try this version.

I follow your advice trying this version, but there is still the same error. image

yuxuanChen777 avatar Jun 17 '22 06:06 yuxuanChen777

Did you reinstall SnapATAC using the version I linked? You will have to uninstall the correct version and run install from the above link.

suragnair avatar Jun 17 '22 06:06 suragnair

Did you reinstall SnapATAC using the version I linked? You will have to uninstall the correct version and run install from the above link.

yes, I did that

yuxuanChen777 avatar Jun 17 '22 07:06 yuxuanChen777

Hard to say then. Perhaps you can insert some print statements around this line row.covs.dens <- density(x = row.covs, bw = 'nrd', adjust = 1) in the trainRegression.R function in utilities.R and see where it's bugging out.

Also looks like there's a SnapATAC2 version out now https://github.com/kaizhang/SnapATAC2.

suragnair avatar Jun 17 '22 07:06 suragnair

Hard to say then. Perhaps you can insert some print statements around this line row.covs.dens <- density(x = row.covs, bw = 'nrd', adjust = 1) in the trainRegression.R function in utilities.R and see where it's bugging out.

Also looks like there's a SnapATAC2 version out now https://github.com/kaizhang/SnapATAC2.

thank you very much. Could you tell there is the link to the SnapATAC2's source paper is?

yuxuanChen777 avatar Jun 17 '22 07:06 yuxuanChen777

Not sure, looks like it's in development

suragnair avatar Jun 17 '22 07:06 suragnair

Not sure, looks like it's in development

Okay, thank you for your reply and help

yuxuanChen777 avatar Jun 17 '22 07:06 yuxuanChen777