r3fang / SnapATAC

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

Bug report in runDiffusionMaps #83

Closed abayegan closed 5 years ago

abayegan commented 5 years ago

Hi,

The runDiffusionMaps() functions produces the following error for samples with lower than 1000 cells:

Error in sample.int(length(x), size, replace, prob) :

cannot take a sample larger than the population when 'replace = FALSE'

This is because of the line idx.ds<- sort(sample(x = seq(row.covs), size = 1000, prob = sampling_prob)) in the trainRegression() function.

r3fang commented 5 years ago

if you update the package to the latest version and follow the first or second example, the error should be gone.

Ruismart commented 5 years ago

Hi ,I still get that runDiffusionMaps() error with the latest package。 I just have 50 cells。

r3fang commented 5 years ago

Hi when did you update the package?

Sent from my iPhone

On Sep 3, 2019, at 10:57 AM, Amir Bayegan notifications@github.com wrote:

Hi,

The runDiffusionMaps() functions produces the following error for samples with lower than 1000 cells:

Error in sample.int(length(x), size, replace, prob) :

cannot take a sample larger than the population when 'replace = FALSE'

This is because of the line idx.ds<- sort(sample(x = seq(row.covs), size = 1000, prob = sampling_prob)) in the trainRegression() function.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Ruismart commented 5 years ago

I did that yesterday ,and just now.

install_github("r3fang/SnapATAC") Skipping install of 'SnapATAC' from a github remote, the SHA1 (8562d681) has not changed since last install. Use force = TRUE to force installation

install_github("r3fang/SnapATAC",force=TRUE)


x.sp = runDiffusionMaps( obj=x.sp, input.mat="bmat", num.eigs=50 ); Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE'

r3fang commented 5 years ago

Hi,

I am really sorry that I thought you were referring to a previous bug, I have just updated the package, can you try it again and let me know if it works?

-- Rongxin Fang, Ren Lab Ludwig Cancer Research Bioinformatics Ph.D. Student University of California, San Diego

On Sep 12, 2019, at 9:18 PM, Liushaorui notifications@github.com wrote:

I did that yesterday ,and just now.

install_github("r3fang/SnapATAC") Skipping install of 'SnapATAC' from a github remote, the SHA1 (8562d68 https://github.com/r3fang/SnapATAC/commit/8562d6810313c05ff40c0940e2e00564c5f4071d) has not changed since last install. Use force = TRUE to force installation

install_github("r3fang/SnapATAC",force=TRUE)

x.sp = runDiffusionMaps(

obj=x.sp, input.mat="bmat", num.eigs=50 ); Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE' — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/83?email_source=notifications&email_token=ABT6GGZJZAWYIMASUEKNDRTQJMIBFA5CNFSM4ITJGX6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6T5C3Y#issuecomment-531091823, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GG5ACTJIO2N4M3HBSRLQJMIBFANCNFSM4ITJGX6A.

Ruismart commented 5 years ago

now it's like :

Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : unused argument (replace = FALSE)

r3fang commented 5 years ago

It should be fixed this time. Sorry that it has taken such a long time

On Sep 12, 2019, at 9:31 PM, Liushaorui notifications@github.com wrote:

now it's like :

Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : unused argument (replace = FALSE)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/83?email_source=notifications&email_token=ABT6GGYZ7YESL4HLUOUWMOLQJMJRFA5CNFSM4ITJGX6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6T5SKI#issuecomment-531093801, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GGZ2XPUTOY6KWCLUOLLQJMJRFANCNFSM4ITJGX6A.

Ruismart commented 5 years ago

Never mind, it's working now~

x.sp = runDiffusionMaps( obj=x.sp, input.mat="bmat", num.eigs=50 );

Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Epoch: performing normalization ... Epoch: computing eigen decomposition ... Error in igraph::arpack(f, extra = M, sym = sym, options = list(which = wh, : At arpack.c:944 : ARPACK error, NCV must be greater than NEV and less than or equal to N (and for the non-symmetric solver NCV-NEV >=2 must also hold)

x.sp = runDiffusionMaps( obj=x.sp, input.mat="bmat", num.eigs=40 );

Epoch: checking the inputs ... Epoch: computing jaccard similarity matrix ... Epoch: fitting regression model ... Epoch: performing normalization ... Epoch: computing eigen decomposition ... Epoch: Done