Skip to content

Commit

Permalink
Merge branch 'master' into nf-test/mitohifi_findmitoreference
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 5, 2024
2 parents 5a36a04 + d576f75 commit 7c5505d
Show file tree
Hide file tree
Showing 370 changed files with 13,505 additions and 3,277 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ jobs:
tags: cellrangerarc/count
- profile: conda
tags: cellrangerarc/mkfastq
- profile: conda
tags: cellrangerarc/mkgtf
- profile: conda
tags: cellrangerarc/mkref
- profile: conda
Expand Down Expand Up @@ -318,6 +316,8 @@ jobs:
tags: islandpath
- profile: conda
tags: manta/convertinversion
- profile: conda
tags: mcstaging/imc2mc
- profile: conda
tags: mcquant
- profile: conda
Expand Down Expand Up @@ -470,7 +470,7 @@ jobs:

- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
with:
name: logs-${{ matrix.profile }}-${{ steps.parsed.outputs.result }}
path: |
Expand Down Expand Up @@ -542,6 +542,8 @@ jobs:
path: modules/nf-core/ensemblvep/vep
- profile: conda
path: modules/nf-core/fastk/fastk
- profile: conda
path: modules/nf-core/cellrangerarc/mkgtf
- profile: conda
path: modules/nf-core/fastk/histex
- profile: conda
Expand Down Expand Up @@ -570,8 +572,12 @@ jobs:
path: modules/nf-core/ilastik/pixelclassification
- profile: conda
path: modules/nf-core/imputeme/vcftoprs
- profile: conda
path: modules/nf-core/mcstaging/imc2mc
- profile: conda
path: modules/nf-core/mcquant
- profile: conda
path: modules/nf-core/mcstaging/phenoimager2mc
- profile: conda
path: modules/nf-core/merquryfk/katcomp
- profile: conda
Expand Down
11 changes: 3 additions & 8 deletions modules/environment-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
},
"channels": {
"type": "array",
"items": [
{
"enum": ["conda-forge"]
},
{
"enum": ["bioconda"]
}
],
"items": {
"enum": ["bioconda", "conda-forge"]
},
"minItems": 2
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion modules/nf-core/bcftools/merge/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: bcftools_merge
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::bcftools=1.20
23 changes: 16 additions & 7 deletions modules/nf-core/bcftools/merge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ process BCFTOOLS_MERGE {
tuple val(meta), path(vcfs), path(tbis)
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)
path(bed)
tuple val(meta4), path(bed)

output:
tuple val(meta), path("*.{bcf,vcf}{,.gz}"), emit: merged_variants
tuple val(meta), path("*.{bcf,vcf}{,.gz}"), emit: vcf
tuple val(meta), path("*.{csi,tbi}") , emit: index, optional: true
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def input = vcfs.sort{ it.name }
def regions = bed ? "--regions-file $bed" : ""
def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" :
args.contains("--output-type u") || args.contains("-Ou") ? "bcf" :
Expand All @@ -37,7 +38,7 @@ process BCFTOOLS_MERGE {
$regions \\
--threads $task.cpus \\
--output ${prefix}.${extension} \\
$vcfs
$input
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -53,8 +54,16 @@ process BCFTOOLS_MERGE {
args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" :
args.contains("--output-type v") || args.contains("-Ov") ? "vcf" :
"vcf"
def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" :
args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" :
args.contains("--write-index") || args.contains("-W") ? "csi" :
""
def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch"
def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : ""

"""
touch ${prefix}.${extension}
${create_cmd} ${prefix}.${extension}
${create_index}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
23 changes: 10 additions & 13 deletions modules/nf-core/bcftools/merge/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ input:
type: file
description: "(Optional) The fasta reference file index (only necessary for the `--gvcf FILE` parameter)"
pattern: "*.fai"
- meta4:
type: map
description: |
Groovy Map containing bed information
e.g. [ id:'genome' ]
- bed:
type: file
description: "(Optional) The bed regions to merge on"
Expand All @@ -56,22 +61,14 @@ output:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf_gz:
type: file
description: VCF merged output file (bgzipped) => when `--output-type z` is used
pattern: "*.vcf.gz"
- vcf:
type: file
description: VCF merged output file => when `--output-type v` is used
pattern: "*.vcf"
- bcf_gz:
type: file
description: BCF merged output file (bgzipped) => when `--output-type b` is used
pattern: "*.bcf.gz"
- bcf:
description: merged output file
pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}"
- index:
type: file
description: BCF merged output file => when `--output-type u` is used
pattern: "*.bcf"
description: index of merged output
pattern: "*.{csi,tbi}"
- versions:
type: file
description: File containing software versions
Expand Down
3 changes: 3 additions & 0 deletions modules/nf-core/bcftools/merge/tests/bcf.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = '--output-type u --no-version'
}
3 changes: 3 additions & 0 deletions modules/nf-core/bcftools/merge/tests/bcf_gz.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = '--output-type b --no-version'
}
Loading

0 comments on commit 7c5505d

Please sign in to comment.