Skip to content

Commit

Permalink
Merge pull request #92 from CarsonJM/pharokka
Browse files Browse the repository at this point in the history
Added pharokka annotations and updated nf-tests to use nf-core/modules test data
  • Loading branch information
CarsonJM authored Feb 19, 2024
2 parents 7c72955 + 711f59a commit 14666f3
Show file tree
Hide file tree
Showing 143 changed files with 3,279 additions and 1,083 deletions.
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

0 comments on commit 14666f3

Please sign in to comment.