Skip to content

Commit

Permalink
convert old pipeline workflow to just sra
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 20, 2020
1 parent b86adaf commit 5b191fb
Showing 1 changed file with 144 additions and 0 deletions.
144 changes: 144 additions & 0 deletions .github/workflows/pipeline_sra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Pipeline
#This is a workflow for full pipeline testing.

# Global workflow environment variables
env:
PHYLO_NF_REV: "master"
EAGER_NF_REV: "7b51863957"
PHYLO_CONDA_ENV: "plague-phylogeography-0.1.4dev"
EAGER_CONDA_ENV: "nf-core-eager-2.2.0dev"

on:
# Triggered on Push for any branch
push:
branches:
- '*'
# On change to workflow, pipeline
paths:
- '.github/workflows/pipeline_sra.yaml'
- 'main.nf'
- 'nextflow.config'
- 'environment.yaml'

# Triggered on PR for all branches, pipeline
pull_request:
branches:
- '*'
# Also on a published release
release:
types: [published]

jobs:

# Install the pipeline and dependencies
pipeline:
runs-on: ubuntu-latest
steps:

# 1. Install nextflow
- name: install nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
# 2. Setup conda
- name: setup conda
uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true

# 3a. Install ktmeaton/plague-phylogeography
- name: install nf ktmeaton/plague-phylogeography
shell: bash -l {0}
run: |
nextflow pull ktmeaton/plague-phylogeography
nextflow pull ktmeaton/plague-phylogeography -r ${PHYLO_NF_REV}
nextflow run ktmeaton/plague-phylogeography --version
# 3b. Install ktmeaton/plague-phylogeography
- name: install conda ktmeaton/plague-phylogeography
shell: bash -l {0}
run: |
conda env create -f ~/.nextflow/assets/ktmeaton/plague-phylogeography/environment.yaml
conda activate ${PHYLO_CONDA_ENV}
conda deactivate
# 4a. Install nf-core/eager
- name: install nf nf-core/eager
shell: bash -l {0}
run: |
nextflow pull nf-core/eager
nextflow pull nf-core/eager -r ${EAGER_NF_REV}
nextflow run nf-core/eager -r ${EAGER_NF_REV} --help
# 4b. Install nf-core/eager
- name: install conda nf-core/eager
shell: bash -l {0}
run: |
conda env create -f ~/.nextflow/assets/nf-core/eager/environment.yml
conda install -n ${EAGER_CONDA_ENV} -c bioconda nextflow
conda install -n ${EAGER_CONDA_ENV} -c anaconda graphviz
conda activate ${EAGER_CONDA_ENV}
dot -v
nextflow -v
conda deactivate
- name: example pipeline
shell: bash -l {0}
run: |
conda info --envs
conda activate ${PHYLO_CONDA_ENV}
nextflow run ktmeaton/plague-phylogeography \
--skip_assembly_download \
--sqlite_select_command_sra "\"SELECT BioSampleAccession,SRARunAccession,SRALibraryLayout,SRAFileURL FROM Master WHERE (SRARunAccession = 'SRR1048902' OR SRARunAccession = 'SRR1048905')\"" \
--skip_eager \
--skip_outgroup_download \
--outdir test
- name: example eager
shell: bash -l {0}
run: |
conda activate ${EAGER_CONDA_ENV}
mkdir -p test/eager
nextflow -C ~/.nextflow/assets/nf-core/eager/nextflow.config \
run nf-core/eager \
-r ${EAGER_NF_REV} \
--input test/sqlite_import/metadata_sra_eager.tsv \
--outdir test/eager \
--fasta test/reference_genome/GCF_000009065.1_ASM906v1_genomic.fna \
--clip_readlength 35 \
--preserve5p \
--mergedonly \
--mapper bwaaln \
--bwaalnn 0.01 \
--bwaalnl 16 \
--run_bam_filtering \
--bam_mapping_quality_threshold 30 \
--bam_discard_unmapped \
--bam_unmapped_type discard \
--max_memory "6.GB" \
--max_cpus 2
- name: artifact sqlite-import
uses: actions/upload-artifact@v2
with:
name: sqlite-import
path: test/sqlite_import/

- name: artifact iqtree
uses: actions/upload-artifact@v2
with:
name: iqtree
path: test/iqtree/

- name: artifact multiqc
uses: actions/upload-artifact@v2
with:
name: multiqc
path: test/eager/MultiQC

- name: artifact trace
uses: actions/upload-artifact@v2
with:
name: trace
path: test/trace/

0 comments on commit 5b191fb

Please sign in to comment.