Jason Stajich | 1 Oct 2004 02:01
Favicon

Re: Existing bioperl module/function?

See the example HOWTO Feature-Annotation - if the peptide has a has an  
annotated CDS you can grab that cross-reference from the genbank file  
and then use the Bio::DB::GenBank to retrieve that CDS record.

 From my tutorials you can also see example solution.
With some background here
http://jason.open-bio.org/Bioperl_Tutorials/Duke_2004/ 
BioperlProjects.pdf
and an answer for retrieval from swissprot/EMBL some modification  
needed to get it from GenPept/GenBank.

   
http://jason.open-bio.org/Bioperl_Tutorials/Duke_2004/problem_sets/ 
Project1/get_cds_for_protein.pl

-jason

On Sep 30, 2004, at 6:48 PM, Sun, Jian wrote:

> Dear all;
>    I need some help on this problem: Is there any bioperl module or  
> functions available to be used to get the corresponding nucletide  
> sequence of a certain protein ? Then also can retrive the oligo  
> sequence of a specified peptide segment of this protein sequence?
>
>    At the NCBI site, we can retrieve the both sequences through its  
> protein and nucleotide database seperately and then find the  
> corresponding matches at the certain sequence position. In bioperl, it  
> is possible that I may can use the reverse translation to soluve this,  
> but it leads to the degenerate sequence, not the one to one match of a  
(Continue reading)

Richard Adams | 1 Oct 2004 12:08
Picon
Picon

argument checking

I was wondering what developers thought about a generic argument 
checking method, say in Bio::Root::Root.
Obviously the world has continued turning without it since BioPerl's 
inception but it might
save  quite few lines of code throughout the whole package.
What I'm thinking of is

e.g., in usage
sub x {
my ($self, $arg1, $arg2) =  <at> _;
$self->check_args('Bio::SeqI' => $arg1,
                                'array',       => $arg2);
##.. rest of method
}

Apologies if there is this functionality lurking somewhere and I've not 
found it yet.

Richard

--

-- 
Dr Richard Adams
Psychiatric Genetics Group,
Medical Genetics,
Molecular Medicine Centre,
Western General Hospital,
Crewe Rd West,
Edinburgh UK
EH4 2XU

(Continue reading)

Aaron J. Mackey | 1 Oct 2004 14:09

Re: argument checking

This idea is an aspect of programming by contract; greatly useful while 
debugging, but needs a way to be turned off *completely* in production 
code (i.e. not just check_args immediately returning success, but 
check_args not even being a part of the call stack) to not make our 
speed problems even worse.

Hmm, I guess you mean to replace existing code that already does the 
same and incurs the same penalty ... I'd argue that the "specification" 
should only be listed once, and the call to _rearrange is probably a 
good place for it to happen, i.e.:

sub foobar {
   my $self = shift;
   my ($doodad, $entries) =
     $self->process_arguments(
       [qw(DOODAD ENTRIES)],                # usual _rearrange argument
       [qw(Bio::Seq::Doodad ARRAY)],        # variable "isa" 
specification
       # override default error messages, with keyword replacement:
       ["Come on, gimme a Doodad, not a [#REF#]!", undef],
     );
   # ...
}

If we did something like this, then process_arguments() could turn into 
the more simpler _rearrange when in production (controlled via ?? - 
lots of options here).  This could be done with source filter trickery 
or the "optimizer" module for maximum benefit.

-Aaron
(Continue reading)

Jason Stajich | 1 Oct 2004 16:00
Favicon

Re: Ask help for Bio::Tools::Run::Primer3

In looking at the code some more, shouldn't we make the default 
'primer3_core' instead?

You can always override it with the program_name function.
$primer3->program_name('my_superfast_primer3');

-jason
On Sep 29, 2004, at 4:38 PM, Ewing, Adam D. wrote:

> Yes, it does matter... simply change the name of primer3_core to 
> primer3, put it in your path, and you should be good to go!
>
> Adam
>
> -----Original Message-----
> From: bioperl-l-bounces <at> portal.open-bio.org on behalf of Fengkai Zhang 
> (Tony)
> Sent: Wed 9/29/2004 4:21 PM
> To: bioperl-l <at> bioperl.org
> Subject: [Bioperl-l] Ask help for Bio::Tools::Run::Primer3
>
> Hi, I am a newbie for bioperl and met the below question.
>
> I was trying to use Bio::Tools::Run::Primer3. When I run the example
> code in the documentation of this module, I got the following error
> message:
> --------------------------------
> <shell> $ perl -I ../primer3_1.0.0/src/ -w primer3run_test.pl
>
> Use of uninitialized value in concatenation (.) or string at
(Continue reading)

Scott Cain | 1 Oct 2004 16:13

Re: Bioperl-l Digest, Vol 18, Issue 1

Allen,

I apparently don't get mail addressed to scain <at> pub.open-bio.org, so I
didn't get this message until this morning when I read the bioperl
digest.

So, why can't I handle it this way?  It seems to work just fine for the
bulk loader.

Scott

On Fri, 2004-10-01 at 10:02, bioperl-l-request <at> portal.open-bio.org
wrote:
> Date: Wed, 29 Sep 2004 13:52:39 -0700 (PDT)
> From: Allen Day <allenday <at> ucla.edu>
> Subject: [Bioperl-l] Re: [Bioperl-guts-l] bioperl commit
> To: Scott Cain <scain <at> pub.open-bio.org>
> Cc: Bioperl <bioperl-l <at> bioperl.org>
> Message-ID: <Pine.LNX.4.58.0409291351410.27667 <at> sumo.ctrl.ucla.edu>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> Scott,
> 
> You can't handle Ontology_term as a SimpleValue, that's why I didn't
> implement it that way.  You need to rather create a
> Bio::Annotation::OntologyTerm.
> 
> -Allen
> 
> On Sat, 25 Sep 2004, Scott Cain wrote:
(Continue reading)

Nathan (Nat) Goodman | 1 Oct 2004 16:34
Picon
Favicon

Re: argument checking

> I was wondering what developers thought about a generic argument 
> checking method, say in Bio::Root::Root.

There's a lot of CPAN code that plays in this space.  Class::MakeMethods,
Class::Meta::Type, Getargs::Long, Params::Check are a few of many.  I saw a
nice module that lets you specify types and default values in a very
readbale syntax, but for the life of me can't find it again!  Sigh...  We're
heading in this direction with our Class::AutoClass, also (no doubt based on
one of these others).  

If anyone wants to collaborate on this, we'd be delighted.

Best, 
Nat
Aaron J. Mackey | 1 Oct 2004 16:36

Re: argument checking


I think Class::Contract is the best declarative-style approach, but 
would require significant architectural changes to use it in BioPerl (I 
expect; happy to have someone prove me wrong).

-Aaron

On Oct 1, 2004, at 10:34 AM, Nathan ((Nat)) Goodman wrote:

>> I was wondering what developers thought about a generic argument
>> checking method, say in Bio::Root::Root.
>
> There's a lot of CPAN code that plays in this space.  
> Class::MakeMethods,
> Class::Meta::Type, Getargs::Long, Params::Check are a few of many.  I 
> saw a
> nice module that lets you specify types and default values in a very
> readbale syntax, but for the life of me can't find it again!  Sigh...  
> We're
> heading in this direction with our Class::AutoClass, also (no doubt 
> based on
> one of these others).
>
> If anyone wants to collaborate on this, we'd be delighted.
>
> Best,
> Nat
>
>
--
(Continue reading)

Nathan (Nat) Goodman | 1 Oct 2004 16:50

RE: argument checking

> I think Class::Contract is the best declarative-style 
> approach, 

Yeah, that's another good one.  

> but would require significant architectural changes 
> to use it in BioPerl (I expect; happy to have someone prove me wrong).

I'm sure it would be a lot of work to retrofit existing code (and why bother
-- the existing code already works, right :), but it might make sense to add
this capability for people who are writing new code and want to use it.
FYI, Class::AutoClass is designed to coexist nicely with BioPerl (although,
the CPAN distro may not play well with BioPerl out of the box because we had
to include some functionality already present in BioPerl's Root to avoid a
CPAN-dependence on BioPerl).  So, if people want to try out some argument
checking methods, this may offer an easy venue to do so.  

Best,
Nat
Fengkai Zhang (Tony | 1 Oct 2004 16:54
Picon
Favicon

Re: Ask help for Bio::Tools::Run::Primer3

Hi, Thomas, 

Thanks for your reply.

I tried the way suggested by Jason, ans still had the problem. I also
think the module(Bio::Tools::Run::Primer3) is buggy. I solved the
problem in following way:

The line 343:
 my $executable = $self->{program_dir}.$self->{program};
may be changed to:
 my $executable = $self->{program};

$self->{program_dir} has been called in $self->executable in new()
constructor through the parent class WrapperBase and needn't call
again here. Otherwise perl will give warning msg if PRIMER3
environment variable is not setup.

Also, Primer3 itself seems not setup PRIMER3 variable automatically in
Linux system. It may be setup manually.

If following the instruction in Primer3 (downloaded in Sept 2004), the
executable program is "primer3_core" instead of "primer3", which is
defaut in Bio::Tools::Run::Primer3. Two ways to solve this problem.
1. Simply change name of "primer3_core" to "primer3" as suggested by
Adam.
2. Use "-program" in new() constructor when initializing a Primer3
object. I think it should be included in the document of
Bio::Tools::Run::Primer3. The hash value of "-program" can be either
absolute path or relative path of primer3 program to your perl
(Continue reading)

Fengkai Zhang (Tony | 1 Oct 2004 16:54
Picon
Favicon

RE: Ask help for Bio::Tools::Run::Primer3

Thanks for your reply. It still has problem after changing the file
name. I figured it out and you may see my reply.

Tony
-------------------
> Yes, it does matter... simply change the name of primer3_core to
primer3, put it in your path, and you should be good to go!
> 
> Adam
> 
> -----Original Message-----
> From: bioperl-l-bounces <at> portal.open-bio.org on behalf of Fengkai
Zhang (Tony)
> Sent: Wed 9/29/2004 4:21 PM
> To: bioperl-l <at> bioperl.org
> Subject: [Bioperl-l] Ask help for Bio::Tools::Run::Primer3
>  
> Hi, I am a newbie for bioperl and met the below question.
> 
> I was trying to use Bio::Tools::Run::Primer3. When I run the example
> code in the documentation of this module, I got the following error
> message:
> --------------------------------
> <shell> $ perl -I ../primer3_1.0.0/src/ -w primer3run_test.pl 
> 
> Use of uninitialized value in concatenation (.) or string at
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tools/Run/Primer3.pm line 212,
> <GEN0> line 1.
> primer3 can not be found. Is it installed?
> --------------------------------
(Continue reading)


Gmane