[Bioperl-l] SeqIO - masked seqs

Marc Logghe Marc.Logghe at devgen.com
Thu Mar 17 03:29:25 EST 2005


Hi chuck,
It seems to be fixed after all. The original problem was actually when
you explicitely set the alphabet yourself, bioperl tries to guess the
alphabet anyhow.
Meaning, when you set the alphabet now, it will work. I tested it like
this:
#!/usr/bin/perl
use strict;
use Bio::SeqIO;

my $in = Bio::SeqIO->new(-fh => \*DATA, -format => 'fasta');
$in->alphabet('dna');  # it fails when you comment out this line !!!
my $out = Bio::SeqIO->new(-fh => \*STDOUT, -format => 'fasta');
my $seq = $in->next_seq;
$out->write_seq($seq);
 
__DATA__
>1115008E10.y1 CHROMAT_FILE: 1115008E10.y1 PHD_FILE: 1115008E10.y1.phd.1
CHEM: term
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXX

HTH
Marc
 


________________________________

	From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of chauser
	Sent: Wednesday, March 16, 2005 2:49 PM
	To: Marc Logghe
	Cc: bioperl-l at portal.open-bio.org
	Subject: Re: [Bioperl-l] SeqIO - masked seqs
	
	
	Hi Marc, 

	I updated to the current CVS and get the same error. If I tack
on a single valid base to the offending clone(below) SeqIO reads it. 

	# $Id: README,v 1.37 2005/03/01 16:56:02 amackey Exp $ 

	o Version 

	This is Bioperl version 1.5 from CVS HEAD 



	>1115008E10.y1 CHROMAT_FILE: 1115008E10.y1 PHD_FILE:
1115008E10.y1.phd.1 CHEM: term 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
	XXXXXXXXXXX 



	------------- EXCEPTION ------------- 
	MSG: Got a sequence with no letters in it cannot guess alphabet
[] 
	STACK Bio::PrimarySeq::_guess_alphabet
/usr/local/src/bioperl/core/Bio/PrimarySeq.pm:837 
	STACK Bio::Seq::SeqFastaSpeedFactory::create
/usr/local/src/bioperl/core/Bio/Seq/SeqFastaSpeedFactory.pm:137 
	STACK Bio::SeqIO::fasta::next_seq
/usr/local/src/bioperl/core/Bio/SeqIO/fasta.pm:143 
	STACK main::RAW ESTcount.pl:81 
	STACK toplevel ESTcount.pl:49 


	Chuck 



	On Mar 16, 2005, at 2:16 AM, Marc Logghe wrote: 



			All, 

			I ran into a glitch when reading sets of EST
reads where some 
			reads are masked in their entirety - i.e. all
bases are X's. 
			Is there a way to either modify the alphabet to
accept X or 
			some other solution? 


		I was not able to trace the actual fix. But there was a
thread in 
		december/january about that. 
		In one of the last messages Nathan was about the fix
this: 
	
http://bioperl.org/pipermail/bioperl-l/2005-January/017829.html 

		Brian added a comment on this alphabet() issue. 
	
http://cvs.bioperl.org/cgi-bin/viewcvs/viewcvs.cgi/bioperl-live/Bio/SeqI

		O.pm?cvsroot=bioperl 
		Have you tried bioperl release 1.5.0 or
bioperl-release-1-5-0-rc2 ? 
		Guess it should be fixed there. 
		Is bioperl-release-1-5-0-rc2 behaving better than 1.5.0
related to the 
		Bio::SeqFeatureI architecture ? 
		Marc 






More information about the Bioperl-l mailing list