diff --git a/DESCRIPTION b/DESCRIPTION index 5f84ad2..6c8be6c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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"), @@ -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, @@ -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 diff --git a/NAMESPACE b/NAMESPACE index e14c06b..4ef7d1f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -44,6 +44,7 @@ export(getVariable) export(limmaDS) export(limmaDS2) export(make_valid_namesDS) +export(methylation_array_convertDS) export(nFeaturesDS) export(nSamplesDS) export(pDataDS) diff --git a/R/methylation_array_convertDS.R b/R/methylation_array_convertDS.R new file mode 100644 index 0000000..c105bf3 --- /dev/null +++ b/R/methylation_array_convertDS.R @@ -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) +} \ No newline at end of file diff --git a/man/Opal2FileResourceGetter.Rd b/man/Opal2FileResourceGetter.Rd index d1ca451..616bf1f 100644 --- a/man/Opal2FileResourceGetter.Rd +++ b/man/Opal2FileResourceGetter.Rd @@ -7,19 +7,10 @@ \format{ A R6 object of class OpalFileResourceGetter } -\value{ -A OpalFileResourceGetter object. - -A logical. - -The "resource.file" object. -} \description{ -Creates a new OpalFileResourceGetter instance. - -Check that the provided resource has a URL that locates a Opal file: the URL scheme must be "opal+http" or "opal+https" and the path must designate a file web service entry point (i.e. starts with "ws/files/"). +Opal file resource getter -Download the file from the Opal file system in a temporary location. +Opal file resource getter } \details{ Access a file that is stored in a Opal server. Use Basic authentication header if both @@ -49,28 +40,56 @@ resource's identity and secret are defined, token authentication if secret only \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-Opal2FileResourceGetter-new}{}}} \subsection{Method \code{new()}}{ +Creates a new OpalFileResourceGetter instance. \subsection{Usage}{ \if{html}{\out{
}}\preformatted{Opal2FileResourceGetter$new()}\if{html}{\out{
}} } +\subsection{Returns}{ +A OpalFileResourceGetter object. +} } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-Opal2FileResourceGetter-isFor}{}}} \subsection{Method \code{isFor()}}{ +Check that the provided resource has a URL that locates a Opal file: the URL scheme must be "opal+http" or "opal+https" and the path must designate a file web service entry point (i.e. starts with "ws/files/"). \subsection{Usage}{ \if{html}{\out{
}}\preformatted{Opal2FileResourceGetter$isFor(resource)}\if{html}{\out{
}} } +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{resource}}{The resource object to validate.} +} +\if{html}{\out{
}} +} +\subsection{Returns}{ +A logical. +} } \if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-Opal2FileResourceGetter-downloadFile}{}}} \subsection{Method \code{downloadFile()}}{ +Download the file from the Opal file system in a temporary location. \subsection{Usage}{ \if{html}{\out{
}}\preformatted{Opal2FileResourceGetter$downloadFile(resource, ...)}\if{html}{\out{
}} } +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{resource}}{A valid resource object.} + +\item{\code{...}}{Unused additional parameters.} +} +\if{html}{\out{
}} +} +\subsection{Returns}{ +The "resource.file" object. +} } \if{html}{\out{
}} \if{html}{\out{}} diff --git a/man/methylation_array_convertDS.Rd b/man/methylation_array_convertDS.Rd new file mode 100644 index 0000000..f864290 --- /dev/null +++ b/man/methylation_array_convertDS.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methylation_array_convertDS.R +\name{methylation_array_convertDS} +\alias{methylation_array_convertDS} +\title{Convert methylation arrays} +\usage{ +methylation_array_convertDS(eSet, objective_array) +} +\arguments{ +\item{eSet}{`ExpressionSet` to convert} + +\item{objective_array}{`character` Array to which conver (`"450k"` or `"epic"`)} +} +\value{ +`ExpressionSet` converted +} +\description{ +Convert methylation arrays +}