Skip to content
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

Added pharokka annotations and updated nf-tests to use nf-core/modules test data #92

Merged
merged 26 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8d191d4
Started implementing pharokka
CarsonJM Jan 24, 2024
05e32e2
Merge branch 'dev' of https://github.com/CarsonJM/phageannotator into…
CarsonJM Jan 24, 2024
c47298f
Fixed nf-test test data issue
CarsonJM Jan 24, 2024
0dbf933
Added pharokka and updated nf-tests
CarsonJM Feb 6, 2024
9c5b667
Merge branch 'dev' of https://github.com/nf-core/phageannotator into …
CarsonJM Feb 8, 2024
58abc09
Fixed linting and reorganized test_data
CarsonJM Feb 8, 2024
055337c
Merge branch 'pharokka' of https://github.com/CarsonJM/phageannotator…
CarsonJM Feb 8, 2024
42a0794
Removed prodigal/prodigalgv nextlfow.config
CarsonJM Feb 8, 2024
04684ca
Fixed test_data, patched pharokka, and updated samtools/sort
CarsonJM Feb 8, 2024
7406a89
Added samtools/sort nextlfow.config
CarsonJM Feb 8, 2024
ada963e
Fixed test_data include
CarsonJM Feb 8, 2024
04f4d27
Added ext.prefix to disambiguate input/output names
CarsonJM Feb 12, 2024
5695662
Started fixing nf-test snapshots
CarsonJM Feb 12, 2024
fb20bff
Fixed resource requests
CarsonJM Feb 14, 2024
8da07c3
Updated snapshots
CarsonJM Feb 14, 2024
f6b3620
Updated resource requests
CarsonJM Feb 14, 2024
800fca7
Updated failing sketches
CarsonJM Feb 14, 2024
a7aa0a5
Updated resource requests in nf-test config
CarsonJM Feb 14, 2024
ae7221d
Fixed pharokka and samtools/sort snapshots
CarsonJM Feb 15, 2024
8ed230d
Limited resources
CarsonJM Feb 15, 2024
202304f
Removed samtools_sort prefix only in bam_sort_stats_samtools tests
CarsonJM Feb 15, 2024
bf661da
Updated fasta_phage_function_pharokka snap
CarsonJM Feb 15, 2024
5cb0101
Updated nf-tests for local running and modified resource requests
CarsonJM Feb 16, 2024
147b318
Removed local proxy code
CarsonJM Feb 16, 2024
7218318
Reduce storage used by tests
CarsonJM Feb 16, 2024
711f59a
Fixed pharokka snap
CarsonJM Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Run nf-test
run: |
nf-test test --verbose --tag ${{ matrix.tags }} --profile test,"${{ matrix.profile }}" --junitxml=test.xml --tap=test.tap
nf-test test --verbose --tag ${{ matrix.tags }} --profile "${{ matrix.profile }}" --junitxml=test.xml --tap=test.tap

- uses: pcolby/tap-summary@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ testing*
*.pyc
.nf-test*
test.xml
nf-test-checklist.csv
*parallel-nf-test.sh
nf-test-parallel/

2 changes: 0 additions & 2 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ params {
// Pipeline options
publish_dir_mode = 'symlink'
}

includeConfig './test_data.config'
825 changes: 773 additions & 52 deletions conf/test_data.config

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Channel
.fromSamplesheet("input")
.multiMap { meta, fastq_1, fastq_2, fasta ->
fastq_gz: [ meta, [ fastq_1, fastq_2 ] ]
fasta_gz: [ meta, [ fasta ] ]
fasta_gz: [ meta, fasta ]
}
.set { ch_input }

Expand Down
25 changes: 18 additions & 7 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,40 @@
"git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93",
"installed_by": ["modules"]
},
"pharokka/installdatabases": {
"branch": "master",
"git_sha": "10e88ef2f1f3ff012a2c9562de95c264006ebf21",
"installed_by": ["modules"]
},
"pharokka/pharokka": {
"branch": "master",
"git_sha": "10e88ef2f1f3ff012a2c9562de95c264006ebf21",
"installed_by": ["modules"],
"patch": "modules/nf-core/pharokka/pharokka/pharokka-pharokka.diff"
},
"samtools/flagstat": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"samtools/idxstats": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"samtools/index": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_sort_stats_samtools"]
},
"samtools/sort": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_sort_stats_samtools"]
},
"samtools/stats": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_stats_samtools"]
},
"untar": {
Expand All @@ -148,12 +159,12 @@
"nf-core": {
"bam_sort_stats_samtools": {
"branch": "master",
"git_sha": "af41b722617a973f3c2c0f83a5f64095e4d87ca2",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["fastq_align_bowtie2"]
},
"bam_stats_samtools": {
"branch": "master",
"git_sha": "cfd937a668919d948f6fcbf4218e79de50c2f36f",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["bam_sort_stats_samtools"]
},
"fastq_align_bowtie2": {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/anicluster/anicalc/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nextflow_process {
tag "modules"
tag "modules_local"
tag "anicluster"
tag "anicluster/anicalc"
tag "anicluster_anicalc"


test("['modules_local']['blast_txt']") {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/anicluster/anicalc/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
anicluster/anicalc:
anicluster_anicalc:
- modules/local/anicluster/anicalc/**
10 changes: 5 additions & 5 deletions modules/local/anicluster/aniclust/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ nextflow_process {
tag "modules"
tag "modules_local"
tag "anicluster"
tag "anicluster/aniclust"
tag "anicluster_aniclust"


test("['bacteroides_fragilis']['illumina']['contigs_fa_gz'] & ['modules_local']['ani_tsv']") {
test("['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'] & ['modules_local']['ani_tsv']") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['contigs_fa_gz'], checkIfExists: true ) ],
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true ) ],
[ file(params.test_data['modules_local']['ani_tsv'], checkIfExists: true ) ] ]
"""
}
Expand All @@ -31,7 +31,7 @@ nextflow_process {
}
}

test("['bacteroides_fragilis']['illumina']['contigs_fa_gz'] & ['modules_local']['ani_tsv'] - stub") {
test("['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'] & ['modules_local']['ani_tsv'] - stub") {

options "-stub"

Expand All @@ -41,7 +41,7 @@ nextflow_process {
}
process {
"""
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['contigs_fa_gz'], checkIfExists: true ) ],
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true ) ],
[ file(params.test_data['modules_local']['ani_tsv'], checkIfExists: true ) ] ]
"""
}
Expand Down
8 changes: 4 additions & 4 deletions modules/local/anicluster/aniclust/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/local/anicluster/aniclust/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
anicluster/aniclust:
anicluster_aniclust:
- modules/local/anicluster/aniclust/**
10 changes: 5 additions & 5 deletions modules/local/anicluster/extractreps/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ nextflow_process {
tag "modules"
tag "modules_local"
tag "anicluster"
tag "anicluster/extractreps"
tag "anicluster_extractreps"


test("['bacteroides_fragilis']['illumina']['contigs_fa_gz'] & ['modules_local']['clusters_tsv']") {
test("['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'] & ['modules_local']['clusters_tsv']") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['contigs_fa_gz'], checkIfExists: true ) ],
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true ) ],
[ file(params.test_data['modules_local']['clusters_tsv'], checkIfExists: true ) ] ]
"""
}
Expand All @@ -31,7 +31,7 @@ nextflow_process {
}
}

test("['bacteroides_fragilis']['illumina']['contigs_fa_gz'] & ['modules_local']['clusters_tsv'] - stub") {
test("['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'] & ['modules_local']['clusters_tsv'] - stub") {

options "-stub"

Expand All @@ -41,7 +41,7 @@ nextflow_process {
}
process {
"""
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['contigs_fa_gz'], checkIfExists: true ) ],
input[0] = [ [ id: 'test' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true ) ],
[ file(params.test_data['modules_local']['clusters_tsv'], checkIfExists: true ) ] ]
"""
}
Expand Down
8 changes: 4 additions & 4 deletions modules/local/anicluster/extractreps/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/local/anicluster/extractreps/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
anicluster/extractreps:
anicluster_extractreps:
- modules/local/anicluster/extractreps/**
7 changes: 6 additions & 1 deletion modules/local/coverm/contig/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
process {
withName: COVERM_CONTIG {
ext.args = "--methods $params.coverm_metrics"
ext.args = [
"--methods $params.coverm_metrics",
"--min-read-aligned-length $params.coverm_min_read_alignment",
"--min-read-percent-identity $params.coverm_min_percent_identity",
"--min-read-aligned-percent $params.coverm_min_percent_read_aligned",
].join(' ').trim()
publishDir = [
path: { "${params.outdir}/VirusAbundance/coverm/contig" },
mode: params.publish_dir_mode,
Expand Down
10 changes: 5 additions & 5 deletions modules/local/coverm/contig/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ nextflow_process {
process "COVERM_CONTIG"
tag "modules"
tag "modules_local"
tag "coverm/contig"
tag "coverm_contig"


test("['bacteroides_fragilis']['test1_bam'] & ['bacteroides_fragilis']['test2_bam']") {
test("['bacteroides_fragilis']['illumina']['test1_paired_end_bam'] & ['bacteroides_fragilis']['illumina']['test2_paired_end_bam']") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [ id: 'all_samples' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_bam'], checkIfExists: true), file(params.test_data['bacteroides_fragilis']['illumina']['test2_bam'], checkIfExists: true) ] ]
input[0] = [ [ id: 'all_samples' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_bam'], checkIfExists: true), file(params.test_data['bacteroides_fragilis']['illumina']['test2_paired_end_bam'], checkIfExists: true) ] ]
"""
}
}
Expand All @@ -29,7 +29,7 @@ nextflow_process {
}
}

test("['bacteroides_fragilis']['test1_bam'] & ['bacteroides_fragilis']['test2_bam'] - stub") {
test("['bacteroides_fragilis']['illumina']['test1_paired_end_bam'] & ['bacteroides_fragilis']['illumina']['test2_paired_end_bam'] - stub") {

options "-stub"

Expand All @@ -39,7 +39,7 @@ nextflow_process {
}
process {
"""
input[0] = [ [ id: 'all_samples' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_bam'], checkIfExists: true), file(params.test_data['bacteroides_fragilis']['illumina']['test2_bam'], checkIfExists: true) ] ]
input[0] = [ [ id: 'all_samples' ], [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_paired_end_bam'], checkIfExists: true), file(params.test_data['bacteroides_fragilis']['illumina']['test2_paired_end_bam'], checkIfExists: true) ] ]
"""
}
}
Expand Down
8 changes: 4 additions & 4 deletions modules/local/coverm/contig/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/local/coverm/contig/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
coverm/contig:
coverm_contig:
- modules/local/coverm/contig/**
2 changes: 1 addition & 1 deletion modules/local/instrain/stb/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nextflow_process {
process "INSTRAIN_STB"
tag "modules"
tag "modules_local"
tag "instrain/stb"
tag "instrain_stb"


test("['homo_sapiens']['genome']['genome_fasta']") {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/instrain/stb/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
instrain/stb:
instrain_stb:
- modules/local/instrain/stb/**
2 changes: 1 addition & 1 deletion modules/local/mash/paste/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nextflow_process {
process "MASH_PASTE"
tag "modules"
tag "modules_local"
tag "mash/paste"
tag "mash_paste"


test("['modules_local']['mash_sketch1_msh'] & ['modules_local']['mash_sketch2_msh']") {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/mash/paste/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mash/paste:
mash_paste:
- modules/local/mash/paste/**
6 changes: 0 additions & 6 deletions modules/local/prodigal/prodigalgv/environment.yml

This file was deleted.

Loading
Loading