Skip to content

Commit

Permalink
feat: new methy conver function
Browse files Browse the repository at this point in the history
  • Loading branch information
ESCRI11 committed Mar 14, 2023
1 parent 6e35f01 commit 1c7fa66
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 14 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dsOmics
Type: Package
Title: DataSHIELD server site Omic functions
Version: 1.0.18
Version: 1.0.18-2
Date: 2021-07-08
Authors@R: c(person("Yannick", "Marcon", , "yannick.marcon@obiba.org", role = "aut"),
person("Xavier", "Esriba-Montagut", , "xavier.escriba@isglobal.org", role = "aut"),
Expand Down Expand Up @@ -78,7 +78,8 @@ AssignMethods:
subsetGenoDS,
geno_pca_pooled_addPCDS,
geno_pca_pooled_addPC2GenoDS,
pDataDS
pDataDS,
methylation_array_convertDS
Options:
default.nfilter.diffP.epsilon=3,
default.nfilter.diffP.resampleN=3,
Expand All @@ -88,5 +89,5 @@ License: MIT + file LICENSE
biocViews: DNAMethylation, Microarray, Software, WholeGenome, GWAS, Non-disclosive
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.2.2.9000
RoxygenNote: 7.2.3
Encoding: UTF-8
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export(getVariable)
export(limmaDS)
export(limmaDS2)
export(make_valid_namesDS)
export(methylation_array_convertDS)
export(nFeaturesDS)
export(nSamplesDS)
export(pDataDS)
Expand Down
21 changes: 21 additions & 0 deletions R/methylation_array_convertDS.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' @title Convert methylation arrays
#'
#' @param eSet `ExpressionSet` to convert
#' @param objective_array `character` Array to which conver (`"450k"` or `"epic"`)
#'
#' @return `ExpressionSet` converted
#' @export
#'
methylation_array_convertDS <- function(eSet, objective_array){

if(objective_array == "450k"){
cpgs <- rownames(IlluminaHumanMethylation450kanno.ilmn12.hg19::SNPs.Illumina)
} else if (objective_array == "epic"){
cpgs <- rownames(IlluminaHumanMethylationEPICanno.ilm10b2.hg19::SNPs.Illumina)
} else {
stop()
}

eSet_converted <- eSet[rownames(eSet) %in% cpgs, ]
return(eSet_converted)
}
41 changes: 30 additions & 11 deletions man/Opal2FileResourceGetter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions man/methylation_array_convertDS.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c7fa66

Please sign in to comment.