aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/export_traits.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/wqflask/export_traits.py b/wqflask/wqflask/export_traits.py
index 3a886537..47a2000f 100644
--- a/wqflask/wqflask/export_traits.py
+++ b/wqflask/wqflask/export_traits.py
@@ -54,7 +54,7 @@ def export_search_results_csv(targs):
trait_ob = retrieve_trait_info(trait_ob, trait_ob.dataset, get_qtl_info=True)
trait_list.append(trait_ob)
- table_headers = ['Species', 'Group', 'Dataset', 'Record ID', 'Symbol', 'Description', 'ProbeTarget', 'PubMed_ID', 'Chr', 'Mb', 'Alias', 'Gene_ID', 'Homologene_ID', 'UniGene_ID', 'Strand_Probe', 'Probe_set_specificity', 'Probe_set_BLAT_score', 'Probe_set_BLAT_Mb_start', 'Probe_set_BLAT_Mb_end', 'QTL_Chr', 'QTL_Mb', 'Locus_at_Peak', 'Max_LRS', 'P_value_of_MAX', 'Mean_Expression']
+ table_headers = ['Index', 'Species', 'Group', 'Dataset', 'Record ID', 'Symbol', 'Description', 'ProbeTarget', 'PubMed_ID', 'Chr', 'Mb', 'Alias', 'Gene_ID', 'Homologene_ID', 'UniGene_ID', 'Strand_Probe', 'Probe_set_specificity', 'Probe_set_BLAT_score', 'Probe_set_BLAT_Mb_start', 'Probe_set_BLAT_Mb_end', 'QTL_Chr', 'QTL_Mb', 'Locus_at_Peak', 'Max_LRS', 'P_value_of_MAX', 'Mean_Expression']
traits_by_group = sort_traits_by_group(trait_list)
@@ -77,7 +77,7 @@ def export_search_results_csv(targs):
csv_rows.append(full_headers)
- for trait in group_traits:
+ for i, trait in enumerate(group_traits):
if getattr(trait, "symbol", None):
trait_symbol = getattr(trait, "symbol")
elif getattr(trait, "abbreviation", None):
@@ -85,6 +85,7 @@ def export_search_results_csv(targs):
else:
trait_symbol = "N/A"
row_contents = [
+ i + 1,
trait.dataset.group.species,
trait.dataset.group.name,
trait.dataset.name,