From 3165a31e321cbf4641f9afdcbea511ee66f673bb Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Fri, 28 Aug 2020 11:16:24 +0200 Subject: added control (locally and in the validation) that sample_id has to be the same in the metadata and in the FASTA header #103 --- scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/download_genbank_data') 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 8ef76e1..8f765d7 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 @@ -412,6 +412,8 @@ for path_metadata_xxx_xml in [os.path.join(dir_metadata, name_metadata_xxx_xml) not_created_accession_dict[accession_version].append('host_species not found') if len(GBSeq_sequence.text) < min_len_to_count: + if accession_version not in not_created_accession_dict: + not_created_accession_dict[accession_version] = [] not_created_accession_dict[accession_version].append('sequence shorter than {} bp'.format(min_len_to_count)) if accession_version not in not_created_accession_dict: -- cgit v1.2.3