Skip to content

Commit

Permalink
change column header
Browse files Browse the repository at this point in the history
  • Loading branch information
Shang-Yang Chen committed Mar 18, 2021
1 parent b829a7e commit db81441
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion magnet_app/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def dataframe_to_dash_table(df):
'name': 'Parameters (N, K, n, k)',
}, {
'id': 'overlap_genes',
'name': 'Overlapped Genes',
'name': 'Overlapping Genes',
}],
data=df.to_dict('records'),
)
Expand Down
2 changes: 1 addition & 1 deletion magnet_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def download(request, **kwargs):
sig_dict = context.get('dash_to_django_context', 0)
sig_df = pd.DataFrame.from_dict(sig_dict)
sig_df = sig_df[['user_cluster','dataset_name','cluster_description','pval','adjusted_pval','parameters','overlap_genes']]
sig_df.columns = ['User cluster', 'Dataset', 'Dataset cluster', 'P-value', 'Adjusted P-Value (FDR)', 'Parameters (N, B, n, b)', 'Overlapped Genes']
sig_df.columns = ['User cluster', 'Dataset', 'Dataset cluster', 'P-value', 'Adjusted P-Value (FDR)', 'Parameters (N, B, n, b)', 'Overlapping Genes']
sig_df = sig_df.to_csv(index=False) # cast to csv string

# Create the HttpResponse object with the appropriate CSV header.
Expand Down

0 comments on commit db81441

Please sign in to comment.