Skip to content

Commit

Permalink
🚧 Deprecate augur filter --metadata-chunk-size
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Mar 7, 2024
1 parent 52fbad6 commit 850d908
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ These features are deprecated, which means they are no longer maintained and
will go away in a future major version of Augur. They are currently still
available for backwards compatibility, but should not be used in new code.

## `augur filter --metadata-chunk-size`

*Deprecated in version X.X.X. Planned for removal in September 2024 or after.*

FIXME: add description here

## `augur parse` preference of `name` over `strain` as the sequence ID field

*Deprecated in February 2024. Planned to be reordered June 2024 or after.*
Expand Down
2 changes: 1 addition & 1 deletion augur/filter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def register_arguments(parser):
input_group.add_argument('--metadata', required=True, metavar="FILE", help="sequence metadata")
input_group.add_argument('--sequences', '-s', help="sequences in FASTA or VCF format")
input_group.add_argument('--sequence-index', help="sequence composition report generated by augur index. If not provided, an index will be created on the fly.")
input_group.add_argument('--metadata-chunk-size', type=int, default=100000, help="maximum number of metadata records to read into memory at a time. Increasing this number can speed up filtering at the cost of more memory used.")
input_group.add_argument('--metadata-chunk-size', help="[DEPRECATED] Previously used to specify maximum number of metadata records to read into memory at a time. This no longer has an effect.")
input_group.add_argument('--metadata-id-columns', default=DEFAULT_ID_COLUMNS, nargs="+", help="names of possible metadata columns containing identifier information, ordered by priority. Only one ID column will be inferred.")
input_group.add_argument('--metadata-delimiters', default=DEFAULT_DELIMITERS, nargs="+", help="delimiters to accept when reading a metadata file. Only one delimiter will be inferred.")

Expand Down
4 changes: 4 additions & 0 deletions augur/filter/validate_arguments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from augur.errors import AugurError
from augur.io.print import print_err
from augur.io.vcf import is_vcf as filename_is_vcf


Expand All @@ -16,6 +17,9 @@ def validate_arguments(args):
args : argparse.Namespace
Parsed arguments from argparse
"""
if args.metadata_chunk_size:
print_err("WARNING: --metadata-chunk-size is no longer necessary and will be removed in a future version.")

# Don't allow sequence output when no sequence input is provided.
if args.output and not args.sequences:
raise AugurError("You need to provide sequences to output sequences.")
Expand Down

0 comments on commit 850d908

Please sign in to comment.