vsg_rename: Add a "Cluster" column to a VSGSeq results data frame.

View source: R/vsg_rename.R

vsg_renameR Documentation

Add a "Cluster" column to a VSGSeq results data frame.

Description

Take a "cluster_reference" data frame that has the VSG name and its corresponding cluster produced from cd hit and to add a column to a VSGSeq results data frame of the cluster for each VSG.

Usage

vsg_rename(vsg_results_df, cluster_reference, ref_header = FALSE)

Arguments

vsg_results_df

This should be some kind of VSGSeq results data frame that has minimally a column with 'VSG' in it.

cluster_reference

This is a reference table (Needs to be tab delimited) that has the 'VSG' and the corresponding cluster name/number. The 'VSG' here needs to match the 'VSG' name in the vsg_results_df. (I create this reference using my 'MatchVSGs.py' script)

Value

Returns the vsg_results_df with a column labeled 'Clusgter' and has the cluster name for each VSG produced by cd-hit.

Examples

vsg_rename(results_df, "cluster_reference_table.txt")

ABeav/vsgseqtools documentation built on Jan. 26, 2024, 7:22 p.m.