Laurence Amilhat | 6 May 11:32
Picon
Picon
Favicon

BioPerl and NHX tree

Hello,

I am trying to convert a newick treefile to a NHX file with specie tags 
in order to visualize it with the ATV viewer.
The script is working but I think there is an error because the ATV 
return this error message:
" Failed to read gene tree from 
"BX881913.1.p.om.4.tfa_prot.tfa.taxid.alltree.cons_outtree.rooted.long.nhx" 
[Error in NHX format: More than one distance to parent:"0.0"]"

When comparing the intree and outtree, they seem to be different, for 
example the intree file begins with (((((( and the outtree begins with (((

Do you have an idea of what I am doing wrong?

Here is my code:

use strict;
use Bio::TreeIO;
use Bio::Tree::NodeNHX;
use Getopt::Long;

my $tree_file;
my $outfile;
my $codefile;
my %corresp;

GetOptions('f|file:s' =>\$tree_file, 'o|out:s' =>\$outfile, 'c|code:s' 
=>\$codefile);

(Continue reading)

K. Shameer | 8 May 13:11
Picon
Favicon
Gravatar

HMMER - Parse hmmpfam output using bioperl - help!!

Dear All,

Here is the code snippet I used to get the hit name and hit length from an
hmmpfam file. I need to add the sequence start and end information
(query), description of domain, score and e-value.

I checked for the available method in deobfuscator, but I couldn't find
the details i wanted. Is there methods available in the Bio::SearchIO or
related modules.
__CODE__
$input = shift;
use Bio::SearchIO;
    my $in = Bio::SearchIO->new(-format => 'hmmer',
                               -file   => $input);
    while( my $result = $in->next_result ) {
        while( my $hit = $result->next_hit ) {
            print $hit->name(),"\t";
            while( my $hsp = $hit->next_hsp ) {
                print $hsp->length(), "\n";
            }
        }
    }
_END_

Result for test.pf
TRAP_240kDa     680

--
Thanks in advance,
K. Shameer
(Continue reading)

K. Shameer | 8 May 14:31
Picon
Favicon
Gravatar

Re: HMMER - Parse hmmpfam output using bioperl - help!!

Hi Sendu,

Thanks for your quick reply. This is really useful.

Separately, One quick question, I dont have hmmer_pull.pm. I am using an
older version of Bioperl. Is there any provision to  to download and
install individual bioperl modules separately ?

Thanks,
K. Shameer

> You'll find the relevant documentation under Bio::Search::Result,
> Bio::Search::Hit and Bio::Search::HSP.
>
> Using Bio::SearchIO->new(-format => 'hmmer_pull') will also give you a
> faster parser that may behave more closely to your expectation during
> your loops.
>
> Anyway, there are various obvious-named methods you can use:
>
> $result->query_description
> $hit->score
> $hit->significance
> $hit->description
> $hit->start('query')
> $hit->end('query')
> $hsp->start('query')
> $hsp->evalue
>
> etc.
(Continue reading)

Sendu Bala | 8 May 14:57
Picon
Favicon

Re: HMMER - Parse hmmpfam output using bioperl - help!!

K. Shameer wrote:
> Dear All,
> 
> Here is the code snippet I used to get the hit name and hit length from an
> hmmpfam file. I need to add the sequence start and end information
> (query), description of domain, score and e-value.
> 
> I checked for the available method in deobfuscator, but I couldn't find
> the details i wanted. Is there methods available in the Bio::SearchIO or
> related modules.
> __CODE__
> $input = shift;
> use Bio::SearchIO;
>     my $in = Bio::SearchIO->new(-format => 'hmmer',
>                                -file   => $input);
>     while( my $result = $in->next_result ) {
>         while( my $hit = $result->next_hit ) {
>             print $hit->name(),"\t";
>             while( my $hsp = $hit->next_hsp ) {
>                 print $hsp->length(), "\n";
>             }
>         }
>     }

You'll find the relevant documentation under Bio::Search::Result, 
Bio::Search::Hit and Bio::Search::HSP.

Using Bio::SearchIO->new(-format => 'hmmer_pull') will also give you a 
faster parser that may behave more closely to your expectation during 
your loops.
(Continue reading)

Sendu Bala | 8 May 15:43
Picon
Favicon

Re: HMMER - Parse hmmpfam output using bioperl - help!!

K. Shameer wrote:
> Hi Sendu,
> 
> Thanks for your quick reply. This is really useful.
> 
> Separately, One quick question, I dont have hmmer_pull.pm. I am using an
> older version of Bioperl. Is there any provision to  to download and
> install individual bioperl modules separately ?

Generally you can grab individual modules from svn, eg:
http://code.open-bio.org/svnweb/index.cgi/bioperl/view/bioperl-live/trunk/Bio/SearchIO/hmmer_pull.pm
(click the 'checkout' link).

However in this particular case it's really complicated, with that 
module needing lots of other new modules to work.

Use the normal hmmer.pm module; if you don't have any problems with it 
stick with it. Otherwise I'd recommend upgrading your entire Bioperl to 
1.5.2 or svn.
Prachi Shah | 8 May 22:54
Picon
Favicon
Gravatar

Can't parse blast report written by Bio::SearchIO::Writer::TextResultWriter

Hi all,

I am trying to order of HSPs within each BLAST Hit in the order of
ascending P-values. So, I parse my WU-BLAST report using Bio::SearchIO
and create new Result, Hit and HSP objects in the order and then write
out another BLAST report with the
Bio::SearchIO::Writer::TextResultWriter module. All this works fine.
But, when I try to parse this new blast report with
Bio::SearchIO::blast, I get the following error:

------------- EXCEPTION  -------------
MSG: no data for midline Query: 0       1
STACK Bio::SearchIO::blast::next_result
/tools/perl/5.6.1/lib/site_perl/5.6.1/Bio/SearchIO/blast.pm:1151
STACK toplevel bin/testBlastParse.pl:12
--------------------------------------

I have copied below sample sections of both blast reports and the
code. Any hints/ pointers/ suggestions are greatly appreciated.

Thanks,
Prachi

The old vs new blast reports look slightly different, esp. note the
HSP start and stop coordinates for the QUERY sequence.

**Snippet of OLD blast report (generated by WU-BLAST):
----------------------------------------------------------------------------------------------------
Query=  orf19.4890
        (4931 letters)
(Continue reading)

Jason Stajich | 9 May 00:29
Gravatar

Re: Can't parse blast report written by Bio::SearchIO::Writer::TextResultWriter

I suspect somehow you are not reconstituting the Hit or Result  
objects properly, but I didn't try and debug this myself.

You can specify a sort order function to the Result object now to  
specify the Hit order, maybe we should add sort function to Hit  
object for retrieving the underlying HSPs in a
programmable order.  Seems like that would be a cleaner fix.

-jason

On May 8, 2008, at 1:54 PM, Prachi Shah wrote:

> Hi all,
>
> I am trying to order of HSPs within each BLAST Hit in the order of
> ascending P-values. So, I parse my WU-BLAST report using Bio::SearchIO
> and create new Result, Hit and HSP objects in the order and then write
> out another BLAST report with the
> Bio::SearchIO::Writer::TextResultWriter module. All this works fine.
> But, when I try to parse this new blast report with
> Bio::SearchIO::blast, I get the following error:
>
> ------------- EXCEPTION  -------------
> MSG: no data for midline Query: 0       1
> STACK Bio::SearchIO::blast::next_result
> /tools/perl/5.6.1/lib/site_perl/5.6.1/Bio/SearchIO/blast.pm:1151
> STACK toplevel bin/testBlastParse.pl:12
> --------------------------------------
>
> I have copied below sample sections of both blast reports and the
(Continue reading)

Prachi Shah | 9 May 00:35
Picon
Favicon
Gravatar

Re: Can't parse blast report written by Bio::SearchIO::Writer::TextResultWriter

> I suspect somehow you are not reconstituting the Hit or Result objects properly,
> but I didn't try and debug this myself.

Its possible, but I haven't been to point out what is going wrong. But
then, the writer object is able to write the report without incident.
I am at a loss.

> You can specify a sort order function to the Result object now to specify the Hit order,
> maybe we should add sort function to Hit object for retrieving the underlying HSPs in a
> programmable order.  Seems like that would be a cleaner fix.

That would be ideal! But, until that is available, I will have to
make-do with such a solution.

Thanks,
Prachi

> On May 8, 2008, at 1:54 PM, Prachi Shah wrote:
>
>> Hi all,
>>
>> I am trying to order of HSPs within each BLAST Hit in the order of
>> ascending P-values. So, I parse my WU-BLAST report using Bio::SearchIO
>> and create new Result, Hit and HSP objects in the order and then write
>> out another BLAST report with the
>> Bio::SearchIO::Writer::TextResultWriter module. All this works fine.
>> But, when I try to parse this new blast report with
>> Bio::SearchIO::blast, I get the following error:
>>
>> ------------- EXCEPTION  -------------
(Continue reading)

Chris Fields | 9 May 02:03
Picon

Re: Can't parse blast report written by Bio::SearchIO::Writer::TextResultWriter

You can always post it as an enhancement request in bugzilla.  I don't  
think it would be too hard to implement.

chris

On May 8, 2008, at 5:35 PM, Prachi Shah wrote:

>> I suspect somehow you are not reconstituting the Hit or Result  
>> objects properly,
>> but I didn't try and debug this myself.
>
> Its possible, but I haven't been to point out what is going wrong. But
> then, the writer object is able to write the report without incident.
> I am at a loss.
>
>> You can specify a sort order function to the Result object now to  
>> specify the Hit order,
>> maybe we should add sort function to Hit object for retrieving the  
>> underlying HSPs in a
>> programmable order.  Seems like that would be a cleaner fix.
>
> That would be ideal! But, until that is available, I will have to
> make-do with such a solution.
>
> Thanks,
> Prachi
>
>
>> On May 8, 2008, at 1:54 PM, Prachi Shah wrote:
>>
(Continue reading)

punit kumar | 9 May 13:45
Picon
Favicon

help_to_acces_clustal-w

hi friends 
can any one suggest me that how can i install fully the bioperl in my computer
and how can access the  module of clustal-w in my programme .
i am wating of any persons reply .

 punit kumar kadimi.

      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
_______________________________________________
Bioperl-l mailing list
Bioperl-l <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Gmane