Skip to content

Commit

Permalink
filter features by type
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed Oct 21, 2024
2 parents c6bfa7a + 7cc023b commit 89398ea
Show file tree
Hide file tree
Showing 39 changed files with 445 additions and 324 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
name: Build and upload
name: Build or fetch and upload
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -26,10 +26,23 @@ jobs:
node-version: 18
cache: yarn
- name: Install
if: inputs.environment == 'staging'
run: yarn --immutable
- name: Build plugin
if: inputs.environment == 'staging'
run: yarn build
working-directory: packages/jbrowse-plugin-apollo
- name: Fetch plugin
if: inputs.environment == 'prod'
working-directory: packages/jbrowse-plugin-apollo
run: |
mkdir --parents dist
cd dist/
wget --output-document=- --quiet https://registry.npmjs.org/@apollo-annotation/jbrowse-plugin-apollo/ > jpa.json
LATEST_VERSION=$(jq --raw-output '."dist-tags".latest' jpa.json)
TARBALL=$(jq --raw-output ".versions.\"${LATEST_VERSION}\".dist.tarball" jpa.json)
wget --output-document=- --quiet ${TARBALL} | \
tar --extract --gzip --file=- --strip=2 package/dist/jbrowse-plugin-apollo.umd.development.js package/dist/jbrowse-plugin-apollo.umd.production.min.js
- name: Upload built plugin files
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -101,4 +114,4 @@ jobs:
run: |
docker --context staging compose down
docker --context staging compose pull
docker --context staging compose up --build --detach
docker --context staging compose up --build --detach --wait --wait-timeout 120
86 changes: 51 additions & 35 deletions .github/workflows/reload_demo_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,50 +46,66 @@ jobs:
HostName ${{ steps.ec2-describe-instances.outputs.INSTANCE_ADDRESS }}
User ec2-user
IdentityFile ~/.ssh/staging
ServerAliveInterval 60
ServerAliveCountMax 10
END
ssh-keyscan -H ${{ steps.ec2-describe-instances.outputs.INSTANCE_ADDRESS }} >> ~/.ssh/known_hosts
- name: Test ssh
- name: Create Docker context
run: |
xid=`date +"%Y-%m-%dT%H-%M-%S"`
cat <<'EOF' > cleanup_apollo.$xid.sh
set -e
set -u
set -o pipefail
set -x
demoDataDir=${{ '${HOME}' }}/dario/demoData
rm -rf $demoDataDir
mkdir -p $demoDataDir
cd $demoDataDir
wormbase='https://ftp.ebi.ac.uk/pub/databases/wormbase/parasite/releases/WBPS19/species'
curl -O -s -L $wormbase/schistosoma_haematobium/TD2_PRJEB44434/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz
curl -O -s -L $wormbase/schistosoma_mansoni/PRJEA36577/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa.gz
curl -O -s -L $wormbase/schistosoma_haematobium/TD2_PRJEB44434/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.annotations.gff3.gz
curl -O -s -L $wormbase/schistosoma_mansoni/PRJEA36577/schistosoma_mansoni.PRJEA36577.WBPS19.annotations.gff3.gz
gunzip *.gz
cd ${{ '${HOME}' }}/Apollo3/packages/apollo-cli
export APOLLO_PROFILE=auto
function apollo () {
yarn node bin/run.js "$@"
docker context create staging \
--docker host=ssh://staging \
--description "Staging server"
- name: Load data
run: |
docker pull ghcr.io/gmod/apollo-cli:${{ vars.DOCKER_TAG }}
function apollo() {
docker \
--context staging \
run \
--rm \
--interactive \
--add-host host.docker.internal=host-gateway \
--volume /home/ec2-user/.config/apollo-cli:/root/.config/apollo-cli \
--volume /home/ec2-user/data:/data \
--env APOLLO_PROFILE=auto \
ghcr.io/gmod/apollo-cli:${{ vars.DOCKER_TAG }} \
"$@"
}
apollo config address http://localhost
set -x
apollo config address http://host.docker.internal/apollo
apollo config accessType root
apollo config rootCredentials.username ${{ secrets.ROOT_USER_NAME }}
apollo config rootCredentials.password ${{ secrets.ROOT_USER_PASSWORD }}
apollo login
apollo login --force
apollo jbrowse set-config /data/config.json
apollo assembly get | apollo assembly delete --verbose --assembly -
apollo file get | apollo file delete
apollo assembly get | apollo assembly delete -v -a -
apollo assembly \
add-from-fasta \
/data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz \
--fai /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.fai \
--gzi /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.gzi \
--assembly 'Schistosoma haematobium' \
--not-editable
apollo assembly add-from-fasta $demoDataDir/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa -a schistosoma_haematobium -f
apollo assembly add-from-fasta $demoDataDir/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa -a schistosoma_mansoni -f
apollo assembly \
add-from-fasta \
/data/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa.gz \
--fai /data/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa.gz.fai \
--gzi /data/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa.gz.gzi \
--assembly 'Schistosoma mansoni' \
--not-editable
apollo feature import -i $demoDataDir/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.annotations.gff3 -a schistosoma_haematobium -d
apollo feature import -i $demoDataDir/schistosoma_mansoni.PRJEA36577.WBPS19.annotations.gff3 -a schistosoma_mansoni -d
EOF
apollo feature \
import \
--input-file /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.annotations.genes.gff3 \
--assembly 'Schistosoma haematobium'
rsync -av cleanup_apollo.$xid.sh staging:dario/
ssh staging -f "bash dario/cleanup_apollo.$xid.sh > dario/cleanup_apollo.$xid.out 2> dario/cleanup_apollo.$xid.err"
apollo feature \
import \
--input-file /data/schistosoma_mansoni.PRJEA36577.WBPS19.annotations.genes.gff3 \
--assembly 'Schistosoma mansoni'
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"lint": "cross-env NODE_OPTIONS='--max-old-space-size=4096' yarn eslint --report-unused-disable-directives --max-warnings 0 --ext .js,.ts,.jsx,.tsx .",
"build:shared": "yarn workspace @apollo-annotation/shared run build",
"release": "tsx scripts/makeGitTag.ts",
"start:shared": "yarn workspace @apollo-annotation/shared run start",
"start:server": "yarn workspace @apollo-annotation/collaboration-server run start",
"start:plugin": "yarn workspace @apollo-annotation/jbrowse-plugin-apollo run start",
Expand All @@ -18,6 +19,7 @@
"devDependencies": {
"@types/cross-spawn": "^6.0.6",
"@types/node": "^18.14.2",
"@types/semver": "^7",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
Expand All @@ -44,6 +46,8 @@
"prettier": "^3.3.2",
"prettier-plugin-packagejson": "^2.5.2",
"react": "^18.2.0",
"semver": "^7.6.3",
"tslib": "^2.3.1",
"tsx": "^4.6.2",
"typescript": "^5.5.3",
"yargs": "^17.7.2"
Expand Down
Loading

0 comments on commit 89398ea

Please sign in to comment.