diff --git a/utils/add_to_lineages.sh b/utils/add_to_lineages.sh index d3fd1056..7f11005c 100755 --- a/utils/add_to_lineages.sh +++ b/utils/add_to_lineages.sh @@ -10,7 +10,7 @@ # 7. Remove all files matching the ~/Downloads/nextstrain_fetch* pattern. usage() { - echo "Usage: $0 " + echo "Usage: $0 [--keep-first]" echo "Example: $0 XBB.1.5.34" } @@ -29,7 +29,12 @@ tsv-select -f1 ~/Downloads/nextstrain_fetch* \ | tail -n +2 \ >>lineages.csv -python deduplicate_keeping_last.py +if [ "$2" != "--keep-first" ]; then + python deduplicate_keeping_last.py +else + echo "Keeping first" + python deduplicate_keeping_first.py +fi rm ~/Downloads/nextstrain_fetch*