示例#1
0
	def __init__(self):		
		# go through each database directory and create custom_data if it does not exist.
		for db_ver,db_dir in sett["data_dir"].items():
			# create all directories in the custom_data dir if they do not already exist
			for org in self.get_org(db_ver):
				custom_dir = os.path.join(os.path.split(db_dir)[0],"custom_data")
				logger.info("Processing genomic features for {}".format(org))
				if not os.path.exists(custom_dir): os.mkdir(custom_dir)
				cust_sub_dir = ["backgrounds","gfs","fois","rsid_conversion"]
				for c in cust_sub_dir:
					tmp = os.path.join(custom_dir,c)
					if not os.path.exists(tmp): os.mkdir(tmp)
					c_dir = os.path.join(custom_dir,c,org)
					if not os.path.exists(c_dir): os.mkdir(c_dir)
				# Read the genomic feature files and generate html files
				paths = PathNode()
				paths.name = "Root"
				paths.organisms = self.get_org(db_ver) 
				paths.traverse(os.path.join(db_dir,org))
				paths.write_treeview_html(db_dir,org)
		self._index_html = {}
示例#2
0
 def __init__(self):
     # go through each database directory and create custom_data if it does not exist.
     for db_ver, db_dir in sett["data_dir"].items():
         # create all directories in the custom_data dir if they do not already exist
         for org in self.get_org(db_ver):
             custom_dir = os.path.join(
                 os.path.split(db_dir)[0], "custom_data")
             logger.info("Processing genomic features for {}".format(org))
             if not os.path.exists(custom_dir): os.mkdir(custom_dir)
             cust_sub_dir = [
                 "backgrounds", "gfs", "fois", "rsid_conversion"
             ]
             for c in cust_sub_dir:
                 tmp = os.path.join(custom_dir, c)
                 if not os.path.exists(tmp): os.mkdir(tmp)
                 c_dir = os.path.join(custom_dir, c, org)
                 if not os.path.exists(c_dir): os.mkdir(c_dir)
             # Read the genomic feature files and generate html files
             paths = PathNode()
             paths.name = "Root"
             paths.organisms = self.get_org(db_ver)
             paths.traverse(os.path.join(db_dir, org))
             paths.write_treeview_html(db_dir, org)
     self._index_html = {}