-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into boolean-parameter-to--log_skipped_fastqs
- Loading branch information
Showing
168 changed files
with
4,532 additions
and
1,052 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
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,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "bamtofastq10x" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::10x_bamtofastq=1.4.1" |
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 @@ | ||
process BAMTOFASTQ10X { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/10x_bamtofastq:1.4.1--hdbdd923_2': | ||
'biocontainers/10x_bamtofastq:1.4.1--hdbdd923_2' }" | ||
|
||
input: | ||
tuple val(meta), path(bam) | ||
|
||
output: | ||
tuple val(meta), path("*.fastq.gz"), emit: fastq | ||
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}" | ||
""" | ||
bamtofastq \\ | ||
$args \\ | ||
$bam \\ | ||
${prefix}.fastq.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bamtofastq10x: \$(bamtofastq --version |& sed '1!d ; s/bamtofastq //') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.fastq.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bamtofastq10x: \$(bamtofastq --version |& sed '1!d ; s/bamtofastq //') | ||
END_VERSIONS | ||
""" | ||
} |
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,48 @@ | ||
name: bamtofastq10x | ||
|
||
description: Tool for converting 10x BAMs produced by Cell Ranger, Space Ranger, Cell Ranger ATAC, Cell Ranger DNA, and Long Ranger back to FASTQ files that can be used as inputs to re-run analysis | ||
|
||
keywords: | ||
- bam | ||
- convert | ||
- fastq | ||
- 10x | ||
|
||
tools: | ||
- bamtofastq10x: | ||
description: Tool for converting 10x BAMs produced by Cell Ranger, Space Ranger, Cell Ranger ATAC, Cell Ranger DNA, and Long Ranger back to FASTQ files that can be used as inputs to re-run analysis | ||
homepage: https://github.com/10XGenomics/bamtofastq | ||
documentation: https://github.com/10XGenomics/bamtofastq | ||
tool_dev_url: https://github.com/10XGenomics/bamtofastq | ||
licence: ["MIT"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- bam: | ||
type: file | ||
description: BAM file | ||
pattern: "*.bam" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
- fastq: | ||
type: file | ||
description: fastq compressed file | ||
pattern: "*.fastq.gz" | ||
|
||
authors: | ||
- "@BlueBicycleBlog" | ||
maintainers: | ||
- "@BlueBicycleBlog" |
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,55 @@ | ||
nextflow_process { | ||
|
||
name "Test Process BAMTOFASTQ10X" | ||
script "../main.nf" | ||
process "BAMTOFASTQ10X" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "bamtofastq10x" | ||
|
||
test("human - bam") { | ||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/10x_cr12.bam', checkIfExists: true) | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
|
||
) | ||
} | ||
} | ||
|
||
|
||
test("human - bam - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test' ], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/10x_cr12.bam', checkIfExists: true) | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success } | ||
) | ||
} | ||
|
||
} | ||
} |
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,47 @@ | ||
{ | ||
"human - bam": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
[ | ||
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0", | ||
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f", | ||
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002" | ||
] | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,845cd1d09c8a3d0059da9d074a9e5436" | ||
], | ||
"fastq": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
[ | ||
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0", | ||
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f", | ||
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002" | ||
] | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,845cd1d09c8a3d0059da9d074a9e5436" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.0" | ||
}, | ||
"timestamp": "2024-05-22T16:43:24.999397" | ||
} | ||
} |
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,2 @@ | ||
bamtofastq10x: | ||
- "modules/nf-core/bamtofastq10x/**" |
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,72 @@ | ||
nextflow_process { | ||
|
||
name "Test Process BISCUIT_ALIGN" | ||
script "../main.nf" | ||
process "BISCUIT_ALIGN" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "biscuit" | ||
tag "biscuit/align" | ||
tag "biscuit/index" | ||
|
||
setup { | ||
run("BISCUIT_INDEX") { | ||
script "../../index/main.nf" | ||
process { | ||
""" | ||
input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("Single-End sarscov2 test_methylated_1 [fastq_gz]") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
[ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) ] | ||
] | ||
input[1] = BISCUIT_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.bam[0][1]).name == "test.bam" }, | ||
{ assert file(process.out.bai[0][1]).name == "test.bam.bai" }, | ||
{ assert snapshot(process.out.versions).match("single-end-versions") } | ||
) | ||
} | ||
} | ||
|
||
test("Paired-End sarscov2 test_methylated_1 [fastq_gz]") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
[ file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) ] | ||
] | ||
input[1] = BISCUIT_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.bam[0][1]).name == "test.bam" }, | ||
{ assert file(process.out.bai[0][1]).name == "test.bam.bai" }, | ||
{ assert snapshot(process.out.versions).match("paired-end-versions") } | ||
) | ||
} | ||
} | ||
} |
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,26 @@ | ||
{ | ||
"single-end-versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,0b2a8c4c438a785a890110a458399bfd" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.1" | ||
}, | ||
"timestamp": "2024-05-22T20:06:02.295706212" | ||
}, | ||
"paired-end-versions": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,0b2a8c4c438a785a890110a458399bfd" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.1" | ||
}, | ||
"timestamp": "2024-05-22T20:06:17.879689395" | ||
} | ||
} |
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,3 @@ | ||
biscuit/align: | ||
- modules/nf-core/biscuit/index/** | ||
- modules/nf-core/biscuit/align/** |
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,38 @@ | ||
nextflow_process { | ||
|
||
name "Test Process CHECKM_LINEAGEWF" | ||
script "../main.nf" | ||
process "CHECKM_LINEAGEWF" | ||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "checkm" | ||
tag "checkm/lineagewf" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) | ||
] | ||
input[1] = 'fasta' | ||
input[2] = [] // Download CheckM database | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert file(process.out.checkm_output[0][1]).list().find { file(it).name == "checkm.log" } | ||
assert snapshot( | ||
path(process.out.marker_file[0][1]).readLines().any{it.contains("PF00312.17")}, | ||
process.out.checkm_tsv, | ||
process.out.versions | ||
).match() | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.