The Preserve Statement

preserve(<substring>) {
    < statements for which outputs should be preserved > 

stage_name = { 


Causes the outputs generated by statements inside the block to be marked as preserved, and thus will not be automatically cleaned up by a bpipe cleanup command.


Ensure the VCF file of a Variant Calling Operation is not Deleted by Cleanup

preserve("*.vcf") {
        exec """ 
                java -Xmx8g -jar GenomeAnalysisTK.jar -T UnifiedGenotyper 
                   -R $REF 
                   -I $input.bam 
                   -nt 4
                   --dbsnp $DBSNP 
                   -dcov 1600 
                   -l INFO 
                   -A AlleleBalance -A Coverage -A FisherStrand 
                   -glm BOTH
                   -metrics $output.metrics
                   -o $output.vcf