Skip to content

Commit b622915

Browse files
tooling: add --keep-first option to add_to_lineages.sh
1 parent 68615bb commit b622915

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

utils/add_to_lineages.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# 7. Remove all files matching the ~/Downloads/nextstrain_fetch* pattern.
1111

1212
usage() {
13-
echo "Usage: $0 <lineage>"
13+
echo "Usage: $0 <lineage> [--keep-first]"
1414
echo "Example: $0 XBB.1.5.34"
1515
}
1616

@@ -29,7 +29,12 @@ tsv-select -f1 ~/Downloads/nextstrain_fetch* \
2929
| tail -n +2 \
3030
>>lineages.csv
3131

32-
python deduplicate_keeping_last.py
32+
if [ "$2" != "--keep-first" ]; then
33+
python deduplicate_keeping_last.py
34+
else
35+
echo "Keeping first"
36+
python deduplicate_keeping_first.py
37+
fi
3338

3439
rm ~/Downloads/nextstrain_fetch*
3540

0 commit comments

Comments
 (0)