"step 4: measuring baselines ...": Error in mixtools::normalmixEM(data.c, lambda = rep(1, 3)/3, mu = c(-0.2, : NA/NaN/Inf in foreign function call (arg 4)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start at the step 4 baseline-measurement code that calls mixtools::normalmixEM(data.c, ...), and inspect the values passed as data.c after the three filtering blocks were commented out. Reproduce the reported input and determine which calculation introduces non-finite values; done means the cause and the required correction or input condition are documented and confirmed.
Written by the indexing model from the issue text.
Description
Dear authors
Thank you for developing such an excellent package!
When I use it,I met some questions.
Because all the cells were filtered out when I first run the original code, three places in the original code were commented:
1——
`# genes.raw <- apply(rawmat, 2, function(x) (sum(x > 0)))
if (sum(genes.raw > 200) == 0)
stop("none cells have more than 200 genes")
if (sum(genes.raw < 100) > 1) {
rawmat <- rawmat[, -which(genes.raw < 200)]
print(paste("filtered out ", sum(genes.raw <= 200),
" cells with less than 200 genes; remaining ", ncol(rawmat),
" cells", sep = ""))
}
2——
if (length(toRev) > 0) {
anno.mat <- anno.mat[-toRev, ]
}
ToRemov2 <- NULL
for (i in 8:ncol(anno.mat)) {
cell <- cbind(anno.mat$chromosome_name, anno.mat[, i])
cell <- cell[cell[, 2] != 0, ]
if (length(as.numeric(cell)) < 5) {
rm <- colnames(anno.mat)[i]
ToRemov2 <- c(ToRemov2, rm)
}
else if (length(rle(cell[, 1])$length) < 23 | min(rle(cell[,
1])$length) < ngene.chr) {
rm <- colnames(anno.mat)[i]
ToRemov2 <- c(ToRemov2, rm)
}
i <- i + 1
}
if (length(ToRemov2) == (ncol(anno.mat) - 7))
stop("all cells are filtered")
if (length(ToRemov2) > 0) {
anno.mat <- anno.mat[, -which(colnames(anno.mat) %in%
ToRemov2)]
}
3——
ToRemov3 <- NULL
for (i in 8:ncol(anno.mat2)) {
cell <- cbind(anno.mat2$chromosome_name, anno.mat2[,
i])
cell <- cell[cell[, 2] != 0, ]
if (length(as.numeric(cell)) < 5) {
rm <- colnames(anno.mat2)[i]
ToRemov3 <- c(ToRemov3, rm)
}
else if (length(rle(cell[, 1])$length) < 23 | min(rle(cell[,
1])$length) < ngene.chr) {
rm <- colnames(anno.mat2)[i]
ToRemov3 <- c(ToRemov3, rm)
}
i <- i + 1
}
if (length(ToRemov3) == ncol(norm.mat.relat))
stop("all cells are filtered")
if (length(ToRemov3) > 0) {
norm.mat.relat <- norm.mat.relat[, -which(colnames(norm.mat.relat) %in%
ToRemov3)]
}`
Then I am encountering errors on "step 4: measuring baselines ...":
Error in mixtools::normalmixEM(data.c, lambda = rep(1, 3)/3, mu = c(-0.2, :
NA/NaN/Inf in foreign function call (arg 4)
but I have checked that there is no NA value in my counts. Is it generated in the process of calculation? I can't solve this problem .Could you please help me?
I would appreciate it if you could reply to me.
Thank you very much!
- Dominant language
- R
- Stars
- 305
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from navinlabcode/copykat
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
navinlabcode/copykat#141 · 1 comment ·
-
License discrepency Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
navinlabcode/copykat#140 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
navinlabcode/copykat#138 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
navinlabcode/copykat#137 ·
-
InferCNA plot logic Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
navinlabcode/copykat#136 ·
All issues in navinlabcode/copykat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·