From d8a6fd2170e56b59ea7f71f378595002c83dcccb Mon Sep 17 00:00:00 2001 From: Katharina Hoff Date: Fri, 6 Sep 2019 08:37:15 +0200 Subject: [PATCH] braker.pl : make --cleanup default (new argument for disabling is --nocleanup) --- scripts/braker.pl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/braker.pl b/scripts/braker.pl index d9aad7c..f3ad9cd 100755 --- a/scripts/braker.pl +++ b/scripts/braker.pl @@ -367,12 +367,12 @@ to specify 0. --checkSoftware Only check whether all required software is installed, no execution of BRAKER ---cleanup Delete all files that are typically not +--nocleanup Skip deletion of all files that are typically not used in an annotation project after running braker.pl. (For tracking any problems with a braker.pl run, you might want to keep these files, therefore - cleanup is not switched on by default.) + nocleanup can be activated.) DEVELOPMENT OPTIONS (PROBABLY STILL DYSFUNCTIONAL) @@ -614,8 +614,9 @@ my @splice_cmd_line; my @splice; my $AUGUSTUS_hints_preds; # for UTR training only (updating existing runs) -my $cleanup; # enable file and directory cleanup after successful run +my $cleanup = 1; # enable file and directory cleanup after successful run # list of forbidden words for species name +my $nocleanup; my $transmasked_fasta; # transmaked genome file for GeneMark my $min_contig; # min contig length for GeneMark, e.g. to be used in combination # with transmasked_fasta @@ -696,7 +697,7 @@ 'flanking_DNA=i' => \$flanking_DNA, 'stranded=s' => \@stranded, 'checkSoftware!' => \$checkOnly, - 'cleanup!' => \$cleanup, + 'nocleanup!' => \$nocleanup, 'grass!' => \$grass, 'transmasked_fasta=s' => \$transmasked_fasta, 'min_contig=s' => \$min_contig, @@ -717,6 +718,9 @@ exit(0); } +if($nocleanup){ + $cleanup = 0; +} # Make paths to input files absolute ########################################### @@ -1027,7 +1031,7 @@ . __LINE__ ."\nCannot open file $logfile!\n"); print LOG $logString; -if ( !-d $genemarkDir ) { +if ( (!-d $genemarkDir) && ! $trainFromGth) { make_path($genemarkDir) or die("ERROR in file " . __FILE__ ." at line " . __LINE__ ."\nFailed to create direcotry $genemarkDir!\n"); print LOG "\# "