r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
300 stars 125 forks source link

RunDiffusionMaps fails with pmat #157

Open suragnair opened 4 years ago

suragnair commented 4 years ago

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

shaistamadad commented 3 years ago

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

yuxuanChen777 commented 2 years ago

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

suragnair commented 2 years ago

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

yuxuanChen777 commented 2 years ago

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

suragnair commented 2 years ago

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

yuxuanChen777 commented 2 years ago

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

suragnair commented 2 years ago

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.

yuxuanChen777 commented 2 years ago

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?

suragnair commented 2 years ago

Not sure, looks like it's in development

yuxuanChen777 commented 2 years ago

Not sure, looks like it's in development

Okay, thank you for your reply and help