def handle(self, *args, **options): updated = [] update_failed = [] if not options["skip_gencode"]: # Download latest version first, and then add any genes from old releases not included in the latest release # Old gene ids are used in the gene constraint table and other datasets, as well as older sequencing data update_gencode(31, reset=True) update_gencode(29) update_gencode(28) update_gencode(27) update_gencode(19) updated.append('gencode') if not options["skip_omim"]: if not options["omim_key"]: raise CommandError( "Please provide --omim-key or use --skip-omim") try: update_records(OmimReferenceDataHandler(options["omim_key"])) updated.append('omim') except Exception as e: logger.error("unable to update omim: {}".format(e)) update_failed.append('omim') for source, data_handler in REFERENCE_DATA_SOURCES.items(): if not options["skip_{}".format(source)]: try: if data_handler: update_records(data_handler()) elif source == "hpo": update_hpo() updated.append(source) except Exception as e: logger.error("unable to update {}: {}".format(source, e)) update_failed.append(source) logger.info("Done") if updated: logger.info("Updated: {}".format(', '.join(updated))) if update_failed: logger.info("Failed to Update: {}".format( ', '.join(update_failed)))
def handle(self, *args, **options): updated = [] update_failed = [] if not options["skip_gencode"]: # Download latest version first, and then add any genes from old releases not included in the latest release # Old gene ids are used in the gene constraint table and other datasets, as well as older sequencing data update_gencode(29, reset=True) update_gencode(28) update_gencode(27) update_gencode(19) updated.append('gencode') if not options["skip_omim"]: if not options["omim_key"]: raise CommandError("Please provide --omim-key or use --skip-omim") try: update_records(OmimReferenceDataHandler(options["omim_key"])) updated.append('omim') except Exception as e: logger.error("unable to update omim: {}".format(e)) update_failed.append('omim') for source, data_handler in REFERENCE_DATA_SOURCES.items(): if not options["skip_{}".format(source)]: try: if data_handler: update_records(data_handler()) elif source == "hpo": update_hpo() updated.append(source) except Exception as e: logger.error("unable to update {}: {}".format(source, e)) update_failed.append(source) logger.info("Done") if updated: logger.info("Updated: {}".format(', '.join(updated))) if update_failed: logger.info("Failed to Update: {}".format(', '.join(update_failed)))
def handle(self, *args, **options): if not options["skip_gencode"]: # download v19 and then v27 and then v28 because there are 1000+ gene and transcript ids in v19 that # gencode retired by the time of v28, but that are used in the gene constraint table and other datasets # and also ~100 genes and transcripts that were retired between v27 and v28 update_gencode(19, reset=True) update_gencode(27) update_gencode(28) if not options["skip_dbnsfp_gene"]: update_dbnsfp_gene() if not options["skip_gene_constraint"]: try: update_gene_constraint() except Exception as e: logger.error("unable to update gene constraint: {}".format(e)) if not options["skip_omim"]: if not options["omim_key"]: raise CommandError( "Please provide --omim-key or use --skip-omim") try: update_omim(omim_key=options["omim_key"]) except Exception as e: logger.error("unable to update omim: {}".format(e)) if not options["skip_hpo"]: try: update_hpo() except Exception as e: logger.error( "unable to update human phenotype ontology: {}".format(e)) if not options["skip_gtex"]: try: update_gtex() except Exception as e: logger.error("unable to update gtex: {}".format(e))