read_com: Community Data Input

View source: R/read_com.R

read_comR Documentation

Community Data Input

Description

Reads community data from files.

Usage

read_com(
  cdm,
  env,
  tax,
  seq = NULL,
  phy = NULL,
  file = NULL,
  use_saved = F,
  ...
)

Arguments

cdm

the name of the file with the community data matrix. Rows are samples, and columns are species.

env

the name of the file with a table with environmental data. First column must include sample names as in rows of 'cdm'.

tax

the name of the file with a table with taxonomic information. First column must include species names as in columns of 'cdm'.

seq

the name of the file where sequences for each species in fasta format. Sequence headers must be the species names as in columns of 'cdm'.

phy

the name of the file with a phylogenetic tree in Newick format including the species in 'cdm'. Tip labels must be the species names as in columns of 'cdm'. If no tree is provided, a taxonomic tree can be automatically generated using the information in 'tax', using option 'tree_from_tax = T'.

file

the name of the file where the data will be stored as 'RData' object.

use_saved

read data from 'file' instead of importing them from scratch.

...

further arguments to be passed to 'read.table'.

Details

If no phylogenetic tree is provided, the calculation from the taxonomic data provided is performed using the perl script 'taxonomy_to_tree.pl' available at 'https://github.com/mr-y/my_bioinfPerls'.

Value

A list with community data.

Examples

read_com()

jgmv/comecol documentation built on June 6, 2023, 4:07 p.m.