diff --git a/ASB_app/routes/parsers.py b/ASB_app/routes/parsers.py index b360c1a..ce86fbd 100644 --- a/ASB_app/routes/parsers.py +++ b/ASB_app/routes/parsers.py @@ -18,7 +18,7 @@ pagination_parser.add_argument('order_by', help='ORDER BY criterion: "field1", "-field2"') search_parser = pagination_parser.copy() - search_parser.add_argument('cell_types', action='split', help='Comma-separated list of cell types, search SNPs ASB for every cell type scpecified') + search_parser.add_argument('cell_types', help='Comma-separated list of cell types, search SNPs ASB for every cell type scpecified') search_parser.add_argument('transcription_factors', action='split', help='Comma-separated list of cell types, search SNPs ASB for every cell type scpecified') search_parser.add_argument('chromosome', choices=chromosomes, help='Search only SNPs on the specified chromosome') search_parser.add_argument('start', type=inputs.positive, help='Search SNPs in interval from specified position, Requires "chromosome" and "end"') diff --git a/ASB_app/service/adastra_service.py b/ASB_app/service/adastra_service.py index e13acff..1fd154b 100644 --- a/ASB_app/service/adastra_service.py +++ b/ASB_app/service/adastra_service.py @@ -104,11 +104,12 @@ def construct_advanced_filters(self, filters_object): for tf_name in filters_object['transcription_factors']] if filters_object['cell_types']: + print(filters_object['cell_types'].split('@')) filters += [self.SNP.cl_aggregated_snps.any( self.CellLineSNP.cl_id == getattr(self.CellLine.query.filter( - self.CellLine.name == cl_name + self.CellLine.name == cl_name.strip() ).one_or_none(), 'cl_id', None)) - for cl_name in filters_object['cell_types']] + for cl_name in filters_object['cell_types'].split('@')] if filters_object['chromosome']: if not filters_object['start'] or not filters_object['end']: