Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"subsetByLoci" and "preprocessIllumina" can not work together #84

Closed
TracyHIT opened this issue Oct 31, 2016 · 6 comments
Closed

"subsetByLoci" and "preprocessIllumina" can not work together #84

TracyHIT opened this issue Oct 31, 2016 · 6 comments

Comments

@TracyHIT
Copy link

metharray<-read.metharray(basename,extended = FALSE, verbose = FALSE, force = FALSE)
detP<-detectionP(metharray)
rownames<-rownames(detP)
filterpronames<-rownames[which(detP<=0.05)]
metharray<-subsetByLoci(metharray, includeLoci = filterpronames)
mset <- preprocessIllumina(metharray)

#Here I can not go on ~ ~ I want to dorp some probes which failed detection p-value testing.

Error in getGreen(rgSet)[getProbeInfo(rgSet, type = "II")$AddressA, ] : ...

@Jfortin1
Copy link
Contributor

Hi TracyHIT.

First, they do work together -- tested and confirmed on my side.
"detP" is a matrix, and therefore to use "filterpronames<-rownames[which(detP<=0.05)]" does not quite make sense. "which(detP<=0.05)" will return a vector m x n, where m is number of rows and n is the number of columns.

If you want to keep probes for which the detP is less or equal to 0.05 for all samples, I suggest to use the following instead:
filterpronames <- which(rowSums(detP <= 0.05) == ncol(detP))

@kasperdanielhansen
Copy link
Collaborator

@TracyHIT : make sure you are running the latest version of minfi (1.20). And try to make a reproducible example using say minfiData or minfiDataEPIC. I cannot reproduce the error either.

@TracyHIT
Copy link
Author

@kasperdanielhansen :I am running the version of the minfi is "1.18.6" and I just use the data download from "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM999339"

so the "basename<-GSM999339_hg19_wgEncodeHaibMethyl450HepatoSitesRep1"

Thank you for your answer

@TracyHIT
Copy link
Author

@Jfortin1 👍 I am running the version of the minfi is "1.18.6" and I just use the data download from "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM999339"

I only use only one chip‘s data~ ~ I accepted your suggestion and changed the "which(detP<=0.05)"

~~ but it still can not work ~~
I want to drop some probs.

@kasperdanielhansen
Copy link
Collaborator

Use the new bioconductor / minfi, that should fix your problem. We cannot even fix the old version anymore.

@TracyHIT
Copy link
Author

TracyHIT commented Nov 1, 2016

Using new bioconductor / minfi, I have fixed my problem~

@TracyHIT TracyHIT closed this as completed Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants