def __init__(self, study, config_properties=None): self.study = study self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.snp_dir = self.properties.snp_dir assert study is not None, "You must specify a study to delete a study!"
def __init__(self, snp, start, size, config_properties=None, chromosome=None): self.snp = snp self.chromosome = chromosome self.start = start self.size = size self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.chr_dir = self.properties.chr_dir self.snp_dir = self.properties.snp_dir self.bp_step = self.properties.bp_step self.datasets = utils.create_dictionary_of_empty_dsets(TO_QUERY_DSETS) self.index_marker = 0 if chromosome is None: self.service = self._calculate_snp_service() else: self.service = self._get_snp_service()
def __init__(self, config_properties=None): self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.study_dir = self.properties.study_dir self.trait_dir = self.properties.trait_dir self.sqlite_db = self.properties.sqlite_path self.trait_file = os.path.join(self.search_path, self.trait_dir, "file_phen_meta.sqlite")
def __init__(self, start, size, config_properties=None): self.starting_point = start self.start = start self.size = size self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.trait_dir = self.properties.trait_dir self.datasets = utils.create_dictionary_of_empty_dsets(TO_QUERY_DSETS) # index marker will be returned along with the datasets # it is the number that when added to the 'start' value that we started the query with # will pinpoint where the next search needs to continue from self.index_marker = self.search_traversed = 0
def __init__(self, start, size, pval_interval=None, config_properties=None, study=None, chromosome=None, bp_interval=None, trait=None, gene=None, tissue=None, snp=None, quant_method=None, qtl_group=None, paginate=True): self.starting_point = start self.start = start self.max_size = 1000 self.size = size if int(size) <= self.max_size else self.max_size self.study = study self.pval_interval = pval_interval self.chromosome = chromosome self.bp_interval = bp_interval self.trait = trait self.gene = gene self.tissue = tissue if qtl_group is None else None # doesn't make sense to allow tissue and qtl group to be specified self.snp = snp self.qtl_group = qtl_group self.quant_method = quant_method if quant_method else "ge" self.paginate = paginate self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.study_dir = self.properties.study_dir self.chr_dir = self.properties.chr_dir self.trait_dir = self.properties.trait_dir self.database = self.properties.sqlite_path self.snpdb = self.properties.snpdb self.trait_file = os.path.join(self.search_path, self.trait_dir, "file_phen_meta.sqlite") self.hdfs = [] self.search_dir = None self.datasets = None #utils.create_dictionary_of_empty_dsets(TO_QUERY_DSETS) # index marker will be returned along with the datasets # it is the number that when added to the 'start' value that we started the query with # will pinpoint where the next search needs to continue from self.index_marker = self.search_traversed = 0 self.df = pd.DataFrame() logger.debug("quant: ".format(self.quant_method))
def __init__(self, chromosome, start, size, config_properties=None): self.chromosome = chromosome self.start = start self.size = size self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.chr_dir = self.properties.chr_dir self.datasets = utils.create_dictionary_of_empty_dsets(TO_QUERY_DSETS) self.index_marker = 0 self.h5file = fsutils.create_h5file_path(path=self.search_path, dir_name=self.chr_dir, file_name=chromosome) if not os.path.isfile(self.h5file): raise NotFoundError("Chromosome " + str(chromosome)) self.service = chromosome_service.ChromosomeService(self.h5file)
def __init__(self, trait, start, size, config_properties=None): self.trait = trait self.start = start self.size = size self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.trait_dir = self.properties.trait_dir self.datasets = utils.create_dictionary_of_empty_dsets(TO_QUERY_DSETS) # index marker will be returned along with the datasets # it is the number that when added to the 'start' value that we started the query with # will pinpoint where the next search needs to continue from self.index_marker = 0 self.h5file = fsutils.create_h5file_path(self.search_path, dir_name=self.trait_dir, file_name=trait) if not os.path.isfile(self.h5file): raise NotFoundError("Trait " + trait) self.service = study_service.StudyService(self.h5file)
def __init__(self, study, config_properties=None): self.properties = properties_handler.get_properties(config_properties) self.study = study
def __init__(self, config_properties=None): self.properties = properties_handler.get_properties(config_properties) self.search_path = properties_handler.get_search_path(self.properties) self.trait_dir = self.properties.trait_dir