Commit b7da4530 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

allow to retrieve more genes for metadata csv

parent f620d023
Pipeline #37730 passed with stages
in 2 minutes and 42 seconds
......@@ -88,12 +88,12 @@ class GeneViewSet(BulkViewSet):
def _build_csv_response(self):
queryset = self.filter_queryset(self.get_queryset())
queryset = queryset.select_related("taxonomy").prefetch_related("functions")
if self._check_too_many_genes(queryset):
return self.too_many_genes_error_response
# if self._check_too_many_genes(queryset):
# return self.too_many_genes_error_response
with StringIO() as csv_file:
# Write header
header = ",".join([
'gene_id', 'gene_name', 'gene_source', 'length', 'tax_id', 'tax_name', 'tax_rank', 'tax_full',
'gene_id', 'gene_name', 'gene_source', 'length', 'tax_id', 'tax_name', 'tax_rank', 'tax_full'
'kegg_id', 'eggnog_id',
])
csv_file.write(f"{header}\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment