File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
modules/local/compression Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,20 @@ process COMPRESSION_ENCRYPTION_VCF {
3232
3333 # concat dosage files and update header
3434 bcftools concat --threads ${ threads} -n ${ imputed_joined} -o intermediate_${ imputed_name} -Oz
35- echo "##mis_pipeline=${ workflow.manifest.version} " > add_header.txt
36- echo "##mis_phasing=${ params.phasing.engine} " >> add_header.txt
37- echo "##mis_panel=${ panel_version} " >> add_header.txt
38- bcftools annotate --threads ${ threads} -h add_header.txt intermediate_${ imputed_name} -o ${ imputed_name} -Oz
39- rm intermediate_${ imputed_name}
35+
36+ # annotate files
37+ if [[ "${ params.encryption.annotate} " = true ]]
38+ then
39+ echo "##mis_pipeline=${ workflow.manifest.version} " > add_header.txt
40+ echo "##mis_phasing=${ params.phasing.engine} " >> add_header.txt
41+ echo "##mis_panel=${ panel_version} " >> add_header.txt
42+
43+ bcftools annotate --threads ${ threads} -h add_header.txt intermediate_${ imputed_name} -o ${ imputed_name} -Oz
44+
45+ rm intermediate_${ imputed_name}
46+ else
47+ mv intermediate_${ imputed_name} ${ imputed_name}
48+ fi
4049
4150 # write meta files
4251 if [[ "${ params.imputation.meta} " = true ]]
@@ -55,7 +64,7 @@ process COMPRESSION_ENCRYPTION_VCF {
5564 if [[ "${ params.encryption.enabled} " = true ]]
5665 then
5766 7z a -tzip ${ aes} -mmt${ threads} -p"${ params.encryption_password} " ${ zip_name} ${ prefix} *
58- rm *vcf.gz* *info.gz add_header.txt
67+ rm *vcf.gz* *info.gz
5968 fi
6069
6170 # create md5 of zip file
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ params {
6060
6161 encryption = [
6262 enabled : true ,
63+ annotate : true ,
6364 thread_scale : 1 ,
6465 aes : false
6566 ]
You can’t perform that action at this time.
0 commit comments