This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cog-publish-link.sh for repointing latest
- Loading branch information
1 parent
7a3c425
commit 642fae8
Showing
2 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
set -euo pipefail | ||
|
||
# Repoint latest | ||
# This script is usually run automatically by cog-publish | ||
# Under exceptional circumstances one may need to repoint the latest data set manually | ||
# | ||
# Usage: | ||
# cog-publish-link.sh <DATESTAMP> | ||
# | ||
# $1 DATESTAMP that latest should link to | ||
|
||
chmod 755 $COG_PUBLISHED_DIR/$1/ | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.fasta $COG_PUBLISHED_DIR/elan.latest.consensus.fasta | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.fasta.fai $COG_PUBLISHED_DIR/elan.latest.consensus.fasta.fai | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/majora.$1.metadata.tsv $COG_PUBLISHED_DIR/majora.latest.metadata.tsv | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.matched.fasta $COG_PUBLISHED_DIR/elan.latest.consensus.matched.fasta | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/majora.$1.metadata.matched.tsv $COG_PUBLISHED_DIR/majora.latest.metadata.matched.tsv | ||
|
||
# NOTE samstudio8 2021-01-28 | ||
# https://github.com/SamStudio8/elan-nextflow/issues/12 | ||
# We've now moved away from providing symlinks at a daily resolution because | ||
# its hilariously expensive to maintain them and nobody actually uses them. | ||
# latest/ is now a real dir rather than a symlink. To match the expected | ||
# behaviour of the latest files being accessible via latest/ we'll additionally | ||
# now symlink the FASTA and TSV. Eventually we can deprecate providing them | ||
# above this dir. | ||
# I now use a `head` symlink to keep track of the last successful run. | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.fasta $COG_PUBLISHED_DIR/latest/elan.consensus.fasta | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.fasta.fai $COG_PUBLISHED_DIR/latest/elan.consensus.fasta.fai | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/majora.$1.metadata.tsv $COG_PUBLISHED_DIR/latest/majora.metadata.tsv | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/elan.$1.consensus.matched.fasta $COG_PUBLISHED_DIR/latest/elan.consensus.matched.fasta | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/majora.$1.metadata.matched.tsv $COG_PUBLISHED_DIR/latest/majora.metadata.matched.tsv | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/summary $COG_PUBLISHED_DIR/latest/summary | ||
ln -fn -s $COG_PUBLISHED_DIR/$1/ $COG_PUBLISHED_DIR/head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters