-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI for variant calling via Github Actions and CIEVaD #75
Merged
Merged
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
fac660c
new CI fundamental test
Krannich479 a28896a
the yaml grind chapter 1
Krannich479 f62be3b
the yaml grind chapter 2
Krannich479 921279e
the yaml grind chapter 3
Krannich479 ebf4b7b
the yaml grind chapter 4
Krannich479 c36487d
the yaml grind chapter 5
Krannich479 2db097a
CI test cievad hap.nf
Krannich479 88a6e6d
CI test hap.nf
Krannich479 06c3738
manage deploy key for private repo access
Krannich479 c3b2323
try SSH clone
Krannich479 f9e8392
Add reference to CI
Krannich479 7eb2bd2
CI split and download and run of cievad
Krannich479 5cf823b
CI test unix variables across tasks
Krannich479 429350e
-
Krannich479 bb03c64
CI try run CovPipe2 on simulated data
Krannich479 d4c4283
CI retry with reformat
Krannich479 a5aef6d
CI use CoVpipe2 version of auto-checkout
Krannich479 d982643
CI inspect results
Krannich479 82182ce
CI cievad eval
Krannich479 da96a14
tiny fix
Krannich479 a21614b
CI add ref to eval call
Krannich479 2dc9893
CI check cievad results
Krannich479 1a8fa1c
CI check folder structure
Krannich479 262f9ec
CI better symbolic links
Krannich479 c7b493e
CI debug
Krannich479 335c584
CI trying to fix dependencies
Krannich479 e59ddc0
test1 for auto-badge generation
Krannich479 b44b618
CI badge test pt2
Krannich479 6e3a5de
CI badge test part3
Krannich479 7ae5185
Update README.md
Krannich479 f1b9a24
Update VariantCalling.yml
Krannich479 d643aee
Update VariantCalling.yml
Krannich479 330f218
Update README.md
Krannich479 074bcca
Update VariantCalling.yml
Krannich479 2fa3e14
Update DryRun.yml
Krannich479 814a63c
Update pytest_workflows.yml
Krannich479 027d82f
Update README.md
Krannich479 5a9b3c5
Remove ssh-key requirement from CI
Krannich479 afb70c8
Update git clone strategy
Krannich479 a4f5d09
Update VariantCalling.yml
Krannich479 dbc68b0
Remove external badge creation (via schneegans)
Krannich479 8846d32
Update VariantCalling.yml
Krannich479 84e93bc
Update VariantCalling.yml
Krannich479 c033596
Update VariantCalling.yml
Krannich479 fbc606a
Merge branch 'rki-mf1:main' into main
Krannich479 1cdc24c
revert CI changes in previous tests; new status badge for variant cal…
Krannich479 2fdbdba
Update VariantCalling.yml
Krannich479 c92dead
Update README.md
Krannich479 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,140 @@ | ||
name: VariantCallingBenchmark | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev", "ci"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
VariantCallingBenchmark: | ||
name: CIEVaD benchmarks | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: "latest" | ||
channels: bioconda,conda-forge,defaults | ||
channel-priority: true | ||
auto-activate-base: true | ||
|
||
- name: Check conda installation | ||
run: | | ||
conda info | ||
conda list | ||
conda config --show-sources | ||
conda config --show | ||
|
||
- name: Install nextflow | ||
run: | | ||
conda install -c bioconda nextflow | ||
nextflow -version | ||
|
||
- name: Check CovPipe2 presence | ||
run: nextflow run CoVpipe2.nf --help | ||
|
||
- name: Git checkout CIEVaD + REF | ||
run: | | ||
git clone https://github.com/rki-mf1/cievad.git | ||
pushd cievad | ||
nextflow run hap.nf --help | ||
nextflow run eval.nf --help | ||
wget https://www.ebi.ac.uk/ena/browser/api/fasta/MN908947.3 | ||
sed 's/>ENA|MN908947|MN908947.3 Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1, complete genome./>MN908947.3/g' MN908947.3 > MN908947.3.fasta | ||
popd | ||
|
||
- name: Run CIEVaD hap | ||
run: | | ||
pushd cievad | ||
nextflow run hap.nf -profile local,conda --reference MN908947.3.fasta | ||
ls -la results/simulated_hap*NGSWGS*.fastq | ||
popd | ||
|
||
- name: Run CovPipe2 | ||
run: | | ||
# BECAUSE CIEVAD'S DEFAULT IS N=3 SAMPLES | ||
NB_SAMPLES=3 | ||
echo "sample,fastq_1,fastq_2" > samplesheet.csv | ||
for s in $(seq 1 $NB_SAMPLES); do echo "hap${s},cievad/results/simulated_hap${s}.NGSWGS.R1.fastq,cievad/results/simulated_hap${s}.NGSWGS.R2.fastq" >> samplesheet.csv; done | ||
cat samplesheet.csv | ||
nextflow run CoVpipe2.nf \ | ||
-profile local,conda \ | ||
-w work \ | ||
--output results \ | ||
--reference 'sars-cov-2' \ | ||
--fastq samplesheet.csv --list \ | ||
--primer_version V3 | ||
|
||
- name: Prep CIEVaD input | ||
run: | | ||
NB_SAMPLES=3 | ||
mkdir -p cievad/callsets | ||
for s in $(seq 1 $NB_SAMPLES); do ln -sr results/03-Variant-Calling/hap${s}/hap${s}.filtered.gt_adjust.filtered_indels.vcf.gz cievad/callsets/callset_${s}.vcf.gz; done | ||
|
||
- name: Run CIEVaD eval | ||
run: | | ||
pushd cievad | ||
tree . | ||
nextflow run eval.nf -profile local,conda --callsets_dir callsets --reference MN908947.3.fasta | ||
tree results | ||
popd | ||
|
||
- name: Create Badge variable for average indel F1-score # in personal (non-organisational) git repos the score can be visualized via schneegans' dynamic badge action | ||
run: | | ||
INDELS_AVG_F1=$(cut -f 2,21 -d ',' cievad/results/summary.sompy.stats.csv | grep "indels" | sed 's/indels,//g') | ||
INDELS_AVG_F1_ABS=$(echo $INDELS_AVG_F1*100 | bc) | ||
INDELS_AVG_F1_INT=$(echo $INDELS_AVG_F1_ABS | cut -f 1 -d '.') | ||
echo "INDELS_SCORE=$INDELS_AVG_F1_INT" >> $GITHUB_ENV | ||
echo $INDELS_AVG_F1_ABS | ||
echo $INDELS_AVG_F1_INT | ||
if [ "$INDELS_AVG_F1_INT" -lt 91 ]; then | ||
echo "Indels benchmark value decreased since last test! Exiting with status 1." | ||
exit 1 | ||
else | ||
echo "Indels benchmark did not drop since last test." | ||
fi | ||
|
||
#- name: Create Indels Badge | ||
# uses: schneegans/[email protected] | ||
# with: | ||
# auth: ${{ secrets.GIST_SECRET_CIEVAD_GH_ACTIONS }} | ||
# gistID: 4a0fffafb6e8969ddb31b3100926e9cf | ||
# filename: cievad_covpipe2_indels.json # Use test.svg if you want to use the SVG mode. | ||
# namedLogo: GitHub | ||
# label: Indels F1-score | ||
# message: ${{ env.INDELS_SCORE }}% | ||
# valColorRange: ${{ env.INDELS_SCORE }} | ||
# minColorRange: 0 | ||
# maxColorRange: 100 | ||
|
||
- name: Create Badge variable for average SNV F1-score | ||
run: | | ||
SNV_AVG_F1=$(cut -f 2,21 -d ',' cievad/results/summary.sompy.stats.csv | grep "SNVs" | sed 's/SNVs,//g') | ||
SNV_AVG_F1_ABS=$(echo $SNV_AVG_F1*100 | bc) | ||
SNV_AVG_F1_INT=$(echo $SNV_AVG_F1_ABS | cut -f 1 -d '.') | ||
echo "SNV_SCORE=$SNV_AVG_F1_INT" >> $GITHUB_ENV | ||
echo $SNV_AVG_F1_ABS | ||
echo $SNV_AVG_F1_INT | ||
if [ "$SNV_AVG_F1_INT" -lt 96 ]; then | ||
echo "SNV benchmark value decreased since last test! Exiting with status 1." | ||
exit 1 | ||
else | ||
echo "SNV benchmark did not drop since last test." | ||
fi | ||
|
||
#- name: Create SNV Badge | ||
# uses: schneegans/[email protected] | ||
# with: | ||
# auth: ${{ secrets.GIST_SECRET_CIEVAD_GH_ACTIONS }} | ||
# gistID: 87db7a851147867bc3e8857dc643dd15 | ||
# filename: cievad_covpipe2_SNV.json # Use test.svg if you want to use the SVG mode. | ||
# namedLogo: GitHub | ||
# label: SNV F1-score | ||
# message: ${{ env.SNV_SCORE }}% | ||
# valColorRange: ${{ env.SNV_SCORE }} | ||
# minColorRange: 0 | ||
# maxColorRange: 100 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to upload result files from CIEVaD as artifacts? 🤔
I saw it at the lining CI at nf-core:
https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/.github/workflows/linting.yml#L60-L68
and I have it here to check results, when the test failed:
https://github.com/rki-mf1/CoVpipe2/blob/main/.github/workflows/pytest_workflows.yml#L58-L68