Skip to content

Commit

Permalink
Merge pull request #20 from CarsonJM/development
Browse files Browse the repository at this point in the history
Fix crazy kneaddata
  • Loading branch information
CarsonJM authored Apr 25, 2024
2 parents d0301fe + 9deaaa6 commit 77f86bd
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 148 deletions.
10 changes: 8 additions & 2 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ params {
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
//max_cpus = 2
//max_memory = '6.GB'
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

// Input data
input = "$projectDir/assets/samplesheet.csv"
perform_runmerging = true
run_kneaddata = true
kneaddata_db_version = 'human_genome'
run_metaphlan = true
metaphlan_db_version = 'mpa_vJan21_TOY_CHOCOPhlAnSGB_202103'

}
10 changes: 9 additions & 1 deletion modules/local/kneaddata/kneaddata/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,22 @@ process KNEADDATA_KNEADDATA {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
# install trimmomatic
curl \\
-o Trimmomatic-0.33.zip \\
http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.33.zip
# unzip trimmomatic executable
unzip Trimmomatic-0.33.zip
kneaddata \\
--input1 ${fastq_gz[0]} \\
--input2 ${fastq_gz[1]} \\
--output . \\
--output-prefix ${prefix}_kneaddata \\
--reference-db ${kneaddata_db} \\
--threads ${task.cpus} \\
--trimmomatic ${params.kneaddata_trimmomatic_path} \\
--trimmomatic ./Trimmomatic-0.33 \\
$args
gzip *.fastq
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,4 @@
{
" ['sarscov2']['illumina']['test_fastq_gz'] ": {
"content": [
{
"0": [
[
{
"id": "all_samples"
},
"all_samples.txt:md5,a2ed21e453a84f0d0f29313269f93db3"
]
],
"1": [
"versions.yml:md5,07c9ed916bd6b2781b49c097ad4dccd3",
"versions.yml:md5,932a88b79ff4ac88dea7e3ea0b85af9b",
"versions.yml:md5,96c5194c76c69ebe464df7904e44de26",
"versions.yml:md5,ea68a854ad5e92799f15dbcf59f3795f"
],
"metaphlan_profiles_merged_tsv": [
[
{
"id": "all_samples"
},
"all_samples.txt:md5,a2ed21e453a84f0d0f29313269f93db3"
]
],
"versions": [
"versions.yml:md5,07c9ed916bd6b2781b49c097ad4dccd3",
"versions.yml:md5,932a88b79ff4ac88dea7e3ea0b85af9b",
"versions.yml:md5,96c5194c76c69ebe464df7904e44de26",
"versions.yml:md5,ea68a854ad5e92799f15dbcf59f3795f"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-01-24T09:54:11.531938592"
},
"fastq.gz": {
"content": [
{
Expand Down Expand Up @@ -68,44 +29,5 @@
"nextflow": "23.10.1"
},
"timestamp": "2024-04-24T10:29:04.201964325"
},
" ['sarscov2']['illumina']['test_fastq_gz'] - stub": {
"content": [
{
"0": [
[
{
"id": "all_samples"
},
"all_samples.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,07c9ed916bd6b2781b49c097ad4dccd3",
"versions.yml:md5,932a88b79ff4ac88dea7e3ea0b85af9b",
"versions.yml:md5,96c5194c76c69ebe464df7904e44de26",
"versions.yml:md5,ea68a854ad5e92799f15dbcf59f3795f"
],
"metaphlan_profiles_merged_tsv": [
[
{
"id": "all_samples"
},
"all_samples.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,07c9ed916bd6b2781b49c097ad4dccd3",
"versions.yml:md5,932a88b79ff4ac88dea7e3ea0b85af9b",
"versions.yml:md5,96c5194c76c69ebe464df7904e44de26",
"versions.yml:md5,ea68a854ad5e92799f15dbcf59f3795f"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-01-24T09:54:46.793242828"
}
}
2 changes: 1 addition & 1 deletion workflows/biobakerymgx/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ workflow BIOBAKERYMGX {
Prepare reads for biobakerymgx
-----------------------------------------------------------------------------------*/
// group reads from the same sample
if ( !params.skip_runmerging ) {
if ( params.run_runmerging ) {
ch_reads_for_cat_branch = ch_samplesheet
.map {
meta, reads ->
Expand Down
9 changes: 8 additions & 1 deletion workflows/biobakerymgx/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ nextflow_workflow {
then {
assertAll(
{ assert workflow.success },
{ assert snapshot(workflow.out).match() }
{ assert snapshot(
workflow.out.preprocessed_fastq_gz,
workflow.out.preprocessed_read_counts_tsv,
workflow.out.read_taxonomy_tsv,
workflow.out.versions
).match()
},
{ assert new File("$outputDir/multiqc/multiqc_report.html").exists() }
)
}
}
Expand Down
89 changes: 24 additions & 65 deletions workflows/biobakerymgx/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,81 +1,40 @@
{
"fastq.gz": {
"content": [
{
"0": [
[
[
{
"id": "test2"
},
[
{
"id": "test2"
},
[
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
],
[
{
"id": "test"
},
[
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
]
],
"1": [

],
"2": [

],
"3": [
[
"multiqc_report.html:md5,667c271a46fac8be87db9c8b51c7eb3f"
]
],
"4": [
"versions.yml:md5,d9f2edf37349457eccb7644ee1db2ae7"
],
"multiqc_report": [
[
"multiqc_report.html:md5,667c271a46fac8be87db9c8b51c7eb3f"
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
],
"preprocessed_fastq_gz": [
[
{
"id": "test2"
},
[
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
],
[
{
"id": "test"
},
[
{
"id": "test"
},
[
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
"SRX5235702_SRR8427717_1.fastq.gz:md5,cc895d36dc655210366086535f359fb0",
"SRX5235702_SRR8427717_2.fastq.gz:md5,2b1a67a42fb71032d6c54776fad5a790"
]
],
"preprocessed_read_counts_tsv": [

],
"read_taxonomy_tsv": [

],
"versions": [
"versions.yml:md5,d9f2edf37349457eccb7644ee1db2ae7"
]
}
],
[

],
[

],
[

]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-24T13:17:57.217658994"
"timestamp": "2024-04-24T22:51:47.767796873"
}
}

0 comments on commit 77f86bd

Please sign in to comment.