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

Add generate Annotation function to bigmelon #2

Open
TJGorrie opened this issue Jun 22, 2020 · 0 comments
Open

Add generate Annotation function to bigmelon #2

TJGorrie opened this issue Jun 22, 2020 · 0 comments

Comments

@TJGorrie
Copy link
Owner

Use the codes I use all the time to generate, EPIC or 450k annotations, optionally add them to gds file.

You can generate the fData like this

annoObj <-  minfi::getAnnotationObject("IlluminaHumanMethylationEPICanno.ilm10b4.hg19")
all <- minfi:::.availableAnnotation(annoObj)$defaults
newfData <- do.call(cbind, lapply(all, function(wh) {
        minfi:::.annoGet(wh, envir = annoObj@data)
}))
newfData <- newfData[rownames(gfile), ] # SNP probes will be missing, and be NA’d I think.
rownames(newfData) <- rownames(gfile)

And add it with:

# If the gfile was opened with openfn.gds(..., readonly=FALSE)
add.gdsn(gfile, name='fData', val = newfData, replace = TRUE)
@TJGorrie TJGorrie added this to the Bigmelon V2.0.0 milestone Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant