read_eggnog_mapper: Function for reading in eggnog-mapper annotations and...

View source: R/genome_profiling.R

read_eggnog_mapperR Documentation

Function for reading in eggnog-mapper annotations and returning tidy subsets of the info

Description

Many of the data in the eggnog-mapper annotation table (eg., generated by the LLG pipeline) is encoded as comma-delimited lists within a single column (eg., KEGG pathways). This makes it challenging to "tidy" the table.

Usage

read_eggnog_mapper(
  infile = NULL,
  cmd = NULL,
  sep = "\t",
  nrows = Inf,
  to_keep = c("COG", "KEGG pathway", "CAZy"),
  column_names = c("query_name", "seed_eggNOG_ortholog", "seed_ortholog_evalue",
    "seed_ortholog_score", "Predicted_taxonomic_group", "Predicted_protein_name",
    "Gene_Ontology_terms", "EC_number", "KEGG_ko", "KEGG_Pathway", "KEGG_Module",
    "KEGG_Reaction", "KEGG_rclass", "BRITE", "KEGG_TC", "CAZy", "BiGG_Reaction",
    "tax_scope__eggNOG_taxonomic_level_used_for_annotation", "eggNOG_OGs", "bestOG",
    "COG_Functional_Category", "eggNOG_free_text_description")
)

Arguments

infile

Path to eggnog-annotation table file

cmd

command instead of input file (eg., "gunzip -c INFILE")

sep

table value delimiter

nrows

Number of table rows to read. If Inf, all lines will be read.

to_keep

Which functional grouping to keep (eg., KEGG pathways)?

column_names

The column names to use for the table (use NULL if the input table has column names)

Details

This function will read in the table and output a tidy table of one part of the table (eg., COG functional categories or KEGG pathways).

The function will also provide info on how to obtain metadata for function groupings.

Value

data.table


leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.