[Bioperl-l] seq doesn't validate error

Kevin Brown Kevin.M.Brown at asu.edu
Fri Jun 15 19:11:34 EDT 2007


> I'm getting an error as follows when I try to reverse 
> complement a sequence string stored in a hash of arrays. The 
> storage code is: 
> 
> 		$nstarthash{$key} = [$sortchecks[0], join("", 
> @nseq), 		
> join("",@{$seqhash{$key}})];
> 
> the sequence of interest is the element at index 1. 
> 
> Later, I try to retrieve this string for a subset of keys so 
> I can reverse complement it based on input from another hash 
> (%complement):
> 
> 			my %revcomphash = map { my $read = $_;
> 			grep $complement{$read} eq 'C', %complement;
> 			{$_, (Bio::Seq->new(-seq 
> =>$nstarthash{$_}[1]))->revcom->seq()};}
> 			 keys(%nstarthash); 
> 
> 
> I get the following warning (long sequence edited for clarity):
> 
> -- -------------------- WARNING ---------------------
> MSG: seq doesn't validate, mismatch is 1
> ---------------------------------------------------
> 
> ------------- EXCEPTION  -------------
> MSG: Attempting to set the sequence to 
> [GCCCCTGTAATCGCTTTTATATCGTCAGCGATC]
> which does not look healthy
> STACK Bio::PrimarySeq::seq /usr/share/perl5/Bio/PrimarySeq.pm:268
> STACK Bio::PrimarySeq::new /usr/share/perl5/Bio/PrimarySeq.pm:217
> STACK Bio::Seq::new /usr/share/perl5/Bio/Seq.pm:498 STACK 
> toplevel ../quality_wrapper.pl:103
> 
> I cannot find any non-allowed characters in the sequence, and 
> the de-referencing appears to work correctly. Can anyone help me?
> I'm using the latest Bioperl installation (1.5.2) with 
> ActivePerl5.8 on a Mepis 6.5 system. 

Try telling the Bio::Seq object what alphabet to use when creating it.
I tend to create them like:

Bio::Seq->new(-seq=> $seqvar, -alphabet=>'dna')



More information about the Bioperl-l mailing list