Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Aug 5, 2023
1 parent a412b45 commit 91fd75a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions qiita_db/metadata_template/prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ def create(cls, md_template, study, data_type, investigation_type=None,
If a required column is missing in md_template
"""
with qdb.sql_connection.TRN:
# If the investigation_type is supplied, make sure it is one of
# the recognized investigation types
if investigation_type is not None:
cls.validate_investigation_type(investigation_type)
# If the investigation_type is None let's add it based on the
# data_type being created
if investigation_type is None:
if data_type in {'16S', '18S', '|ITS'}:
investigation_type = 'Amplicon'
elif data_type == 'Metagenomic':
investigation_type = 'WGS'
elif data_type == 'Metatranscriptomic':
investigation_type = 'RNA-Seq'
cls.validate_investigation_type(investigation_type)

# Check if the data_type is the id or the string
if isinstance(data_type, int):
Expand Down

0 comments on commit 91fd75a

Please sign in to comment.