Chris Fields | 1 Aug 04:15 2007
Picon

Re: Perl 3D OpenGL


On Jul 31, 2007, at 7:00 AM, Jay Hannah wrote:

> On Jul 29, 2007, at 4:08 PM, Grafman Productions wrote:
>> If this posting is inappropriate, please let me know - my apologies.
>
> Not at all. AFAIK this is the perfect place to discuss any
> contributions you're motivated to make to the BioPerl project.
>
>> I recently came across an article on BioPerl, and it occurred to me
>> that
>> there might be some need for 3D rendering within your BioPerl  
>> project.
>>
>> I released a number of new/updated Perl OpenGL (POGL) modules this
>> year,
>> along with benchmarks that demonstrate that it performs comparably
>> to C.
>>
>> If there's a need for 3D features within BioPerl, and if I can be
>> of any
>> assistance in helping to add such features, I would enjoy the
>> opportunity.
>
> I know nothing about 3D modeling in biology, nor do I hang out with
> any protein structure folks, but 3D always sounds sexy. -grin-
>
> If you're new to bioinformatics (I certainly am) you might want to
> read this:
>
(Continue reading)

Shameer Khadar | 1 Aug 07:45 2007
Picon

Re: Perl 3D OpenGL

Hi,
Open-GL/3D contributions are always welcome !!!
What about Perl-OpenGL/3D implimentation of a web-based 3D-Viewer like Jmol.

 http://jmol.sourceforge.net/

(So we dont need to worry about Java installation and stuffs :) develop it
and deploy it in Perl - eternal happiness !!!)
-- 
SK
>
> On Jul 31, 2007, at 7:00 AM, Jay Hannah wrote:
>
>> On Jul 29, 2007, at 4:08 PM, Grafman Productions wrote:
>>> If this posting is inappropriate, please let me know - my apologies.
>>
>> Not at all. AFAIK this is the perfect place to discuss any
>> contributions you're motivated to make to the BioPerl project.
>>
>>> I recently came across an article on BioPerl, and it occurred to me
>>> that
>>> there might be some need for 3D rendering within your BioPerl
>>> project.
>>>
>>> I released a number of new/updated Perl OpenGL (POGL) modules this
>>> year,
>>> along with benchmarks that demonstrate that it performs comparably
>>> to C.
>>>
>>> If there's a need for 3D features within BioPerl, and if I can be
(Continue reading)

Alicia Amadoz | 1 Aug 09:13 2007
Picon

trying to save blast hit sequences to fasta file

Hi, I would like to save my hit sequences from a blast result in a fasta
file. I am trying some things but I have problems using Bio::SearchIO
and Bio::SeqIO. Hope anyone could help me with this. Here is my current
code:

# my $seq_out = Bio::SeqIO->new("-file" => ">$fasfilename", "-format" =>
"fasta");
my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
=> "fasta");
while(my $result = $blast_report->next_result()) {
   while(my $hit = $result->next_hit()) {
      while(my $hsp = $hit->next_hsp()) {
         my $hseq = $hsp->hit_string();
         # $seq_out->write_seq($hseq);
         $seq_out->write_result($hseq);
      }
   }
}

Here the error is,

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: ResultWriter not defined.

I couldn't find any kind of documentation about ResultWriter.
Thanks in advance,
Alicia
Xianran Li | 1 Aug 10:11 2007
Picon

Re: trying to save blast hit sequences to fasta file

The $hseq->$hsp->hit_string() will return the string of hit sequence, rather than an objective of
Bio::Seq. So may be you should construct a objective firstly, then you could use
$seq_out->write_seq($hseq_obj) to write the seq into a fasta file.

# my $seq_out = Bio::SeqIO->new("-file" => ">$fasfilename", "-format" =>"fasta");
  my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"=> "fasta");
while(my $result = $blast_report->next_result()) {
   while(my $hit = $result->next_hit()) {
      while(my $hsp = $hit->next_hsp()) {
         my $hseq = $hsp->hit_string(); 
            $hseq =~ s/-//g; #### remove the gap within the aligment
         my $hseq_obj = Bio::Seq->new(-display_id => $id, -seq => $hseq); 
         # $seq_out->write_seq($hseq);
         $seq_out->write_result($hseq_obj);
      }
   }
}

Xianran
----- Original Message ----- 
From: "Alicia Amadoz" <Alicia.Amadoz <at> uv.es>
To: <bioperl-l <at> lists.open-bio.org>
Sent: Wednesday, August 01, 2007 3:13 PM
Subject: [Bioperl-l] trying to save blast hit sequences to fasta file

> Hi, I would like to save my hit sequences from a blast result in a fasta
> file. I am trying some things but I have problems using Bio::SearchIO
> and Bio::SeqIO. Hope anyone could help me with this. Here is my current
> code:
> 
(Continue reading)

Alicia Amadoz | 1 Aug 12:25 2007
Picon

Re: trying to save blast hit sequences to fasta file

Hi, I have tried what you suggested and I get also some errors.
With this code,

my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
=> "fasta");
while(my $result = $blast_report->next_result()) {
   while(my $hit = $result->next_hit()) {
      while(my $hsp = $hit->next_hsp()) {
	my $hseq = $hsp->hit_string(); 
        $hseq =~ s/-//g; #### remove the gap within the aligment
        my $hseq_obj = Bio::Seq->new(-display_id => $id, -seq => $hseq); 
        $seq_out->write_seq($hseq_obj);
      }
   }				
}

I have the following error:

Can't locate object method "write_seq" via package "Bio::SearchIO::fasta"

And using write_result methog with this code,

my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
=> "fasta");
while(my $result = $blast_report->next_result()) {
   while(my $hit = $result->next_hit()) {
      while(my $hsp = $hit->next_hsp()) {
	my $hseq = $hsp->hit_string(); 
        $hseq =~ s/-//g; #### remove the gap within the aligment
        my $hseq_obj = Bio::Seq->new(-display_id => $id, -seq => $hseq); 
(Continue reading)

neeti somaiya | 1 Aug 13:28 2007
Picon

URGENT : Problem in OMIM parser

I have downloaded the omim.txt file from NCBI ftp site and I am running my
attached parser on this file, the parser run stops in between with this :-

------------- EXCEPTION  -------------
MSG: a part/organism must be assigned
STACK Bio::Phenotype::OMIM::OMIMentry::add_clinical_symptoms
/usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMentry.pm:566
STACK Bio::Phenotype::OMIM::OMIMparser::_finer_parse_symptoms
/usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMparser.pm:555
STACK Bio::Phenotype::OMIM::OMIMparser::_createOMIMentry
/usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMparser.pm:536
STACK Bio::Phenotype::OMIM::OMIMparser::next_phenotype
/usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMparser.pm:272
STACK toplevel parse_omim_original.pl:47

--------------------------------------

What is the reason for this?
Can anyone guide me please.

--

-- 
-Neeti
Even my blood says, B positive
Jay Hannah | 1 Aug 15:30 2007
Picon

Re: trying to save blast hit sequences to fasta file

On Wed, 1 Aug 2007, Alicia Amadoz wrote:
> Hi, I have tried what you suggested and I get also some errors.
> With this code,
>
> my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
> => "fasta");
> while(my $result = $blast_report->next_result()) {
>   while(my $hit = $result->next_hit()) {
>      while(my $hsp = $hit->next_hsp()) {
> 	my $hseq = $hsp->hit_string();
>        $hseq =~ s/-//g; #### remove the gap within the aligment
>        my $hseq_obj = Bio::Seq->new(-display_id => $id, -seq => $hseq);
>        $seq_out->write_seq($hseq_obj);
>      }
>   }
> }
>
> I have the following error:
>
> Can't locate object method "write_seq" via package "Bio::SearchIO::fasta"

You don't want to write_seq() to a SearchIO, you want to write_seq() to a 
SeqIO. Try this:

my $seq_out = Bio::SeqIO->new(-file => ">$fasfilename", -format => "fasta");
while(my $result = $blast_report->next_result()) {
    while(my $hit = $result->next_hit()) {
       while(my $hsp = $hit->next_hsp()) {
 	my $hseq = $hsp->hit_string();
         $hseq =~ s/-//g; #### remove the gap within the aligment
(Continue reading)

Chris Fields | 1 Aug 17:02 2007
Picon

Re: URGENT : Problem in OMIM parser

Neeti,

Only post to one list email address, namely the one I'm responding to  
and the one shown here:

http://bioperl.org/mailman/listinfo/bioperl-l

The others are aliases so you essentially posted three times.  As for  
your question: there was no attached script or any additional  
information (bioperl version would have also been nice), so we can't  
help you until we have something more to work with.

chris

On Aug 1, 2007, at 6:28 AM, neeti somaiya wrote:

> I have downloaded the omim.txt file from NCBI ftp site and I am  
> running my
> attached parser on this file, the parser run stops in between with  
> this :-
>
> ------------- EXCEPTION  -------------
> MSG: a part/organism must be assigned
> STACK Bio::Phenotype::OMIM::OMIMentry::add_clinical_symptoms
> /usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMentry.pm:566
> STACK Bio::Phenotype::OMIM::OMIMparser::_finer_parse_symptoms
> /usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMparser.pm:555
> STACK Bio::Phenotype::OMIM::OMIMparser::_createOMIMentry
> /usr/lib/perl5/site_perl/5.8.8/Bio/Phenotype/OMIM/OMIMparser.pm:536
> STACK Bio::Phenotype::OMIM::OMIMparser::next_phenotype
(Continue reading)

Torsten Seemann | 2 Aug 02:50 2007
Picon
Picon

Re: trying to save blast hit sequences to fasta file

Alicia,

> Hi, I would like to save my hit sequences from a blast result in a fasta
> file. I am trying some things but I have problems using Bio::SearchIO
> and Bio::SeqIO. Hope anyone could help me with this. Here is my current
> code:
> # my $seq_out = Bio::SeqIO->new("-file" => ">$fasfilename", "-format" =>
> "fasta");
> my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
> => "fasta");
> ...
>        my $hseq = $hsp->hit_string();
>          # $seq_out->write_seq($hseq);
>          $seq_out->write_result($hseq);

You have encountered two common problems for BioPerl beginners:

1. "fasta" means two different things! In SearchIO it refers to the
output format of the "fasta" sequence alignment software. In SeqIO it
refers to a file format that stores just sequences. Confusing, I know.
You need SeqIO and write_seq, not SearchIO and write_result.

2. $hseq is a STRING which has the raw sequence letters in it.
However, the write_seq() method needs a Bio::Seq object (which has
extra details like the name and ID) not a raw string.

The example code Jay Hannah supplied in his reply looks pretty good,
you should try it.

--

-- 
(Continue reading)

Alicia Amadoz | 2 Aug 09:06 2007
Picon

Re: trying to save blast hit sequences to fasta file

Hi, thanks for your help and suggestions. I have tried the example code
of Jay Hannah and it works perfectly. But what I need to save in fasta
format is the whole sequence in the database that is similar to my query
sequence. I don't understand very well the difference between
hit_string() and query_string(), are they the whole sequence that is
similiar (about hit_string), a part of the whole sequence or just the
part that is aligned to my query string? 

With the previous code what I have are different sequences in length
with the same id as my query string, so I am not sure that I am doing
what I need to do. Any light on this point?

Thank you very much for your help.
Alicia

> Alicia,
> 
> > Hi, I would like to save my hit sequences from a blast result in a fasta
> > file. I am trying some things but I have problems using Bio::SearchIO
> > and Bio::SeqIO. Hope anyone could help me with this. Here is my current
> > code:
> > # my $seq_out = Bio::SeqIO->new("-file" => ">$fasfilename", "-format" =>
> > "fasta");
> > my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
> > => "fasta");
> > ...
> >        my $hseq = $hsp->hit_string();
> >          # $seq_out->write_seq($hseq);
> >          $seq_out->write_result($hseq);
> 
(Continue reading)


Gmane