read.all {bio3d}R Documentation

Read Aligned Structure Data

Description

Read aligned PDB structures and store their equalvalent atom data, including xyz coordinates, residue numbers, residue type and B-factors.

Usage

read.all(aln, pdb.path = "./", pdbext = ".pdb", sel = NULL)

Arguments

aln an alignment data structure obtained with read.fasta.
pdb.path path to PDB files.
pdbext the file name extention of the PDB files.
sel a selection string detailing the atom type data to store (see function store.atom)

Details

The input aln, produced with read.fasta, must have identifers (i.e. sequence names) that match the PDB file names. For example the sequence corresponding to the structure “1bg2.pdb” should have the identifer ‘1bg2’. See examples below.

Sequence miss-matches will generate errors. Thus, care should be taken to ensure that the sequences in the alignment match the sequences in their associated PDB files.

Value

Returns a list of class "3dalign" with the following five components:

xyz numeric matrix of aligned C-alpha coordinates.
resno character matrix of aligned residue numbers.
b numeric matrix of aligned B-factor values.
chain character matrix of aligned chain identifiers.
id character vector of PDB sequence/structure names.
ali character matrix of aligned sequences.
all numeric matrix of aligned equalvelent atom coordinates.
all.elety numeric matrix of aligned atom element types.
all.resid numeric matrix of aligned three-letter residue codes.
all.resno numeric matrix of aligned residue numbers.

Note

This function is still in development and is NOT part of the offical bio3d package.

The sequence character ‘X’ is useful for masking unusual or unknown residues, as it can match any other residue type.

Author(s)

Barry Grant

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

See Also

read.fasta, read.pdb, core.find, fit.xyz

Examples

# still working on speeding this guy up
## Not run: 
# Read sequence alignment
file <- system.file("examples/kif1a.fa",package="bio3d")
aln  <- read.fasta(file)

# Read aligned PDBs
pdb.path = system.file("examples",package="bio3d")
sel <- c("N", "CA", "C", "O", "CB", "*G", "*D",  "*E", "*Z")
pdbs <- read.all(aln, pdb.path = pdb.path, pdbext = ".ent", sel=sel)

#pdbs$all[,(colnames(pdbs$all)=="CA")] == pdbs$xyz

#atm <- rep( rep(sel,each=3), ncol(aln$ali))
#colnames(pdbs$all) == atm

#ca.ind  <- which(atm == "CA")
#core.ind <- c( matrix(ca.ind, nrow=3)[,core$c0.5A.atom] )

## End(Not run)


[Package bio3d version 1.0-6 Index]