Esempio n. 1
0
 def parameters(cls):
     parameters = [
         ParameterFactory.format(),
         ParameterFactory.snpsearch_name(required=True),
         ParameterFactory.chromosome_num(required=True),
         ParameterFactory.chromosome_start(required=True),
         ParameterFactory.chromosome_stop(required=True),
     ]
     return parameters
Esempio n. 2
0
    def process_request(cls, params_dict):
        snp_search_name = params_dict[ParameterFactory.snpsearch_name(
            required=True)]
        chromosome_num = params_dict[ParameterFactory.chromosome_num(
            required=True)]
        start_pos = params_dict[ParameterFactory.chromosome_start(
            required=True)]
        stop_pos = params_dict[ParameterFactory.chromosome_stop(required=True)]

        data = list()
        ncbi_snps = snps_in_interval_multiple(snp_search_name, chromosome_num,
                                              start_pos, stop_pos)
        for snp in ncbi_snps:
            data.append(snp)

        columns = [
            'search_name', 'rs', 'chromosome', 'loc', 'ref', 'alt', 'validated'
        ]
        return data, columns, None