R/zzz.R

Defines functions Keep_Items_from_Dataset Add_Item_to_Dataset Pipelines

Documented in Add_Item_to_Dataset Keep_Items_from_Dataset Pipelines

#' @title xxx
#'
#' @description
#' Get the list of pipelines available in the package
#'
#' @export
#'
Pipelines <- function(){
  list(Protein = c('protein'),
       Peptide = c('peptide'),
       P2p = c('protein'),
       Peptidomic = c('peptide')
       )
}



#' @title xxx
#'
#' @description
#' Adds one or more items to the dataset. This function is specific of the
#' type of dataset.
#'
#' @importFrom QFeatures addAssay
#'
#' @return
#' The dataset minus some items
#'
#' @export
#'
Add_Item_to_Dataset <- function(dataset, name){
  QFeatures::addAssay(dataset,
                      dataset[[length(dataset)]],
                      name=name)
}

#' @title xxx
#'
#' @description
#' Removes one or more items from the dataset. This function is specific of the
#' type of dataset.
#'
#' @return
#' The dataset minus some items
#'
#' @export
#'
Keep_Items_from_Dataset <- function(dataset, range){
  dataset[ , , range]
}
samWieczorek/MSPipelines documentation built on May 6, 2021, 5:54 p.m.