aboutsummaryrefslogtreecommitdiff
path: root/scripts/download_genbank_data
diff options
context:
space:
mode:
authorAndreaGuarracino2020-11-15 14:23:09 +0100
committerAndreaGuarracino2020-11-15 14:23:09 +0100
commitd9165d64840daca222305a6bf8d414a77a3cff21 (patch)
treec6d8d37d108f52e17eb856de365267288593f585 /scripts/download_genbank_data
parent7fc06d04a04a1737ae8b52f2e08c6698a8e5c721 (diff)
downloadbh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.tar.gz
bh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.tar.lz
bh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.zip
fix sequencing_coverage
Diffstat (limited to 'scripts/download_genbank_data')
-rwxr-xr-xscripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py3
1 files changed, 2 insertions, 1 deletions
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 17b741a..788f7e9 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
@@ -225,7 +225,8 @@ for path_metadata_xxx_xml in [os.path.join(dir_metadata, name_metadata_xxx_xml)
# A regular expression would be better!
try:
info_for_yaml_dict['technology'][field_in_yaml] = [
- float(tech_info_to_parse.strip('(average)').strip("reads/nt").strip('(average for 6 sequences)').replace(',', '.').strip(' xX>'))
+ float(tech_info_to_parse.replace('(average)', '').replace("reads/nt", '').
+ replace('(average for 6 sequences)', '').replace(',', '.').strip(' xX>'))
]
except ValueError:
print(accession_version, "Couldn't make sense of Coverage '%s'" % tech_info_to_parse)