kripodb.pdb

class kripodb.pdb.PdbReport(pdbids=None, fields=None)[source]

Client for the Custom Report Web Services of the RCSB PDB website

See http://www.rcsb.org/pdb/software/wsreport.do for more information.

Parameters:
  • pdbids (List[str]) – List of pdb identifiers to fetch. Default is [‘*’] which fetches all.
  • fields – (List[str]: List of fields to fetch. Default is [‘structureTitle’, ‘compound’, ‘ecNo’, ‘uniprotAcc’, ‘uniprotRecommendedName’] See http://www.rcsb.org/pdb/results/reportField.do for possible fields.
url

str – Url of report, based on pdbids and fields.

fetch()[source]

Fetch report from PDB website

Yields:dict – Dictionary with keys same as [‘structureId’, ‘chainID’] + self.fields
kripodb.pdb.parse_csv_file(thefile)[source]

Parse csv file, yielding rows as dictionary.

The csv file should have an header.

Parameters:thefile (file) – File like object
Yields:dict – Dictionary with column header name as key and cell as value