[Bioperl-l] module to find out primer binding sites in a genome sequence

Kevin Brown Kevin.M.Brown at asu.edu
Mon Dec 18 23:52:20 UTC 2006


A function I use to find the first landing site for a primer.  Should be
modifiable to handle multiple occurences:

=head1 C<match>

Match searches for a near alignment between two strings and returns the
position
at which the two strings align.  Match is based on 80% conformation

	match($this, $in_that)
	
=cut

sub match
{
	my ($primer, $gene) = @_;
	my $start   = 0;
	my $pattern = "";
	for (my $i = 0 ; $i < length($primer) ; $i++)
	{
		$pattern .= substr($primer, $i, 1);
		pos($gene) = 0;
		if ($gene =~ m/$pattern/gi)
		{
			$start = pos($gene) - length($pattern) + 1;
		}
		else
		{
			$start = 0;
			chop($pattern);
			$pattern .= '.';
		}
	}
	if ($pattern =~ /\.$/)
	{
		if ($gene =~ m/$pattern/gi)
		{
			$start = pos($gene) - length($pattern) + 1;
		}
	}
	$pattern =~ s/\.//g;

	if ((length($pattern) / length($primer)) > .8)
	{

		#print $start . "\n";
		return $start;
	}
	return 0;
} 

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org 
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Sendu Bala
> Sent: Monday, December 18, 2006 4:46 PM
> To: Gowthaman Ramasamy
> Cc: bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] module to find out primer binding 
> sites in a genome sequence
> 
> Gowthaman Ramasamy wrote:
> > Hi List, Is there any module in bioperl which can find out 
> the primer
> > binding sites in a genomic sequence. I am interested in finding
> > locations with few mismatches along the primer...not just the exact
> > match (which is a very trivial task)
> 
> There's no module dedicated to that task, but Bioperl may help you to
> answer the question.
> 
> Probably the easiest/reliable/clear thing to do is to do a Blast with
> appropriate settings for short sequence with few mismatches. You can
> write a script to only consider hits for your forward primer 
> that are a
> 'primable' distance from a hit to your reverse primer (and check their
> orientations are correct as well).
> 
> Or use some e-pcr tool.
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 




More information about the Bioperl-l mailing list