Filename dialogue includes gene sets (#2185)

* change filenames

* gene-sets to anno dialogue

* logging, lambda

* celllabels

* cell dash labels

* space

* fix 2182 - annotation file name change on the backend

Co-authored-by: bkmartinjr <bruce@chanzuckerberg.com>
This commit is contained in:
Colin Megill
2021-05-07 17:32:11 -04:00
committed by GitHub
co-authored by bkmartinjr
parent 096d8ff1d2
commit d04dba225f
2 changed files with 13 additions and 7 deletions
@@ -197,14 +197,14 @@ class AnnotationsLocalFile(Annotations):
if self.label_output_file:
return self.label_output_file
return self._get_filename(data_adaptor, "celllabels")
return self._get_filename(data_adaptor, "cell-labels")
def _get_genesets_filename(self, data_adaptor):
""" return the current gene sets file name """
if self.gene_sets_output_file:
return self.gene_sets_output_file
return self._get_filename(data_adaptor, "genesets")
return self._get_filename(data_adaptor, "gene-sets")
def _get_filename(self, data_adaptor, anno_name):
# we need to generate a file name, which we can only do if we have a UID and collection name
@@ -112,7 +112,7 @@ class FilenameDialog extends React.Component {
userInfo.is_authenticated ? (
<Dialog
icon="tag"
title="Annotations Collection"
title="User Generated Data Directory"
isOpen={!annotations.dataCollectionName}
onClose={this.dismissFilenameDialog}
>
@@ -124,7 +124,7 @@ class FilenameDialog extends React.Component {
>
<div className={Classes.DIALOG_BODY} data-testid="annotation-dialog">
<div style={{ marginBottom: 20 }}>
<p>Name your annotations collection:</p>
<p>Name your user generated data directory:</p>
<InputGroup
autoFocus
value={filenameText}
@@ -149,9 +149,15 @@ class FilenameDialog extends React.Component {
</div>
<div>
<p>
Your annotations are stored in this file:
{"Your annotations are stored in this file: "}
<Code>
{filenameText}-{idhash}.csv
{filenameText}-cell-labels-{idhash}.csv
</Code>
</p>
<p>
{"Your gene sets are stored in this file: "}
<Code>
{filenameText}-gene-sets-{idhash}.csv
</Code>
</p>
<p style={{ fontStyle: "italic" }}>
@@ -171,7 +177,7 @@ class FilenameDialog extends React.Component {
type="submit"
data-testid="submit-annotation"
>
Create annotations collection
Create user generated data directory
</Button>
</div>
</div>