R/listMetaGenomes.R

Defines functions listMetaGenomes

Documented in listMetaGenomes

#' @title List available metagenomes on NCBI Genbank
#' @description List available metagenomes on NCBI genbank. NCBI genbank 
#' allows users to download entire metagenomes of several metagenome projects. 
#' This function lists all available metagenomes that can then be downloaded via
#' \code{\link{getMetaGenomes}}.
#' @param details a boolean value specifying whether only the scientific names 
#' of stored metagenomes shall be returned (\code{details = FALSE}) or all 
#' information such as "organism_name","bioproject", 
#' etc (\code{details = TRUE}).
#' @author Hajk-Georg Drost
#' @examples
#' \dontrun{
#' # retrieve available metagenome projects at NCBI Genbank
#' listMetaGenomes()
#' # retrieve detailed information on available metagenome projects 
#' # at NCBI Genbank
#' listMetaGenomes(details = TRUE)
#' }
#' @seealso \code{\link{getMetaGenomes}}, \code{\link{getMetaGenomeSummary}}
#' @export
 
listMetaGenomes <- function(details = FALSE) {

    metagenome.summary <- getMetaGenomeSummary()    
    
    if (!details)
        return(unique(metagenome.summary$organism_name))
    
    if (details)
        return(metagenome.summary)
}

Try the biomartr package in your browser

Any scripts or data that you put into this service are public.

biomartr documentation built on Oct. 25, 2023, 1:08 a.m.