@@ -285,8 +285,8 @@ def _get_base_search_query():
285
285
Organism .taxa_id ,
286
286
Organism .cto ,
287
287
)
288
- .join_from (DataAnnotation , Data , DataAnnotation . inst_data )
289
- .join_from (DataAnnotation , GenomicAnnotation , DataAnnotation . inst_genomic )
288
+ .join_from (Data , DataAnnotation , isouter = True )
289
+ .join_from (DataAnnotation , GenomicAnnotation , isouter = True )
290
290
.join_from (Data , Dataset , Data .inst_dataset )
291
291
.join_from (Dataset , DetectionTechnology , Dataset .inst_technology )
292
292
.join_from (Dataset , Organism , Dataset .inst_organism )
@@ -364,7 +364,7 @@ def _return_ensembl_query(
364
364
query = self ._add_chrom_filters (query , chrom , chrom_start , chrom_end )
365
365
if gene_filter :
366
366
query = self ._get_gene_filters (query , gene_filter , annotation )
367
- query = query .group_by (DataAnnotation . data_id )
367
+ query = query .group_by (Data . id )
368
368
369
369
length = self ._get_length (query , Data )
370
370
@@ -397,7 +397,7 @@ def _return_gene_query(
397
397
query = self ._add_chrom_filters (query , chrom , chrom_start , chrom_end )
398
398
if gene_filter :
399
399
query = self ._get_gene_filters (query , gene_filter , annotation )
400
- query = query .group_by (DataAnnotation . data_id )
400
+ query = query .group_by (Data . id )
401
401
402
402
length = self ._get_length (query , Data )
403
403
0 commit comments