add.protein: Amino acid compositions of proteins

View source: R/add.protein.R

add.proteinR Documentation

Amino acid compositions of proteins

Description

Functions to get amino acid compositions and add them to protein list for use by other functions.

Usage

  add.protein(aa, as.residue = FALSE)

Arguments

aa

data frame, amino acid composition in the format of thermo()$protein

as.residue

logical, normalize by protein length?

Details

A ‘⁠protein⁠’ in CHNOSZ is defined by its identifying information and the amino acid composition, stored in thermo$protein. The names of proteins in CHNOSZ are distinguished from those of other chemical species by having an underscore character ("_") that separates two identifiers, referred to as the protein and organism. An example is ‘⁠LYSC_CHICK⁠’. The purpose of the functions described here is to identify proteins and work with their amino acid compositions. From the amino acid compositions, the thermodynamic properties of the proteins can be estimated by group additivity.

Given a data frame of amino acid compositions in the format of thermo()$protein, add.protein adds them to thermo()$protein for use by other functions in CHNOSZ. The amino acid compositions of proteins in aa with the same name as one in thermo()$protein are replaced. Set as.residue to TRUE to normalize by protein length; each input amino acid composition is divided by the corresponding number of residues, with the result that the sum of amino acid frequencies for each protein is 1.

Value

For add.protein, the rownumbers of thermo()$protein that are added and/or replaced.

See Also

read_fasta for reading amino acid compositions from FASTA files.

pinfo for protein-level functions (length, chemical formulas, reaction coefficients of basis species).

Examples


# Read a file with the amino acid compositions of several poliovirus protein subunits
file <- system.file("extdata/protein/POLG.csv", package = "CHNOSZ")
aa <- read.csv(file)

# Add the proteins to CHNOSZ
iprotein <- add.protein(aa)
# Calculate length and elemental formula
protein.length(iprotein)
protein.formula(iprotein)

CHNOSZ documentation built on April 23, 2025, 3 p.m.