aa2mass | R Documentation |
Convert a sequence of amino acid residue names to mass.
aa2mass(pdb, inds=NULL, mass.custom=NULL, addter=TRUE, mmtk=FALSE)
pdb |
a character vector containing the atom names to convert
to atomic masses. Alternatively, a object of type |
inds |
atom and xyz coordinate indices obtained from |
mass.custom |
a list of amino acid residue names and their corresponding masses. |
addter |
logical, if TRUE terminal atoms are added to final masses. |
mmtk |
logical, if TRUE use the exact aminoacid residue masses as provided with the MMTK database (for testing purposes). |
This function converts amino acid residue names to their corresponding
masses. In the case of a non-standard amino acid residue name
mass.custom
can be used to map the residue to the correct
mass. User-defined amino acid masses (with argument mass.custom
)
will override mass entries obtained from the database.
See examples for more details.
Returns a numeric vector of masses.
When object of type pdb
is provided, non-calpha atom records
are omitted from the selection.
Lars Skjaerven
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
atom.index
, atom2mass
,
aa.index
resi.names <- c("LYS", "ALA", "CYS", "HIS")
masses <- aa2mass(resi.names, addter=FALSE)
## Not run:
## Fetch atomic masses in a PDB object
pdb <- read.pdb("3dnd")
masses <- aa2mass(pdb)
## or
masses <- aa2mass(pdb$atom[1:10,"resid"])
## Dealing with unconventional residues
#pdb <- read.pdb("1xj0")
#mass.cust <- list("CSX"=122.166)
#masses <- aa2mass(pdb, mass.custom=mass.cust)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.