def load_data(self,data_folder): xmlfiles = glob.glob(os.path.join(data_folder,"*.xml")) if not xmlfiles: self.logger.info("Unzipping drugbank archive") unzipall(data_folder) self.logger.info("Load data from '%s'" % data_folder) xmlfiles = glob.glob(os.path.join(data_folder,"*.xml")) assert len(xmlfiles) == 1, "Expecting one xml file, got %s" % repr(xmlfiles) input_file = xmlfiles.pop() assert os.path.exists(input_file), "Can't find input file '%s'" % input_file return self.exclude_fields(load_data)(input_file)
def post_dump(self, *args, **kwargs): self.logger.info("Uncompressing files in '%s'" % self.new_data_folder) unzipall(self.new_data_folder) prev = os.path.abspath(os.curdir) try: os.chdir(os.path.join(self.new_data_folder, "snpEff")) self.logger.info("Downloading snpeff databases") subprocess.check_output( ["java", "-jar", "snpEff.jar", "download", "hg19"]) subprocess.check_output( ["java", "-jar", "snpEff.jar", "download", "hg38"]) finally: os.chdir(prev)
def post_dump(self, *args, **kwargs): unzipall(self.new_data_folder)
def post_dump(self): self.logger.info("Unzipping files in '%s'" % self.new_data_folder) unzipall(self.new_data_folder)
def post_dump(self, *args, **kwargs): self.logger.info("Unzipping files in '%s'" % self.new_data_folder) unzipall(self.new_data_folder)
def post_dump(self, *args, **kwargs): unzipall(self.new_data_folder)
def post_dump(self): self.logger.info("Uncompressing files in '%s'" % self.new_data_folder) unzipall(self.new_data_folder)