Skip to content
Permalink
ab6f883dd1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
30 lines (23 sloc) 1.13 KB
from Modules.Ensembl.ActivityTable import ActivityTable
from Modules.Ensembl.FTPHandling.VersionChecker import EnsemblRegulationFTPRetriever as FTPRetriever
from Modules.Ensembl.ActivityCategorizer import ActivityCategorizer
from Modules.Ensembl.GTFGen import GTFGen
class Ensembl:
"""
Main class for handling Ensembl Regulatory data
Checks for local files and downloads if files are missing
"""
def __init__(self, organism, wd, data_dir):
print("Starting Ensembl")
self.updater = FTPRetriever(organism, wd, data_dir)
self.release = self.updater.get_release()
self.acttable = ActivityTable(organism, self.release, wd, data_dir)
self.acttable.check_and_generate_activity_table()
self.categorizer = ActivityCategorizer(self.release, organism, wd, data_dir)
print("Generating GTF")
self.gtf_generator = GTFGen(organism, self.release, wd, data_dir)
print("Ensembl Finished !")
def get_gtf(self):
return self.gtf_generator.get_gtf(self.release, self.categorizer.get_categorization())
#e = Ensembl("homo_sapiens")
#print(len(e.categorizer.categorization))