diff options
author | AndreaGuarracino | 2020-11-15 11:36:25 +0100 |
---|---|---|
committer | AndreaGuarracino | 2020-11-15 11:36:25 +0100 |
commit | 72e77fda220e939676d10fd8505fd15517e99702 (patch) | |
tree | f1e9b36e7e68a31df5a598d57063d26c1611c295 | |
parent | ba8c23625dea3d869eab821007e8f5db2eaf9dfe (diff) | |
download | bh20-seq-resource-72e77fda220e939676d10fd8505fd15517e99702.tar.gz bh20-seq-resource-72e77fda220e939676d10fd8505fd15517e99702.tar.lz bh20-seq-resource-72e77fda220e939676d10fd8505fd15517e99702.zip |
added a check on host_age
-rw-r--r-- | scripts/create_sra_metadata/create_sra_metadata.py | 2 | ||||
-rwxr-xr-x | scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/create_sra_metadata/create_sra_metadata.py b/scripts/create_sra_metadata/create_sra_metadata.py index df77daf..83a1a60 100644 --- a/scripts/create_sra_metadata/create_sra_metadata.py +++ b/scripts/create_sra_metadata/create_sra_metadata.py @@ -179,7 +179,7 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET): elif TAG_text in ['host_age', 'host age']: if is_integer(VALUE_text): host_age = is_integer(VALUE_text) - if host_age > 0 and host_age < 110: + if host_age >= 0 and host_age < 110: info_for_yaml_dict['host']['host_age'] = host_age info_for_yaml_dict['host']['host_age_unit'] = 'http://purl.obolibrary.org/obo/UO_0000036' elif TAG_text == 'collected_by': diff --git a/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py b/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py index f9cc3fa..17b741a 100755 --- a/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py +++ b/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py @@ -311,7 +311,7 @@ for path_metadata_xxx_xml in [os.path.join(dir_metadata, name_metadata_xxx_xml) elif len(GBQualifier_value_text_list) > 2 and is_integer(GBQualifier_value_text_list[2].split(' ')[-1]): host_age = int(GBQualifier_value_text_list[2].split(' ')[-1]) - if host_age > 0 and host_age < 110: + if host_age >= 0 and host_age < 110: info_for_yaml_dict['host']['host_age'] = host_age info_for_yaml_dict['host']['host_age_unit'] = 'http://purl.obolibrary.org/obo/UO_0000036' elif len(GBQualifier_value_text_list) > 2: |