[Bioperl-l] get regions

Jason Stajich jason at bioperl.org
Mon May 14 21:50:09 UTC 2007


yep you are right pos() much better and faster for getting the position.

-j
On May 14, 2007, at 1:48 PM, Chris Fields wrote:

> I use pos() with m{}g; the quoted globals tend to slow things down  
> for me.
>
> Ah, see Kevin's answered that...
>
> chris
>
> On May 14, 2007, at 2:06 PM, Jason Stajich wrote:
>
>> I assume you are doing the matches on the string with =~ so Bio::Seq
>> doesn't really help you here I don't think.
>> See the $` variable in Perl for how to capture the position of where
>> a regexp matches.
>>
>> -jason
>> On May 14, 2007, at 11:54 AM, Thiago Venancio wrote:
>>
>>> Hi all,
>>>
>>> Using Bio::Seq, is there any easy way to get the coordinates where a
>>> regular expression matches or should I build a sliding window?
>>>
>>> For example, looking for a given promoter region in a FASTA file. If
>>> the region is found, I would like to recover exactly the coordinates
>>> where it matches.
>>>
>>> Thanks in advance.
>>>
>>> Thiago
>>> -- 
>>> "Doubt is not a pleasant condition, but certainty is absurd."
>>>             Voltaire
>>>
>>> ========================
>>> Thiago Motta Venancio, MSc
>>> PhD student in Bioinformatics
>>> University of Sao Paulo
>>> ========================
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>> --
>> Jason Stajich
>> jason at bioperl.org
>> http://jason.open-bio.org/
>>
>>
>> _______________________________________________
>> 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
>
>
>

--
Jason Stajich
jason at bioperl.org
http://jason.open-bio.org/





More information about the Bioperl-l mailing list