Learn R Programming

bio3d (version 2.1-2)

pdbs.filter: Filter or Trim a pdbs PDBs Object

Description

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

Usage

pdbs.filter(pdbs, row.inds=NULL, col.inds=NULL)

Arguments

pdbs
an object of class 3daling 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).

Value

  • Returns an updated pdbs PDBs object with the following components:
  • xyznumeric matrix of aligned C-alpha coordinates.
  • resnocharacter matrix of aligned residue numbers.
  • bnumeric matrix of aligned B-factor values.
  • chaincharacter matrix of aligned chain identifiers.
  • idcharacter vector of PDB sequence/structure names.
  • alicharacter matrix of aligned sequences.
  • callthe matched call.

Details

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

References

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

See Also

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

Examples

Run this code
## 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")
files <- pdbsplit(raw.files, ids, path = "raw_pdbs/split_chain")

## Sequence Alignement, and connectivity check
pdbs <- pdbaln(files)

cons <- inspect.connectivity(pdbs)

## omit files with missing residues
pdbs.filter(pdbs, row.inds=which(cons))

Run the code above in your browser using DataLab