diff --git a/scripts/confirm_genes.pl b/scripts/confirm_genes.pl index db2560a76..9d87bc330 100755 --- a/scripts/confirm_genes.pl +++ b/scripts/confirm_genes.pl @@ -623,14 +623,16 @@ sub create_transcript_file { }else { $prefix = $wormbase->chromosome_prefix."${chrom}_"; } - my $trinity = -e "${gffdir}/${prefix}BLAT_Trinity_BEST.gff" ? "${prefix}BLAT_Trinity_BEST.gff" : ''; - my $isoseq = -e "${gffdir}/${prefix}BLAT_IsoSeq_BEST.gff" ? "${prefix}BLAT_IsoSeq_BEST.gff" : ''; - $wormbase->run_command("cd $gffdir; cat ${prefix}BLAT_EST_BEST.gff ${prefix}BLAT_mRNA_BEST.gff $trinity $isoseq > ${prefix}BLAT_TRANSCRIPT_BEST.gff", $log); + my $file = "${prefix}BLAT_TRANSCRIPT_BEST.gff"; + + return if $file; # don't rebuild the file every single time - # only elegans has OSTs and RSTs - $wormbase->run_command("cd $gffdir; cat ${prefix}BLAT_OST_BEST.gff ${prefix}BLAT_RST_BEST.gff >> ${prefix}BLAT_TRANSCRIPT_BEST.gff", $log) if ($wormbase->species eq 'elegans'); + my $trinity = -e "${gffdir}/${prefix}BLAT_Trinity_BEST.gff" ? "${prefix}BLAT_Trinity_BEST.gff" : ''; + my $isoseq = -e "${gffdir}/${prefix}BLAT_IsoSeq_BEST.gff" ? "${prefix}BLAT_IsoSeq_BEST.gff" : ''; + my $more = ($wormbase->species eq 'elegans') ? "${prefix}BLAT_OST_BEST.gff ${prefix}BLAT_RST_BEST.gff" : ''; # only elegans has OSTs and RSTs + $wormbase->run_command("cd $gffdir; cat ${prefix}BLAT_EST_BEST.gff ${prefix}BLAT_mRNA_BEST.gff $trinity $isoseq $more > $file", $log); } ################