def update_pdb_cache(self): """ get a list of pdb files, loop over them, refresh cache """ self._refresh_cache('pdb') P = PdbInfoLoader() P.get_all_rna_pdbs() for pdb_id in P.pdbs: logging.info(pdb_id) subpages = [pdb_id, pdb_id + '/motifs'] for subpage in subpages: self._refresh_cache('pdb/' + subpage)
def main(argv): """ """ Q = LoopQualityChecker() Q.start_logging() # pdbs = ['1FG0'] p = PdbInfoLoader() p.get_all_rna_pdbs() pdbs = p.pdbs Q.check_loop_quality(pdbs)
def main(argv): """ """ logging.basicConfig(level=logging.DEBUG) B = BestChainsAndModelsLoader() from PdbInfoLoader import PdbInfoLoader P = PdbInfoLoader() P.get_all_rna_pdbs() B.import_best_chains_and_models(P.pdbs)
def main(argv): """ """ logging.basicConfig(level=logging.DEBUG) R = RedundantNucleotidesLoader() # pdbs = ['1J5E', '1KOG'] from PdbInfoLoader import PdbInfoLoader P = PdbInfoLoader() P.get_all_rna_pdbs() R.import_redundant_nucleotides(P.pdbs)
def main(argv): """ """ logging.basicConfig(level=logging.DEBUG) pdbs = ['3V11', '1J5E'] from PdbInfoLoader import PdbInfoLoader p = PdbInfoLoader() p.get_all_rna_pdbs() pdbs = p.pdbs A = PairwiseInteractionsLoader() for pdb_id in pdbs: A.import_interactions([pdb_id], recalculate=True)
def setUp(self): """runs the entire pipeline""" self.success = False self.clean_up_database() m = MotifAtlasBaseClass() m.start_logging() logging.info('Initializing update') """get new pdb files""" p = PdbInfoLoader() p.get_all_rna_pdbs() """override pdb files with a smaller set""" p.pdbs = ['1FG0','1HLX'] """extract all loops and import into the database""" e = LoopExtractor() e.extract_and_import_loops(p.pdbs) """do loop QA, import into the database. Create a new loop release.""" q = LoopQualityChecker() q.check_loop_quality(p.pdbs) """import pairwise interactions annotated by FR3D""" i = PairwiseInteractionsLoader() i.import_interactions(p.pdbs) """import coordinates and distances into the database""" d = DistancesAndCoordinatesLoader() d.import_distances(p.pdbs) d.import_coordinates(p.pdbs) """import info about redundant nucleotides""" r = RedundantNucleotidesLoader() r.import_redundant_nucleotides(p.pdbs) """import best chains and models""" b = BestChainsAndModelsLoader() b.import_best_chains_and_models(p.pdbs) self.success = True
def main(argv): """ """ U = UnitIdLoader() U.start_logging() pdbs = argv if not pdbs: from PdbInfoLoader import PdbInfoLoader P = PdbInfoLoader() P.get_all_rna_pdbs() pdbs = P.pdbs try: U.import_unit_ids(pdbs, recalculate=True) except: e = sys.exc_info()[1] U.set_email_subject('Unit id update failed') U._crash(e) U.set_email_subject('Unit ids successfully updated') U.send_report()
def get_pdb_info(): """ get new pdb files, import descriptions into the database. Return an empty list if something goes wrong, then all following steps that rely on pdb_ids will be skipped. """ try: p = PdbInfoLoader() p.get_all_rna_pdbs() pdb_ids = p.pdbs p.update_rna_containing_pdbs() p.check_obsolete_structures() except: logging.warning(traceback.format_exc(sys.exc_info())) pdb_ids = [] return pdb_ids