diff --git a/Makefile b/Makefile index 5dd9911..0daa2b7 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ clean: test: nextflow main.nf -profile test,conda --output output/test1 - #nextflow main.nf -profile test,conda --skip_bqsr --output output/test2 - #nextflow main.nf -profile test,conda --skip_realignment --output output/test3 - #nextflow main.nf -profile test,conda --skip_deduplication --output output/test4 - #nextflow main.nf -profile test,conda --output output/test5 --skip_metrics + nextflow main.nf -profile test,conda --skip_bqsr --output output/test2 + nextflow main.nf -profile test,conda --skip_realignment --output output/test3 + nextflow main.nf -profile test,conda --skip_deduplication --output output/test4 + nextflow main.nf -profile test,conda --output output/test5 --skip_metrics nextflow main.nf -profile test,conda --output output/test6 --intervals false nextflow main.nf -profile test,conda --output output/test7 --hs_metrics_target_coverage target_coverage.txt --hs_metrics_per_base_coverage per_base_coverage.txt - #nextflow main.nf -profile test,conda --output output/test8 --hs_metrics_target_coverage target_coverage.txt --hs_metrics_per_base_coverage per_base_coverage.txt --collect_hs_metrics_min_base_quality 10 --collect_hs_metrics_min_mapping_quality 10 + nextflow main.nf -profile test,conda --output output/test8 --hs_metrics_target_coverage target_coverage.txt --hs_metrics_per_base_coverage per_base_coverage.txt --collect_hs_metrics_min_base_quality 10 --collect_hs_metrics_min_mapping_quality 10 diff --git a/environment.yml b/environment.yml index 2e11f2f..4e2ce6b 100644 --- a/environment.yml +++ b/environment.yml @@ -1,11 +1,10 @@ # You can use this file to create a conda environment for this pipeline: # conda env create -f environment.yml -name: tronflow-bam-preprocessing-1.2.1 +name: tronflow-bam-preprocessing-1.3.0 channels: - conda-forge - bioconda - defaults dependencies: - - openjdk=8.0.282 - bioconda::gatk4=4.2.0.0 - bioconda::gatk=3.8 \ No newline at end of file diff --git a/main.nf b/main.nf index eab1c7b..dbc9961 100755 --- a/main.nf +++ b/main.nf @@ -82,7 +82,7 @@ process prepareBam { set val(name), val("${bam.baseName}"), val(type), file("${bam.baseName}.prepared.bam"), - file("${bam.baseName}.prepared.bai") into prepared_bams, prepared_bams_for_metrics, prepared_bams_for_hs_metrics + file("${bam.baseName}.prepared.bai") into prepared_bams """ mkdir tmp @@ -128,7 +128,8 @@ if (!params.skip_deduplication) { output: set val(name), val(bam_name), val(type), - file("${bam.baseName}.dedup.bam"), file("${bam.baseName}.dedup.bam.bai") into deduplicated_bams + file("${bam.baseName}.dedup.bam"), file("${bam.baseName}.dedup.bam.bai") into deduplicated_bams, + deduplicated_bams_for_metrics, deduplicated_bams_for_hs_metrics file("${bam.baseName}.dedup_metrics") optional true into deduplication_metrics script: @@ -146,7 +147,7 @@ if (!params.skip_deduplication) { } } else { - deduplicated_bams = prepared_bams + prepared_bams.into{ deduplicated_bams; deduplicated_bams_for_metrics; deduplicated_bams_for_hs_metrics} } if (! params.skip_metrics) { @@ -160,7 +161,7 @@ if (! params.skip_metrics) { publishDir "${publish_dir}/${name}/metrics", mode: "copy" input: - set name, bam_name, type, file(bam), file(bai) from prepared_bams_for_hs_metrics + set name, bam_name, type, file(bam), file(bai) from deduplicated_bams_for_hs_metrics output: file("*_metrics") optional true into txt_hs_metrics @@ -200,7 +201,7 @@ if (! params.skip_metrics) { publishDir "${publish_dir}/${name}/metrics", mode: "copy" input: - set name, bam_name, type, file(bam), file(bai) from prepared_bams_for_metrics + set name, bam_name, type, file(bam), file(bai) from deduplicated_bams_for_metrics output: file("*_metrics") optional true into txt_metrics diff --git a/nextflow.config b/nextflow.config index 14fc87c..56defa9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -55,12 +55,12 @@ dag { //file = "${params.output}/pipeline_dag.svg" } -VERSION = '1.2.1' +VERSION = '1.3.0' DOI = 'https://zenodo.org/badge/latestdoi/358400957' manifest { name = 'TRON-Bioinformatics/tronflow-bam-preprocessing' - author = 'Pablo Riesgo Ferreiro' + author = 'Pablo Riesgo Ferreiro, Özlem Muslu' homePage = 'https://github.com/TRON-Bioinformatics/tronflow-bam-preprocessing' description = 'Picard and GATK BAM preprocessing pipeline' mainScript = 'main.nf'