Commit 8aba9ba8 authored by Sebastien Moretti's avatar Sebastien Moretti
Browse files

Fix for new NCBI BLAST raw format without GI and some other stuffs

parent b3f4d3ee
...@@ -631,7 +631,7 @@ sub PARSING { ...@@ -631,7 +631,7 @@ sub PARSING {
if ( $distant==1 ){ if ( $distant==1 ){
my $version_d, my $database_d, my $poste_d; my $version_d, my $database_d, my $poste_d;
undef $/; ($query, $length_query) = ( $intra_res[0] =~ /Query=\s+(\S+)\s+Length=\s*(\d+)/smo ); undef $/; ($query, $length_query) = ( $intra_res[0] =~ /Query=\s+(\S+).*?\s+Length=\s*(\d+)/smo );
$/ = "\n"; $/ = "\n";
open (F3, '<', 'web_tempo.result') or die; open (F3, '<', 'web_tempo.result') or die;
while ($_=<F3>){ while ($_=<F3>){
...@@ -691,15 +691,24 @@ sub PARSING { ...@@ -691,15 +691,24 @@ sub PARSING {
} }
elsif ( $method =~/^geneid$/i ){ elsif ( $method =~/^geneid$/i ){
if ( $database !~ /pdb/i && $database !~ /swiss/i && $locale =~ /1|2/){ if ( $database !~ /pdb/i && $database !~ /swiss/i && $locale =~ /1|2/){
while ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/sg ){ if ( $intra_res=~ />.*?[A-Za-z0-9_\.]+?\s+/ ){
my $databank = $1; while ( $intra_res=~ />.*?([A-Za-z0-9_\.]+?)\s+/sg ){
my $last = $4; my $refseq = $1;
my $refseq = $2; $refseq =~ s/\.\d+$//;
if ( $databank eq 'pdb' ){ push (@result_not_sort, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\tncbi");
$refseq .= $last; }
}
elsif ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/ ){
while ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/sg ){
my $databank = $1;
my $last = $4;
my $refseq = $2;
if ( $databank eq 'pdb' ){
$refseq .= $last;
}
$refseq =~ s/\.\d+$//;
push (@result_not_sort, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\t$databank");
} }
$refseq =~ s/\.\d+$//;
push (@result_not_sort, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\t$databank");
} }
} }
elsif ( $database=~ /pdb|pdbaa/i && ($locale==1 || $locale==2) ){ elsif ( $database=~ /pdb|pdbaa/i && ($locale==1 || $locale==2) ){
...@@ -758,14 +767,23 @@ sub MULTI_EQUIVALENT { ...@@ -758,14 +767,23 @@ sub MULTI_EQUIVALENT {
my($query, $identity, $recouvrement, $bits, $evalue, $intra_res) = @_; my($query, $identity, $recouvrement, $bits, $evalue, $intra_res) = @_;
my @result=(); my @result=();
while ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/g ){ if ( $intra_res=~ />.*?[A-Za-z0-9_\.]+?\s+/ ){
my $databank = $1; while ( $intra_res=~ />.*?([A-Za-z0-9_\.]+?)\s+/sg ){
my $last = $4; my $refseq = $1;
my $refseq = $2; $refseq =~ s/\.\d+$//;
push (@result, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\tncbi");
if ( $databank eq 'pdb' ){ $refseq .= $last; } }
$refseq =~ s/\.\d+$//; }
push (@result, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\t$databank"); elsif ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/ ){
while ( $intra_res=~ />.*?(gb|prf|emb|sp|pir|tpe|ref|prf|dbj|ddbj|pdb)[\|]+([A-Za-z0-9_\.]+?)(\s|\|(.{1}))/g ){
my $databank = $1;
my $last = $4;
my $refseq = $2;
if ( $databank eq 'pdb' ){ $refseq .= $last; }
$refseq =~ s/\.\d+$//;
push (@result, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\t$databank");
}
} }
return (@result); return (@result);
} }
......
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