Commit 7e8b670c authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Cleaning

parent b12feebd
......@@ -727,9 +727,10 @@ sub getFastaHeaderAnnot{
my ($bestTarget) = @_;
#Get annotation from nucleotide file header
open(my $BEST, '<', "$cache/${bestTarget}.fas");
my $annot=<$BEST> || '';
open(my $BEST, '<', "$cache/$bestTarget.fas");
my $annot = <$BEST> || '';
close $BEST;
chomp($annot);
$annot =~ s/^ *[^ ]* //;
$annot =~ s/[\. ]*$//;
......@@ -1174,7 +1175,7 @@ sub prepareResults4CDS{
($bestOne, $annot) = prepareAnnotation($POSITIONS{0});
my $seqName = buildAnnotation($bestOne, $annot, $input_name, $blastHit);
my $seqCDS = buildCDSseq($input_seq, %POSITIONS);
$resultPOS = ">".$seqName."\n".$seqCDS."\n";
$resultPOS = '>'.$seqName."\n".$seqCDS."\n";
}
return($resultPOS, $bestOne);
......@@ -1191,11 +1192,11 @@ sub prepareResults4BOJ{
($bestOne, $annot) = prepareAnnotation($EXONBORDERS{0});
my $seqName = buildAnnotation($bestOne, $annot, $input_name, $blastHit);
my $seqBOJ = buildBOJseq($input_seq, %EXONBORDERS);
$resultBOJ = ">".$seqName."\n".$seqBOJ."\n";
$resultBOJ = '>'.$seqName."\n".$seqBOJ."\n";
}
elsif ( $intronLess ne '' ){
($bestOne, $annot) = prepareAnnotation($intronLess);
my $description = $annot;#getFastaHeaderAnnot($intronLess);
my $description = $annot;
my $readyname = '';
$readyname = fastaHeaders4ProtoGene($input_name);
if ( $intronLess =~ /\:.+/ || $bestOne =~ /^N[CTWZG]_/ || $bestOne =~ /^AC_/ || $nameLess =~ /^N[CTWZG]_/ || $nameLess =~ /^AC_/ ){
......@@ -1219,9 +1220,9 @@ sub prepareAnnotation{
my ($best_pos) = @_;
my $bestOne = $best_pos;
$bestOne =~ s/:.+$// if ( $best_pos !~ /^\d+$/ );
$bestOne =~ s{:.+$}{} if ( $best_pos !~ /^\d+$/ );
if ( $bestOne =~ /^\d+$/ ){
open(my $BEST, '<', "$cache/${bestOne}.fas");
open(my $BEST, '<', "$cache/$bestOne.fas");
FIND_BEST:
while(<$BEST>){
if ($_ =~ /^>/){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment