[Bioperl-l] SeqWords.pm

Derek Gatherer d.gatherer at vir.gla.ac.uk
Mon Nov 10 11:25:36 EST 2003


Hi

Bio::Tools::Seqwords.pm should have two methods, one for counting 
overlapping words and one for counting non-overlapping words.  The present 
count_words could/should be renamed count_nonoverlap_words, and an 
additional count_overlap_words could be created, same code as count_words, 
but...

after line 214, you would need

	$seqlen = $seqobj->length();			# measure length
	for ($frame = 1; $frame<=$word_length; $frame++)# run through frames
	{	
		my $seqstring = uc($seqobj->subseq($frame,$seqlen));# take the relevant 
substring
	
		while($seqstring =~ /((\w){$word_length})/gim)
		{
			$codon{uc($1)}++;		# keep adding to hash
		}
	}
	return \%codon;

Should I send this to bugzilla? (it isn't really a bug, just a gap in the 
functionality of the object.)

thanks
Derek



More information about the Bioperl-l mailing list