Skip to content

Commit

Permalink
tooling: add --keep-first option to add_to_lineages.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Apr 23, 2023
1 parent 68615bb commit b622915
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/add_to_lineages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 7. Remove all files matching the ~/Downloads/nextstrain_fetch* pattern.

usage() {
echo "Usage: $0 <lineage>"
echo "Usage: $0 <lineage> [--keep-first]"
echo "Example: $0 XBB.1.5.34"
}

Expand All @@ -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*

0 comments on commit b622915

Please sign in to comment.