[Bioperl-l] informative codons method for kaks --Bio/Align/DNAStatistics.pm

Chris Fields cjfields at uiuc.edu
Fri Aug 18 07:57:39 EDT 2006


Looks good to me.  Just make sure to add tests!

Chris

On Aug 18, 2006, at 6:02 AM, Albert Vilella wrote:

> Upon closer inspection, it turned out to be a one-liner!
>
> =head2 kaks_pattern_number
>
>  Title   : kaks_pattern_number
>  Usage   : my $patterns = $stats->kaks_pattern_number($alnobj);
>  Function: Counts the number of codons with no gaps in the MSA
>  Returns : Number of codons with no gaps ('patterns' in PAML notation)
>  Args    : A Bio::Align::AlignI compliant object such as a
>             Bio::SimpleAlign object.
>
> =cut
>
> sub kaks_pattern_number{
>     my ($self, $aln) = @_;
>     return ($aln->remove_gaps->length)/3;
> }
>
> How do you like the method name? Suggestions?
>
>     Albert.
>
> On Thu, 2006-08-17 at 11:39 -0500, Chris Fields wrote:
>> Albert,
>>
>> Might be a good idea to start working on those!  Nice to use  
>> Bugzilla as a
>> repository for ideas, but we're heading towards using the Bioperl  
>> wiki for
>> that more now.
>>
>> Chris
>>
>>> -----Original Message-----
>>> From: Albert Vilella [mailto:avilella at gmail.com]
>>> Sent: Thursday, August 17, 2006 11:17 AM
>>> To: Chris Fields
>>> Cc: bioperl-l at bioperl.org
>>> Subject: Re: [Bioperl-l] informative codons method for kaks --
>>> Bio/Align/DNAStatistics.pm
>>>
>>> I will opt for the "return the number of informative codons"  
>>> then, which
>>> is the easiest :)
>>>
>>> I don't know when is this going to be there if it depends on me,
>>> though... my list of 'enh' bug tickets is growing shamefully fast :p
>>>
>>> Cheers,
>>>
>>>     Albert.
>>>
>>> On Thu, 2006-08-17 at 09:26 -0500, Chris Fields wrote:
>>>> Sure, why not?  If you (or someone) can add one in, I don't see how
>>>> it could hurt.
>>>>
>>>> Make sure to add tests for this in the proper test suite.
>>>>
>>>> Chris
>>>>
>>>> On Aug 17, 2006, at 6:37 AM, Albert Vilella wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I think it would be nice to have a method in
>>>>> Bio/Align/DNAStatistics.pm that gives the number of informative  
>>>>> codons
>>>>> for kaks in a MSA. That is, the codons that are used in the
>>>>> calculation of kaks. This, AFAICS, more or less what codeml calls
>>>>> "patterns".
>>>>>
>>>>> I often find myself in the situation of wanting to know how big  
>>>>> is the
>>>>> CDS alignment not in terms of sequence length, but of the  
>>>>> number of
>>>>> codons that are going to be used in the kaks statistics. I  
>>>>> guess this
>>>>> method would help in that.
>>>>>
>>>>> The method could:
>>>>>
>>>>> return the number of informative codons?
>>>>> maybe return a new seqarray with only the informative codons?
>>>>>
>>>>> What do you think? Jason? Chris?
>>>>>
>>>>> http://bugzilla.open-bio.org/show_bug.cgi?id=2078
>>>>>
>>>>> Bests,
>>>>>
>>>>>     Albert.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Bioperl-l mailing list
>>>>> Bioperl-l at lists.open-bio.org
>>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>>
>>>> Christopher Fields
>>>> Postdoctoral Researcher
>>>> Lab of Dr. Robert Switzer
>>>> Dept of Biochemistry
>>>> University of Illinois Urbana-Champaign
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list