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 {
if ( $distant==1 ){
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";
open (F3, '<', 'web_tempo.result') or die;
while ($_=<F3>){
......@@ -691,6 +691,14 @@ sub PARSING {
}
elsif ( $method =~/^geneid$/i ){
if ( $database !~ /pdb/i && $database !~ /swiss/i && $locale =~ /1|2/){
if ( $intra_res=~ />.*?[A-Za-z0-9_\.]+?\s+/ ){
while ( $intra_res=~ />.*?([A-Za-z0-9_\.]+?)\s+/sg ){
my $refseq = $1;
$refseq =~ s/\.\d+$//;
push (@result_not_sort, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\tncbi");
}
}
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;
......@@ -702,6 +710,7 @@ sub PARSING {
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) ){
my $refseq;
if ( $locale==1 ){
......@@ -758,6 +767,14 @@ sub MULTI_EQUIVALENT {
my($query, $identity, $recouvrement, $bits, $evalue, $intra_res) = @_;
my @result=();
if ( $intra_res=~ />.*?[A-Za-z0-9_\.]+?\s+/ ){
while ( $intra_res=~ />.*?([A-Za-z0-9_\.]+?)\s+/sg ){
my $refseq = $1;
$refseq =~ s/\.\d+$//;
push (@result, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\tncbi");
}
}
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;
......@@ -767,6 +784,7 @@ sub MULTI_EQUIVALENT {
$refseq =~ s/\.\d+$//;
push (@result, "$query\t$refseq\t$identity\t$recouvrement\t$bits\t$evalue\t$databank");
}
}
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