Skip to content

Commit

Permalink
Merge pull request #1335: Bump supported pyfastx versions
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin authored Nov 7, 2023
2 parents 378353e + 8b3ecff commit e1b414a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## __NEXT__

### Bug Fixes

* Fix Python 3.11 installation for Conda environments. [#1334][] (@victorlin)
* Bump `pyfastx` dependency to major versions 1 and 2. [#1335][] (@victorlin)

[#1334]: https://github.com/nextstrain/augur/issues/1334
[#1335]: https://github.com/nextstrain/augur/pull/1335

## 23.1.0 (22 September 2023)

Expand Down
9 changes: 5 additions & 4 deletions augur/io/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ def read_metadata_with_sequences(metadata, metadata_delimiters, fasta, seq_id_co
else:
processed_metadata_ids.add(seq_id)

# Skip records that do not have a matching sequence
# TODO: change this to try/except to fetch sequences and catch
# KeyError for non-existing sequences when https://github.com/lmdu/pyfastx/issues/50 is resolved
if seq_id not in sequence_ids:
try:
sequence_record = sequences[seq_id]
except KeyError:
# Skip records that do not have a matching sequence

# Immediately raise an error if requested to error on the first unmatched record
if unmatched_reporting is DataErrorMethod.ERROR_FIRST:
raise AugurError(f"Encountered metadata record {seq_id!r} without a matching sequence.")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"packaging >=19.2",
"pandas >=1.0.0, ==1.*",
"phylo-treetime >=0.10.0, <0.12",
"pyfastx >=0.8.4, ==0.8.*",
"pyfastx >=1.0.0, <3.0",
"scipy ==1.*",
"xopen[zstd] >=1.7.0, ==1.*"
],
Expand Down

0 comments on commit e1b414a

Please sign in to comment.