Skip to content

Commit

Permalink
Merge pull request #4 from TRON-Bioinformatics/change-output-folder
Browse files Browse the repository at this point in the history
simplify output folder and remove subfolder with sample name
  • Loading branch information
priesgo authored Sep 29, 2021
2 parents 4ab6bc2 + 28a5285 commit c0877c6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
58 changes: 29 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,37 @@ quick_test:
--output output/test1 \
--fastq1 test_data/ERR4145453_1.fastq.gz \
--fastq2 test_data/ERR4145453_2.fastq.gz --skip_sarscov2_annotations
test -s output/test1/ERR4145453/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.ivar.tsv || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.fastp_stats.json || { echo "Missing test 1 FASTP output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.fastp_stats.html || { echo "Missing test 1 FASTP output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.coverage.tsv || { echo "Missing test 1 coverage output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.depth.tsv || { echo "Missing test 1 depth output file!"; exit 1; }
test -s output/test1/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.ivar.tsv || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.fastp_stats.json || { echo "Missing test 1 FASTP output file!"; exit 1; }
test -s output/test1/ERR4145453.fastp_stats.html || { echo "Missing test 1 FASTP output file!"; exit 1; }
test -s output/test1/ERR4145453.coverage.tsv || { echo "Missing test 1 coverage output file!"; exit 1; }
test -s output/test1/ERR4145453.depth.tsv || { echo "Missing test 1 depth output file!"; exit 1; }

check:
test -s output/test1/ERR4145453/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.ivar.tsv || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.fastp_stats.json || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.fastp_stats.html || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.coverage.tsv || { echo "Missing test 1 coverage output file!"; exit 1; }
test -s output/test1/ERR4145453/ERR4145453.depth.tsv || { echo "Missing test 1 depth output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.ivar.tsv || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.fastp_stats.json || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453/ERR4145453.fastp_stats.html || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.ivar.tsv || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.fastp_stats.json || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453/ERR4145453.fastp_stats.html || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test4/hCoV-19_NTXX/hCoV-19_NTXX.assembly.normalized.annotated.vcf.gz || { echo "Missing test 4 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.ivar.tsv || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.fastp_stats.json || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.fastp_stats.html || { echo "Missing test 1 VCF output file!"; exit 1; }
test -s output/test1/ERR4145453.coverage.tsv || { echo "Missing test 1 coverage output file!"; exit 1; }
test -s output/test1/ERR4145453.depth.tsv || { echo "Missing test 1 depth output file!"; exit 1; }
test -s output/test2/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453.ivar.tsv || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453.fastp_stats.json || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test2/ERR4145453.fastp_stats.html || { echo "Missing test 2 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.bcftools.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.gatk.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.lofreq.normalized.annotated.vcf.gz || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.ivar.tsv || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.fastp_stats.json || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test3/ERR4145453.fastp_stats.html || { echo "Missing test 3 VCF output file!"; exit 1; }
test -s output/test4/hCoV-19_NTXX.assembly.normalized.annotated.vcf.gz || { echo "Missing test 4 VCF output file!"; exit 1; }

test_assembly_variant_caller:
python3 -m unittest bin/test_assembly_variant_caller.py
28 changes: 14 additions & 14 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if (params.fastq1) {
cpus params.cpus
memory params.memory
tag params.name
publishDir "${params.output}/${params.name}", mode: "copy", pattern: "*fastp_stats*"
publishDir "${params.output}", mode: "copy", pattern: "*fastp_stats*"

input:
val name from params.name
Expand Down Expand Up @@ -156,7 +156,7 @@ if (params.fastq1) {
cpus params.cpus
memory params.memory
tag params.name
publishDir "${params.output}/${params.name}", mode: "copy", pattern: "*fastp_stats*"
publishDir "${params.output}", mode: "copy", pattern: "*fastp_stats*"

input:
val name from params.name
Expand Down Expand Up @@ -201,11 +201,11 @@ if (params.fastq1) {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}
publishDir "${params.output}/${params.name}", mode: "copy", pattern: "${name}.deduplication_metrics.txt"
publishDir "${params.output}/${params.name}", mode: "copy", pattern: "${name}.coverage.tsv"
publishDir "${params.output}/${params.name}", mode: "copy", pattern: "${name}.depth.tsv"
publishDir "${params.output}", mode: "copy", pattern: "${name}.deduplication_metrics.txt"
publishDir "${params.output}", mode: "copy", pattern: "${name}.coverage.tsv"
publishDir "${params.output}", mode: "copy", pattern: "${name}.depth.tsv"

input:
set name, file(bam) from bam_files
Expand Down Expand Up @@ -279,7 +279,7 @@ if (params.fastq1) {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}

input:
Expand Down Expand Up @@ -319,7 +319,7 @@ if (params.fastq1) {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}

input:
Expand Down Expand Up @@ -359,7 +359,7 @@ if (params.fastq1) {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}

input:
Expand Down Expand Up @@ -387,7 +387,7 @@ if (params.fastq1) {
cpus params.cpus
memory params.memory
tag params.name
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"

input:
set name, file(bam), file(bai) from preprocessed_bams4
Expand Down Expand Up @@ -421,7 +421,7 @@ else if (params.fasta) {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}

input:
Expand Down Expand Up @@ -450,7 +450,7 @@ process variantNormalization {
memory params.memory
tag params.name
if (params.keep_intermediate) {
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"
}

input:
Expand Down Expand Up @@ -481,7 +481,7 @@ if (params.skip_sarscov2_annotations) {
cpus params.cpus
memory params.memory
tag params.name
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"

input:
set name, file(vcf) from normalized_vcf_files
Expand All @@ -507,7 +507,7 @@ if (params.skip_sarscov2_annotations) {
cpus params.cpus
memory params.memory
tag params.name
publishDir "${params.output}/${params.name}", mode: "copy"
publishDir "${params.output}", mode: "copy"

input:
set name, file(vcf) from normalized_vcf_files
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ process.shell = ['/bin/bash', '-euo', 'pipefail']
cleanup = true
conda.createTimeout = '1 h'

VERSION = '0.5.0'
VERSION = '0.6.0'

manifest {
name = 'TRON-Bioinformatics/covigator-ngs-pipeline'
Expand Down

0 comments on commit c0877c6

Please sign in to comment.