[Bioperl-l] [Bioperl -l] Setting Sequence with nonstandard
characters
Heikki Lehvaslaiho
heikki at ebi.ac.uk
Tue Sep 20 12:18:26 EDT 2005
Ian,
You can not use arbitrary characters. You'll get a warning and an exception
(why both? ... code could be cleaned a bit, maybe) when you try to put any
other character into seq() than these:
$MATCHPATTERN = 'A-Za-z\-\.\*\?'; # see Bio::PrimarySeq code
'?' in sequence should be fine. Could you post a short sample code that causes
the exception and say which version of perl and bioperl you are using,
please.
These are fine (perl v5.8.4, bioperl-live):
perl -MBio::PrimarySeq -e '$s=Bio::PrimarySeq->new(); $s->seq("??tg");'
perl -MBio::Seq -e '$s=Bio::Seq->new(); $s->seq("??tg");'
-Heikki
On Tuesday 20 September 2005 14:25, Iain Wallace wrote:
> Yes, it is just going to be a marker for that position in the sequence.
> Although. I could infact use N instead, thanks for pointing that out.
>
> However, it would be nice to know if it is possible to use arbitary
> characters as a sequence
>
> On 9/20/05, Andreas Kahari <ak at ebi.ac.uk> wrote:
> > On Tue, Sep 20, 2005 at 10:28:19AM +0100, Iain Wallace wrote:
> > > Hi,
> > >
> > > I wonder if anyone could tell me how to set a sequence with
> > > non-standard characters?
> > >
> > > I would like to use the string "???AGCTAGTAC" as a sequence string but
> > > when I set it using
> > > $string = "???AGCTAGTAC";
> > > $seq->seq($string);
> > >
> > > I get an exception complaining that the sequence doesn't look healthy.
> > > Is there any way I can turn this check of?
> >
> > Are your question marks supposed to convey some very different
> > information from what is ordinarily meant when using 'N'?
> >
> > E.g., $string = "NNNAGCTAGTAC";
> >
> >
> > Andreas
> >
> > --
> > Andreas Kähäri
> > EMBL-EBI/ensembl
> >
> > ------{ www.embl.org }----{ www.ebi.ac.uk }----{ www.ensembl.org }------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki at_ebi _ac _uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambridge, CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________
More information about the Bioperl-l
mailing list