Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NFT_VER: "0.9.3"
NFT_VER: "0.9.5"
NFT_WORKDIR: "~"
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
Expand Down Expand Up @@ -90,7 +90,6 @@ jobs:
- name: Run nf-test
id: run_nf_test
uses: ./.github/actions/nf-test
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
env:
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
NXF_VERSION: ${{ matrix.NXF_VER }}
Expand Down
13 changes: 5 additions & 8 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,14 @@ output {
}
sample_vcfs {
path { meta, vcf, tbi ->
def base = "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}"
vcf >> "${base}.vcf.gz"
tbi >> "${base}.vcf.gz.tbi"
vcf >> "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}" + ".vcf.gz"
tbi >> "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}" + ".vcf.gz.tbi"
}
}
family_vcfs {
path { meta, vcf, tbi ->
def base = "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}"
vcf >> "${base}.vcf.gz"
tbi >> "${base}.vcf.gz.tbi"
vcf >> "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}" + ".vcf.gz"
Comment thread
nvnieuwk marked this conversation as resolved.
tbi >> "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}" + ".vcf.gz.tbi"
}
}
qdnaseq_out {
Expand All @@ -186,8 +184,7 @@ output {
}
bedpe {
path { meta, bedpe ->
def base = "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}"
bedpe >> "${base}.bedpe"
bedpe >> "${meta.id}/${meta.id}${meta.variant_type ? '.' + meta.variant_type : ''}" + ".bedpe"
}
}
multiqc {
Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
},
"samtools/faidx": {
"branch": "master",
"git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a",
"git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205",
"installed_by": ["modules"]
},
"samtools/index": {
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/samtools/faidx/environment.yml

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

20 changes: 10 additions & 10 deletions modules/nf-core/samtools/faidx/main.nf

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

1 change: 1 addition & 0 deletions modules/nf-core/samtools/faidx/meta.yml

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

54 changes: 27 additions & 27 deletions modules/nf-core/samtools/faidx/tests/main.nf.test.snap

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

1 change: 0 additions & 1 deletion modules/nf-core/samtools/faidx/tests/nextflow.config

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

18 changes: 18 additions & 0 deletions tests/lib/Utils.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import java.nio.file.Path
import groovy.transform.CompileDynamic

/**
* Utility functions for testing.
*/
@CompileDynamic
class Utils {

static Object getRecursiveFileNames(Path fileOrDir, String outputDir) {
/* groovylint-disable-next-line UnnecessaryGetter */
if (Path.of(fileOrDir.toString()).toFile().isDirectory()) {
return fileOrDir.list().collect { file -> getRecursiveFileNames(file, outputDir) }
}
return fileOrDir.toString().replace("${outputDir}/", '')
}

}
13 changes: 3 additions & 10 deletions tests/pipeline/all_types/all.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nextflow_pipeline {
path("$outputDir")
.list()
.findAll { !it.toString().endsWith("pipeline_info") }
.collect { getRecursiveFileNames(it, "${outputDir}") }
.collect { Utils.getRecursiveFileNames(it, "${outputDir}") }
.flatten()
).match("all")}
)
Expand Down Expand Up @@ -55,7 +55,7 @@ nextflow_pipeline {
path("$outputDir")
.list()
.findAll { !it.toString().endsWith("pipeline_info") }
.collect { getRecursiveFileNames(it, "${outputDir}") }
.collect { Utils.getRecursiveFileNames(it, "${outputDir}") }
.flatten()
).match("concat")}
)
Expand Down Expand Up @@ -83,7 +83,7 @@ nextflow_pipeline {
path("$outputDir")
.list()
.findAll { !it.toString().endsWith("pipeline_info") }
.collect { getRecursiveFileNames(it, "${outputDir}") }
.collect { Utils.getRecursiveFileNames(it, "${outputDir}") }
.flatten()
).match("output callers")}
)
Expand All @@ -92,10 +92,3 @@ nextflow_pipeline {
}

}

def getRecursiveFileNames(fileOrDir, outputDir) {
if(file(fileOrDir.toString()).isDirectory()) {
return fileOrDir.list().collect { getRecursiveFileNames(it, outputDir) }
}
return fileOrDir.toString().replace("${outputDir}/", "")
}
11 changes: 2 additions & 9 deletions tests/pipeline/bedpe/bedpe.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nextflow_pipeline {
{ assert snapshot(
path("${outputDir}")
.list()
.collect { getRecursiveFileNames(it, "${outputDir}") }
.collect { Utils.getRecursiveFileNames(it, "${outputDir}") }
.flatten()
.findAll {
!it.contains("pipeline_info/")
Expand Down Expand Up @@ -79,7 +79,7 @@ nextflow_pipeline {
{ assert snapshot(
path("${outputDir}")
.list()
.collect { getRecursiveFileNames(it, "${outputDir}") }
.collect { Utils.getRecursiveFileNames(it, "${outputDir}") }
.flatten()
.findAll {
!it.contains("pipeline_info/")
Expand All @@ -91,10 +91,3 @@ nextflow_pipeline {
}

}

def getRecursiveFileNames(fileOrDir, outputDir) {
if(file(fileOrDir.toString()).isDirectory()) {
return fileOrDir.list().collect { getRecursiveFileNames(it, outputDir) }
}
return fileOrDir.toString().replace("${outputDir}/", "")
}
Loading
Loading