Skip to content

Commit 0447a68

Browse files
committed
geographic location (country and/or sea)
1 parent 8e3f68d commit 0447a68

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

qiita_pet/support_files/doc/source/checklist-for-ebi-ena-submission.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,15 @@ Remember, metadata is the most important part for an analysis, without it we onl
7676
6. *env_biome*, *env_feature*, *env_material*, *env_package*, for options `visit ENVO <http://ols.wordvis.com/>`__
7777
7. *elevation*, *latitude*, *longitude*
7878
8. *physical_specimen_location*
79-
9. *collection_timestamp*
80-
10. *empo_1*, *empo_2*, *empo_3*, *empo_4*, more info: :ref:`empo`
79+
9. *collection_date*
80+
10. *country*
81+
82+
.. note::
83+
The EBI-ENA submission requires to have *geographic location (country and/or sea)*
84+
so during submission Qiita will automatically replace *country* to match that
85+
requirement.
86+
87+
11. *empo_1*, *empo_2*, *empo_3*, *empo_4*, more info: :ref:`empo`
8188

8289
.. table::
8390
:widths: auto

qiita_ware/commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def submit_EBI(artifact_id, action, send, test=False, test_size=False):
229229
nunique[(nunique <= int(nsamples * .01)) |
230230
(nunique >= int(nsamples * .5))].index)
231231
cols_to_drop = cols_to_drop - {'taxon_id', 'scientific_name',
232-
'description'}
232+
'description', 'country',
233+
'collection_date'}
233234
all_samples = ebi_submission.sample_template.ebi_sample_accessions
234235
samples = [k for k in ebi_submission.samples if all_samples[k] is None]
235236
if samples:

qiita_ware/ebi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ def generate_sample_xml(self, samples=None, ignore_columns=None):
402402

403403
for sample_name in sorted(samples):
404404
sample_info = dict(self.samples[sample_name])
405+
if 'country' in sample_info.keys():
406+
nname = 'geographic location (country and/or sea)'
407+
sample_info[nname] = sample_info['country']
405408

406409
sample_accession = self._ebi_sample_accessions[sample_name]
407410
if self.action in ('ADD', 'VALIDATE'):

0 commit comments

Comments
 (0)