Commit be1675be authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Fix for exonerate 2.2.0 that looks to have problems with target filename containing :

parent fb938c79
......@@ -381,7 +381,7 @@ for(my $r=0; $r<=$#original_names; $r++){
download_seq($cache, $amont, $aval, $chr);
$intronStep = 1;
unshift(@nt_GIs, "$chr:$amont-$aval");
unshift(@nt_GIs, "$chr-$amont-$aval");
}
}
}
......@@ -1016,19 +1016,19 @@ sub download_seq{
}
if ( $amont =~ /^\d+$/ && $aval =~ /^\d+$/ ){
fetch_fasta("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=$pacc2puid&rettype=fasta&retmode=text&from=$amont&to=$aval&tool=ProtoGene&email=smoretti\@unil.ch", "$cache/$acc[$a]:$from-$to.fas");
fetch_fasta("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=$pacc2puid&rettype=fasta&retmode=text&from=$amont&to=$aval&tool=ProtoGene&email=smoretti\@unil.ch", "$cache/$acc[$a]-$from-$to.fas");
}
else{
fetch_fasta("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=$pacc2puid&rettype=fasta&retmode=text&tool=ProtoGene&email=smoretti\@unil.ch", "$cache/$acc[$a].fas");
}
#FIXME: Don't remember exactly what all this function does
#FIXME Don't remember exactly what all this function does
my $checkSeq = '';
$checkSeq = `grep -v '>' "$cache/$acc[$a]:$from-$to.fas"` if ( $amont =~ /^\d+$/ && $aval =~ /^\d+$/ );
$checkSeq = `grep -v '>' "$cache/$acc[$a]-$from-$to.fas"` if ( $amont =~ /^\d+$/ && $aval =~ /^\d+$/ );
$checkSeq = `grep -v '>' "$cache/$acc[$a].fas"` if ( $amont !~ /^\d+$/ || $aval !~ /^\d+$/ );
if ( $checkSeq !~ /^[A-Za-z]/ && $cp==0 ){
# if ( -s "$cache/$acc[$a]:$from-$to.fas" <120 && $cp==0){ #Instead of multiple downloads, only seq name and header
unlink("$cache/$acc[$a]:$from-$to.fas") if ( $amont =~ /^\d+$/ && $aval =~ /^\d+$/ );
unlink("$cache/$acc[$a]-$from-$to.fas") if ( $amont =~ /^\d+$/ && $aval =~ /^\d+$/ );
unlink("$cache/$acc[$a].fas") if ( $amont !~ /^\d+$/ || $aval !~ /^\d+$/ );
# $amont = '';
$aval = $aval - 5000 if ( $aval =~ /^\d+$/ );
......
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