pdb2aln | R Documentation |
Extract sequence from a PDB object and align it to an existing multiple sequence alignment that you wish keep intact.
pdb2aln(aln, pdb, id="seq.pdb", aln.id=NULL, file="pdb2aln.fa", ...)
aln |
an alignment list object with |
pdb |
the PDB object to be added to |
id |
name for the PDB sequence in the generated new alignment. |
aln.id |
id of the sequence in |
file |
output file name for writing the generated new alignment. |
... |
additional arguments passed to |
The basic effect of this function is to add a PDB sequence to an existing
alignement. In this case, the function is simply a wrapper of
seq2aln
.
The more advanced (and also more useful) effect is giving complete mappings
from the column indices of the original alignment (aln$ali
) to
atomic indices of equivalent C-alpha atoms in the pdb
. These mappings
are stored in the output list (see below 'Value' section). This feature
is better illustrated in the function pdb2aln.ind
, which
calls pdb2aln
and directly returns atom selections given a set of
alignment positions. (See pdb2aln.ind
for details. )
When aln.id
is provided, the function will do pairwise alignment
between the sequence from pdb
and the sequence in aln
with id matching aln.id
. This is the best way to use the
function if the protein has an identical or very similar sequence
to one of the sequences in aln
.
Return a list object of the class 'fasta' containing three components:
id |
sequence names as identifers. |
ali |
an alignment character matrix with a row per sequence and a column per equivalent aminoacid/nucleotide. |
ref |
an integer 2xN matrix, where N is the number of columns of
the new alignment |
Xin-Qiu Yao & Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
seqaln
, seq2aln
,
seqaln.pair
, pdb2aln.ind
## Not run:
##--- Read aligned PDB coordinates (CA only)
aln <- read.fasta(system.file("examples/kif1a.fa",package="bio3d"))
pdbs <- read.fasta.pdb(aln)
##--- Read PDB coordinate for a new structure (all atoms)
id <- get.pdb("2kin", URLonly=TRUE)
pdb <- read.pdb(id)
# add pdb to the alignment
naln <- pdb2aln(aln=pdbs, pdb=pdb, id=id)
naln
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.