将蛋白质数据库(PDB)坐标文件拆分为新的单独文件,每个链一个文件
# install.packages("bio3d", dependencies=TRUE)
#
options(stringsAsFactors = F)
rm(list=ls())
# setwd('D:\\SCIwork\\F26\\SOST')
library(bio3d)
## Not run:
## Save separate PDB files for each chain of a local or on-line file
pdbsplit( get.pdb("2H8L", URLonly=TRUE) )
## Split several PDBs by chain ID and multi-model records
raw.files <- get.pdb( c("1YX5", "3NOB") , URLonly=TRUE)
chain.files <- pdbsplit(raw.files, path=tempdir(), multi=TRUE)
basename(chain.files)
## Output only desired pdbID_chainID combinations
## for the last entry (1f9j), fetch all chains
ids <- c("1YX5_A", "3NOB_B", "1F9J")
raw.files <- get.pdb( ids , URLonly=TRUE)
chain.files <- pdbsplit(raw.files, ids, path=tempdir())
basename(chain.files)
因此我们将2H8L分割成三个pdb文件。
[1] "split_chain/2H8L_A.pdb" "split_chain/2H8L_B.pdb" "split_chain/2H8L_C.pdb"
网友评论