-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from UPHL-BioNGS/refactoring
Refactoring
- Loading branch information
Showing
301 changed files
with
4,598 additions
and
3,823 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,80 @@ | ||
name: Test Grandeur workflow with additional fastani references | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nextflow | ||
run: | | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
nextflow -version | ||
- name: Download fastas | ||
run: | | ||
mkdir fastas | ||
for accession in GCA_019710395.3_ASM1971039v3 GCA_001652385.2_ASM165238v2 GCA_013344545.1_ASM1334454v1 | ||
do | ||
all=$(echo $accession | cut -f 2 -d "_") | ||
fir=$(echo $all | cut -c 1-3) | ||
mid=$(echo $all | cut -c 4-6) | ||
end=$(echo $all | cut -c 7-9) | ||
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/$fir/$mid/$end/$accession/${accession}_genomic.fna.gz | ||
gzip -d ${accession}_genomic.fna.gz | ||
mv ${accession}_genomic.fna fastas/. | ||
done | ||
- name: Download fastani refs for list | ||
run: | | ||
mkdir refs | ||
for accession in GCA_000240185.2_ASM24018v2 GCA_003812925.1_ASM381292v1 GCA_901421005.1_39282_A01 | ||
do | ||
all=$(echo $accession | cut -f 2 -d "_") | ||
fir=$(echo $all | cut -c 1-3) | ||
mid=$(echo $all | cut -c 4-6) | ||
end=$(echo $all | cut -c 7-9) | ||
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/${fir}/${mid}/${end}/${accession}/${accession}_genomic.fna.gz | ||
mv ${accession}_genomic.fna.gz refs/. | ||
done | ||
ls refs/* > fastani_ref_list.txt | ||
- name: Download fastani refs | ||
run: | | ||
for accession in GCA_009665515.2_ASM966551v2 GCA_009763645.1_ASM976364v1 | ||
do | ||
all=$(echo $accession | cut -f 2 -d "_") | ||
fir=$(echo $all | cut -c 1-3) | ||
mid=$(echo $all | cut -c 4-6) | ||
end=$(echo $all | cut -c 7-9) | ||
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/${fir}/${mid}/${end}/${accession}/${accession}_genomic.fna.gz | ||
done | ||
ls refs/* > fastani_ref_list.txt | ||
|
||
- name: Run Grandeur with ref list | ||
run: | | ||
nextflow run . -profile docker -c .github/workflows/github_actions.config --fastas fastas --fastani_ref_list fastani_ref_list.txt | ||
cat grandeur/grandeur_summary.tsv | ||
- name: Run Grandeur with refs | ||
run: | | ||
nextflow run . -profile docker -c .github/workflows/github_actions.config --fastas fastas -resume --fastani_ref GCA_009665515.2_ASM966551v2_genomic.fna.gz,GCA_009763645.1_ASM976364v1_genomic.fna.gz --outdir grandeur2 | ||
cat grandeur2/grandeur_summary.tsv | ||
|
||
- name: Run Grandeur with refs and ref list | ||
run: | | ||
nextflow run . -profile docker -c .github/workflows/github_actions.config --fastas fastas -resume --fastani_ref_list fastani_ref_list.txt --fastani_ref GCA_009665515.2_ASM966551v2_genomic.fna.gz,GCA_009763645.1_ASM976364v1_genomic.fna.gz --outdir grandeur3 | ||
cat grandeur3/grandeur_summary.tsv | ||
|
||
|
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
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
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,31 @@ | ||
process { | ||
maxRetries = 0 | ||
maxErrors = '-1' | ||
|
||
withLabel:process_single { | ||
cpus = { 1 } | ||
memory = { 6.GB * task.attempt } | ||
time = { 10.m * task.attempt } | ||
} | ||
withLabel:process_low { | ||
cpus = { 2 * task.attempt } | ||
memory = { 12.GB * task.attempt } | ||
time = { 2.h * task.attempt } | ||
} | ||
withLabel:process_medium { | ||
cpus = { 2 * task.attempt } | ||
memory = { 12.GB * task.attempt } | ||
time = { 4.h * task.attempt } | ||
} | ||
withLabel:process_high { | ||
cpus = { 2 * task.attempt } | ||
memory = { 12.GB * task.attempt } | ||
time = { 16.h * task.attempt } | ||
} | ||
withLabel:process_long { | ||
time = { 20.h * task.attempt } | ||
} | ||
withLabel:process_high_memory { | ||
memory = { 12.GB * task.attempt } | ||
} | ||
} |
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
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,45 @@ | ||
name: Test Grandeur workflow with Klebsiella | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nextflow | ||
run: | | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
nextflow -version | ||
- name: Run Grandeur | ||
run: | | ||
docker --version | ||
mkdir fastas | ||
for accession in GCA_000240185.2_ASM24018v2 GCA_003812925.1_ASM381292v1 GCA_901421005.1_39282_A01 | ||
do | ||
all=$(echo $accession | cut -f 2 -d "_") | ||
fir=$(echo $all | cut -c 1-3) | ||
mid=$(echo $all | cut -c 4-6) | ||
end=$(echo $all | cut -c 7-9) | ||
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/${fir}/${mid}/${end}/${accession}/${accession}_genomic.fna.gz | ||
gzip -d ${accession}_genomic.fna.gz | ||
mv ${accession}_genomic.fna fastas/. | ||
done | ||
nextflow run . -profile docker -c .github/workflows/github_actions.config --fastas fastas | ||
cat grandeur/grandeur_summary.tsv | ||
- name: Check Klebsiella file | ||
run: | | ||
for file in grandeur/kleborate/kleborate_results.tsv | ||
do | ||
head $file | ||
wc -l $file | ||
done |
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
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,45 @@ | ||
name: Test Grandeur workflow with Mycobacterium | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nextflow | ||
run: | | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
nextflow -version | ||
- name: Run Grandeur | ||
run: | | ||
docker --version | ||
mkdir fastas | ||
for accession in GCA_010729105.1_ASM1072910v1 GCA_000195955.2_ASM19595v2 | ||
do | ||
all=$(echo $accession | cut -f 2 -d "_") | ||
fir=$(echo $all | cut -c 1-3) | ||
mid=$(echo $all | cut -c 4-6) | ||
end=$(echo $all | cut -c 7-9) | ||
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/${fir}/${mid}/${end}/${accession}/${accession}_genomic.fna.gz | ||
gzip -d ${accession}_genomic.fna.gz | ||
mv ${accession}_genomic.fna fastas/. | ||
done | ||
nextflow run . -profile docker -c .github/workflows/github_actions.config --fastas fastas | ||
cat grandeur/grandeur_summary.tsv | ||
- name: Check Mycobacterium file | ||
run: | | ||
for file in grandeur/drprg/drprg_summary.tsv grandeur/mykrobe/mykrobe_summary.csv | ||
do | ||
head $file | ||
wc -l $file | ||
done |
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
Oops, something went wrong.