Skip to content

Commit

Permalink
Merge pull request #3301 from antgonza/geographic-location
Browse files Browse the repository at this point in the history
geographic location (country and/or sea)
  • Loading branch information
charles-cowart authored Jun 14, 2023
2 parents 8e3f68d + 5fd627b commit d3d3966
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ Remember, metadata is the most important part for an analysis, without it we onl
6. *env_biome*, *env_feature*, *env_material*, *env_package*, for options `visit ENVO <http://ols.wordvis.com/>`__
7. *elevation*, *latitude*, *longitude*
8. *physical_specimen_location*
9. *collection_timestamp*
10. *empo_1*, *empo_2*, *empo_3*, *empo_4*, more info: :ref:`empo`
9. *collection_date*
10. *country*

.. note::
The EBI-ENA submission requires to have a *geographic location (country and/or sea)*
so during submission Qiita will automatically replace *country* to match that
requirement.

11. *empo_1*, *empo_2*, *empo_3*, *empo_4*, more info: :ref:`empo`

.. table::
:widths: auto
Expand Down
3 changes: 2 additions & 1 deletion qiita_ware/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def submit_EBI(artifact_id, action, send, test=False, test_size=False):
nunique[(nunique <= int(nsamples * .01)) |
(nunique >= int(nsamples * .5))].index)
cols_to_drop = cols_to_drop - {'taxon_id', 'scientific_name',
'description'}
'description', 'country',
'collection_date'}
all_samples = ebi_submission.sample_template.ebi_sample_accessions
samples = [k for k in ebi_submission.samples if all_samples[k] is None]
if samples:
Expand Down
3 changes: 3 additions & 0 deletions qiita_ware/ebi.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ def generate_sample_xml(self, samples=None, ignore_columns=None):

for sample_name in sorted(samples):
sample_info = dict(self.samples[sample_name])
if 'country' in sample_info.keys():
nname = 'geographic location (country and/or sea)'
sample_info[nname] = sample_info['country']

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

0 comments on commit d3d3966

Please sign in to comment.