Пример #1
0
from db import webqtlDatabaseFunction
from utility import webqtlUtil
from utility.benchmark import Bench
from utility import chunks
from utility.tools import locate, locate_ignore_error, flat_files

from maintenance import get_group_samplelists

from MySQLdb import escape_string as escape
from pprint import pformat as pf
from db.gn_server import menu_main
from db.call import fetchall,fetchone,fetch1

from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists
from utility.logger import getLogger
logger = getLogger(__name__ )

# Used by create_database to instantiate objects
# Each subclass will add to this
DS_NAME_MAP = {}

def create_dataset(dataset_name, dataset_type = None, get_samplelist = True, group_name = None):
    if not dataset_type:
        dataset_type = Dataset_Getter(dataset_name)
        logger.debug("dataset_type", dataset_type)

    dataset_ob = DS_NAME_MAP[dataset_type]
    dataset_class = globals()[dataset_ob]
    if dataset_type == "Temp":
        return dataset_class(dataset_name, get_samplelist, group_name)
    else:
Пример #2
0
from base import webqtlConfig
from base import webqtlCaseData
from wqflask.show_trait.SampleList import SampleList
from utility import webqtlUtil, Plot, Bunch, helper_functions
from base.trait import GeneralTrait
from base import data_set
from db import webqtlDatabaseFunction
from basicStatistics import BasicStatisticsFunctions

from pprint import pformat as pf

from utility.tools import flat_files, flat_file_exists
from utility.tools import get_setting

from utility.logger import getLogger
logger = getLogger(__name__ )

###############################################
#
# Todo: Put in security to ensure that user has permission to access confidential data sets
# And add i.p.limiting as necessary
#
##############################################

class ShowTrait(object):

    def __init__(self, kw):
        logger.debug("in ShowTrait, kw are:", kw)

        if 'trait_id' in kw and kw['dataset'] != "Temp":
            self.temp_trait = False