Filter or Trim a PDBs Object

Usage

"trim"(pdbs, row.inds=NULL, col.inds=NULL, ...)

Arguments

pdbs
an object of class pdbs as obtained from function pdbaln or read.fasta.pdb; a xyz matrix containing the cartesian coordinates of C-alpha atoms.
row.inds
a numeric vector of indices pointing to the PDB structures to keep (rows in the pdbs$ali matrix).
col.inds
a numeric vector of indices pointing to the alignment columns to keep (columns in the pdbs$ali matrix).
...
additional arguments passed to and from functions.

Description

Trim residues and/or filter out structures from a PDBs object.

Details

Utility function to remove structures, or trim off columns, in a ‘pdbs’ object.

Value

Returns an updated ‘pdbs’ object with the following 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.

call
the matched call.

References

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

Examples

## Fetch PDB files and split to chain A only PDB files ids <- c("1a70_A", "1czp_A", "1frd_A", "1fxi_A", "1iue_A", "1pfd_A") raw.files <- get.pdb(ids, path = "raw_pdbs")
Warning message: raw_pdbs/1a70.pdb exists. Skipping download Warning message: raw_pdbs/1czp.pdb exists. Skipping download Warning message: raw_pdbs/1frd.pdb exists. Skipping download Warning message: raw_pdbs/1fxi.pdb exists. Skipping download Warning message: raw_pdbs/1iue.pdb exists. Skipping download Warning message: raw_pdbs/1pfd.pdb exists. Skipping download
files <- pdbsplit(raw.files, ids, path = "raw_pdbs/split_chain")
|======================================================================| 100%
## Sequence Alignement, and connectivity check pdbs <- pdbaln(files)
Reading PDB files: raw_pdbs/split_chain/1a70_A.pdb raw_pdbs/split_chain/1czp_A.pdb raw_pdbs/split_chain/1frd_A.pdb raw_pdbs/split_chain/1fxi_A.pdb raw_pdbs/split_chain/1iue_A.pdb raw_pdbs/split_chain/1pfd_A.pdb . PDB has ALT records, taking A only, rm.alt=TRUE ..... Extracting sequences pdb/seq: 1 name: raw_pdbs/split_chain/1a70_A.pdb pdb/seq: 2 name: raw_pdbs/split_chain/1czp_A.pdb PDB has ALT records, taking A only, rm.alt=TRUE pdb/seq: 3 name: raw_pdbs/split_chain/1frd_A.pdb pdb/seq: 4 name: raw_pdbs/split_chain/1fxi_A.pdb pdb/seq: 5 name: raw_pdbs/split_chain/1iue_A.pdb pdb/seq: 6 name: raw_pdbs/split_chain/1pfd_A.pdb
cons <- inspect.connectivity(pdbs) ## omit files with missing residues trim.pdbs(pdbs, row.inds=which(cons))
1 . . . . 50 [Truncated_Name:1]1a70_A.pdb AAYKVTL--VTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCA [Truncated_Name:2]1czp_A.pdb ATFKVTLINEAEGTKHEIEVPDDEYILDAAEEQGYDLPFSCRAGACSTCA [Truncated_Name:3]1frd_A.pdb ASYQVRLINKKQDIDTTIEIDEETTILDGAEENGIELPFSCHSGSCSSCV [Truncated_Name:4]1fxi_A.pdb ASYKVTL--KTPDGDNVITVPDDEYILDVAEEEGLDLPYSCRAGACSTCA [Truncated_Name:5]1iue_A.pdb AFYNITL--RTNDGEKKIECNEDEYILDASERQNVELPYSCRGGSCSTCA [Truncated_Name:6]1pfd_A.pdb ATYNVKL--ITPDGEVEFKCDDDVYVLDQAEEEGIDIPYSCRAGSCSSCA * ^ ^ * ^^ ^** * ^^*^**^ * **^* 1 . . . . 50 51 . . . . 100 [Truncated_Name:1]1a70_A.pdb GKLKTGSLNQDDQSFLDDDQIDEGWVLTCAAYPVSDVTIETHKKEELTA- [Truncated_Name:2]1czp_A.pdb GKLVSGTVDQSDQSFLDDDQIEAGYVLTCVAYPTSDVVIQTHKEEDLY-- [Truncated_Name:3]1frd_A.pdb GKVVEGEVDQSDQIFLDDEQMGKGFALLCVTYPRSNCTIKTHQEPYLA-- [Truncated_Name:4]1fxi_A.pdb GKLVSGPAPDEDQSFLDDDQIQAGYILTCVAYPTGDCVIETHKEEALY-- [Truncated_Name:5]1iue_A.pdb AKLVEGEVDNDDQSYLDEEQIKKKYILLCTCYPKSDCVIETHKEDELHDM [Truncated_Name:6]1pfd_A.pdb GKVVSGSIDQSDQSFLDDEQMDAGYVLTCHAYPTSDVVIETHKEEEIV-- ^*^ * ** ^**^^*^ ^ * * ** * ** ^ 51 . . . . 100 Call: trim.pdbs(pdbs = pdbs, row.inds = which(cons)) Class: pdbs, fasta Alignment dimensions: 6 sequence rows; 100 position columns (96 non-gap, 4 gap) + attr: id, xyz, resno, b, chain, ali, resid, sse, call

See also

pdbaln, gap.inspect, read.fasta,read.fasta.pdb, trim.pdb,

Author

Lars Skjaerven