convert_animalcules: Create a multi-assay experiment from MetaScope output for...

View source: R/convert_animalcules.R

convert_animalculesR Documentation

Create a multi-assay experiment from MetaScope output for usage with animalcules

Description

Upon completion of the MetaScope pipeline, users can analyze and visualize abundances in their samples using the animalcules package. This function allows interoperability of metascope_id output with both animalcules and QIIME.

Usage

convert_animalcules(
  meta_counts,
  annot_path,
  which_annot_col,
  end_string = ".filtered.metascope_id.csv",
  qiime_biom_out = FALSE,
  path_to_write = ".",
  NCBI_key = NULL
)

Arguments

meta_counts

A vector of filepaths to the counts ID CSVs output by MetaScope

annot_path

The filepath to the CSV annotation file for the samples

which_annot_col

The name of the column of the annotation file containing the sample IDs. These should be the same as the meta_counts root filenames.

end_string

The end string used at the end of the metascope_id files. Default is ".filtered.metascope_id.csv"

qiime_biom_out

Would you also like a qiime-compatible biom file output? If yes, two files will be saved: one is a biom file of the counts table, and the other is a specifically formatted mapping file of metadata information. Default is FALSE.

path_to_write

Where should output animalcules and/or QIIME files be written to? Should be a character string of the folder path. Default is '.', i.e. the current working directory.

NCBI_key

(character) NCBI Entrez API key. optional. See taxize::use_entrez(). Due to the high number of requests made to NCBI, this function will be less prone to errors if you obtain an NCBI key.

Value

returns a multi-assay experiment file of combined sample counts data and/or biom file and mapping file for analysis with QIIME. The multi-assay experiment will have assays for the counts ("MGX"), log counts, CPM, and log CPM.

Examples

#donotrun{
#all_files <- list.files("~/decamp/analysis/aodom/Novartis_COPD/MetaScope_run/Output",
#                         pattern = "*.filtered.metascope_id.csv",
#                         full.names = TRUE)
#out <- convert_animalcules(meta_counts = all_files,
#annot_path = "~/decamp/analysis/aodom/Novartis_COPD/Data/DECAMP_patho_annotation.csv",
# end_string = ".filtered.metascope_id.csv", which_annot_col = "DECAMP_ID")
#}
 # coming soon!


compbiomed/MetaScope documentation built on Aug. 9, 2022, 10:41 a.m.