Asking for help on the bioperl mailing list. WAS: [Bioperl-l]
seqIO
Hilmar Lapp
hlapp at gmx.net
Wed Oct 8 12:40:15 EDT 2003
I agree wholeheartedly. The better the question is formulated the
better your answer is going to be. It's not productive to waste
people's time on figuring out what you wanted to ask in the first place.
There is such a thing as doing your homework first. Good and quick
answers don't come for free even though it may seem so sometimes.
-hilmar
On Wednesday, October 8, 2003, at 07:18 AM, Lincoln Stein wrote:
> Hi Desmond and Others who Write to this Mailing List for Help,
>
> The bioperl mailing list welcomes requests for help from programmers
> of all
> levels of experience. However, as the recent thread indicates, a
> great deal
> of unhelpful and redundant traffic can be generated when the question
> is
> vague.
>
> It would really help us all if next time you state the problem
> explicitly and
> concisely, as in "I have a file that contains EMBL sequences, I've
> read them
> into an array and want to print the results out as FASTA format."
> Note that
> this is still underspecified because some people will understand this
> to mean
> that you've created an array in which each element is a line from the
> EMBL
> file, while others will think you've created one element per EMBL
> entry. But
> it's much better than showing us a fragment of nonfunctional code
> taken out
> of context and then asking us "why doesn't bioperl work the way I
> think it
> should."
>
> Also your problem raises another question. Why did you read the EMBL
> file
> into a string array rather than using Bio::SeqIO from the beginning to
> do it?
>
> Lincoln
>
> On Tuesday 07 October 2003 09:16 pm, Desmond Lim wrote:
>> Hi Lincoln,
>>
>> Thanks but what am I to do after this?
>>
>> I have a file that contains EMBL sequences. And I'm reading it into an
>> array, manipulating it and then print it a file in fasta format.
>>
>> I know how to use the:
>>
>> my $seq_in = Bio::SeqIO->new('-file' => filename1, '-format' =>
>> 'embl');
>> my $seq_out = Bio::SeqIO->new('-file' => filename2, '-format' =>
>> 'fasta');
>>
>> while ( my $inseq = $seq_in->next_seq ) {
>> $seq_out->write_seq($inseq);
>> }
>>
>> But I don't have a file for filename1 but an array. Is there a way for
>> reading the array (the manipulated embl one) and then write it as a
>> fasta
>> file?
>>
>> Thanks.
>>
>> -----Original Message-----
>> From: Lincoln Stein [mailto:lstein at cshl.edu]
>> Sent: Wednesday, October 08, 2003 7:18 AM
>> To: Desmond Lim; Hilmar Lapp; BioPerl
>> Subject: Re: [Bioperl-l] seqIO
>>
>>
>> If you have an array of sequences then you can just create them using
>> Bio::Seq:
>>
>> @bioperl_sequences = map {Bio::Seq->new(-seq=>$_)} @raw_seq;
>>
>> Lincoln
>>
>> On Tuesday 07 October 2003 12:45 am, Desmond Lim wrote:
>>>> What made you think it would accept a -ph parameter? Besides, if
>>>> there was
>>>> one you'd have to provide an array reference.
>>>
>>> I didn't think it would work but I wanted to try it out.
>>>
>>> What I'm trying to do is get SeqIO to accept an array of sequences
>>> and
>>> not a file.
>>>
>>> Desmond
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at portal.open-bio.org
>>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
> --
> =======================================================================
> =
> Lincoln D. Stein Cold Spring Harbor
> Laboratory
> lstein at cshl.org Cold Spring Harbor, NY
> =======================================================================
> =
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------
More information about the Bioperl-l
mailing list