From 479ed7d31133f7ff69b0027866d6c6486b91f1b0 Mon Sep 17 00:00:00 2001 From: Dan Fornika Date: Wed, 5 Jun 2024 15:07:08 -0700 Subject: [PATCH] updates --- .github/scripts/check_outputs.py | 6 ++++++ environments/fluviewer.yml | 2 +- main.nf | 2 +- modules/hash_files.nf | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check_outputs.py b/.github/scripts/check_outputs.py index 84a7166..09a8d8b 100755 --- a/.github/scripts/check_outputs.py +++ b/.github/scripts/check_outputs.py @@ -38,6 +38,12 @@ def check_expected_files_exist(output_dir, sample_ids): """ for sample_id in sample_ids: expected_files = [ + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_fluviewer_alignment.bam", + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_fluviewer_alignment.bam.bai", + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_fluviewer_depth_of_cov.png", + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_fluviewer_mapping_refs.fa", + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_fluviewer_report.tsv", + f"fastq/fluviewer-nf-v0.2/{sample_id}/{sample_id}_genoflu.tsv", ] for expected_file in expected_files: diff --git a/environments/fluviewer.yml b/environments/fluviewer.yml index ff33eb0..a7ea83f 100644 --- a/environments/fluviewer.yml +++ b/environments/fluviewer.yml @@ -209,4 +209,4 @@ dependencies: - zlib=1.2.13=hd590300_5 - zstd=1.5.5=hfc55251_0 - pip: - - fluviewer + - FluViewer==0.1.11 diff --git a/main.nf b/main.nf index 0a3b0a8..c5f0961 100644 --- a/main.nf +++ b/main.nf @@ -106,7 +106,7 @@ workflow { ch_provenance = ch_provenance.join(hash_files.out.provenance).map{ it -> [it[0], it[1] << it[2]] } ch_provenance = ch_provenance.join(fastp.out.provenance).map{ it -> [it[0], it[1] << it[2]] } ch_provenance = ch_provenance.join(cutadapt.out.provenance).map{ it -> [it[0], it[1] << it[2]] } - // ch_provenance = ch_provenance.join(FluViewer.out.provenance).map{ it -> [it[0], it[1] << it[2]] } + ch_provenance = ch_provenance.join(fluviewer.out.provenance).map{ it -> [it[0], it[1] << it[2]] } // ch_provenance = ch_provenance.join(CLADE_CALLING.out.provenance).map{ it -> [it[0], it[1] << it[2]] } // ch_provenance = ch_provenance.join(GENOFLU.out.provenance).map{ it -> [it[0], it[1] << it[2]] } collect_provenance(ch_provenance) diff --git a/modules/hash_files.nf b/modules/hash_files.nf index 6662097..e9865a0 100644 --- a/modules/hash_files.nf +++ b/modules/hash_files.nf @@ -13,7 +13,9 @@ process hash_files { """ shasum -a 256 ${files_to_hash} | tr -s ' ' ',' > ${sample_id}_${file_type}.sha256.csv while IFS=',' read -r hash filename; do - printf -- "- input_filename: \$filename\\n input_path: \$(realpath \$filename)\\n sha256: \$hash\\n" >> ${sample_id}_${file_type}_provenance.yml + printf -- "- input_filename: \$filename\\n" >> ${sample_id}_${file_type}_provenance.yml; + printf -- " file_type: ${file_type}\\n" >> ${sample_id}_${file_type}_provenance.yml; + printf -- " sha256: \$hash\\n" >> ${sample_id}_${file_type}_provenance.yml; done < ${sample_id}_${file_type}.sha256.csv """ }