get.pdb.Rd
Downloads PDB coordinate files from the RCSB Protein Data Bank.
get.pdb(ids, path = ".", URLonly=FALSE, overwrite = FALSE, gzip = FALSE, split = FALSE, format = "pdb", verbose = TRUE, ncore = 1, ...)
ids | A character vector of one or more 4-letter PDB codes/identifiers or 6-letter PDB-ID_Chain-ID of the files to be downloaded, or a ‘blast’ object containing ‘pdb.id’. |
---|---|
path | The destination path/directory where files are to be written. |
URLonly | logical, if TRUE a character vector containing the URL path to the online file is returned and files are not downloaded. If FALSE the files are downloaded. |
overwrite | logical, if FALSE the file will not be downloaded if it alread exist. |
gzip | logical, if TRUE the gzipped PDB will be downloaded and extracted locally. |
split | logical, if TRUE |
format | format of the data file: ‘pdb’ or ‘cif’ for PDB and mmCIF file formats, respectively. |
verbose | print details of the reading process. |
ncore | number of CPU cores used to do the calculation.
|
... | extra arguments passed to |
This is a basic function to automate file download from the PDB.
Returns a list of successfully downloaded files. Or optionally if URLonly is TRUE a list of URLs for said files.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
For a description of PDB format (version3.3) see:
http://www.wwpdb.org/documentation/format33/v3.3.html.
Barry Grant
# \donttest{ # PDB server connection required - testing excluded ## PDB file paths get.pdb( c("1poo", "1moo"), URLonly=TRUE )#> [1] "https://files.rcsb.org/download/1poo.pdb" #> [2] "https://files.rcsb.org/download/1moo.pdb"#> #> Call: read.pdb(file = get.pdb("5p21", URL = TRUE)) #> #> Total Models#: 1 #> Total Atoms#: 1567, XYZs#: 4701 Chains#: 1 (values: A) #> #> Protein Atoms#: 1323 (residues/Calpha atoms#: 166) #> Nucleic acid Atoms#: 0 (residues/phosphate atoms#: 0) #> #> Non-protein/nucleic Atoms#: 244 (residues: 213) #> Non-protein/nucleic resid values: [ GNP (1), HOH (211), MG (1) ] #> #> + attr: atom, xyz, seqres, helix, sheet, #> calpha, remark, call## Download PDB file ## get.pdb("5p21") # }