aboutsummaryrefslogtreecommitdiff
path: root/gn3/utility/helper_functions.py
blob: f5a8b8012da2eed517b0273177724c7d7e2f7373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""module contains general helper functions """
from gn3.base.data_set import create_dataset
from gn3.base.trait import create_trait
from gn3.base.species import TheSpecies


def get_species_dataset_trait(self, start_vars):
    """function to get species dataset and trait"""
    if "temp_trait" in list(start_vars.keys()):
        if start_vars['temp_trait'] == "True":
            self.dataset = create_dataset(
                dataset_name="Temp", dataset_type="Temp", group_name=start_vars['group'])

        else:
            self.dataset = create_dataset(start_vars['dataset'])

    else:
        self.dataset = create_dataset(start_vars['dataset'])
    self.species = TheSpecies(dataset=self.dataset)

    self.this_trait = create_trait(dataset=self.dataset,
                                   name=start_vars['trait_id'],
                                   cellid=None,
                                   get_qtl_info=True)