diff options
author | AndreaGuarracino | 2020-11-15 14:23:09 +0100 |
---|---|---|
committer | AndreaGuarracino | 2020-11-15 14:23:09 +0100 |
commit | d9165d64840daca222305a6bf8d414a77a3cff21 (patch) | |
tree | c6d8d37d108f52e17eb856de365267288593f585 | |
parent | 7fc06d04a04a1737ae8b52f2e08c6698a8e5c721 (diff) | |
download | bh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.tar.gz bh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.tar.lz bh20-seq-resource-d9165d64840daca222305a6bf8d414a77a3cff21.zip |
fix sequencing_coverage
-rwxr-xr-x | scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py | 3 |
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) |