def main(argv): """ RNA 3D Hub update entry point. """ try: m = MotifAtlasBaseClass() m.start_logging() pdb_ids = get_pdb_info() update_loops(pdb_ids) update_pairwise_annotations(pdb_ids) update_unit_ids(pdb_ids) update_unit_ordering(pdb_ids) update_coordinates(pdb_ids) update_redundant_nucleotides(pdb_ids) update_best_chains_and_models(pdb_ids) # must follow best chain and model update cluster_motifs('IL') import_motifs('IL') cluster_motifs('HL') import_motifs('HL') # must follow motif clustering update_loop_annotations() # must follow unit id updates export_data(pdb_ids) # TODO annotate all pdb files with motifs # TODO compute new non-redundant lists, import into the database update_cache() logging.info('Update completed') m.send_report() except: try: logging.critical('Update failed') logging.critical(traceback.format_exc(sys.exc_info())) m.set_email_subject('RNA 3D Hub update failed') m.send_report() except: pass
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