[Bioperl-l] SeqIO
Chris Fields
cjfields at uiuc.edu
Wed Mar 5 22:54:15 EST 2008
You can leave off the format, but you must append the correct file
extension for the parser to determine the correct format ('.gcg' for
GCG, for example). There is also Bio::Tools::GuessSeqFormat though it
doesn't cover all formats.
chris
On Mar 5, 2008, at 9:09 PM, Staffa, Nick (NIH/NIEHS) wrote:
> Verily,
> One interpretation of the docs might be: will read any format if the
> format
> is specified.
> I was hoping that I could write a program that one needn't specify
> format.
> It'd be more user-friendly and useful.
>
>
> On 3/5/08 9:33 PM, "Jason Stajich" <jason at bioperl.org> wrote:
>
>> probably you should try specifying the format explicitly first- as in
>> (-format => 'gcg')
>>
>> -j
>> On Mar 5, 2008, at 6:22 PM, Chris Fields wrote:
>>
>>> I thought GCG format changed somewhere along the way but I maybe
>>> I'm wrong? Regardless, you'll have to post this as a bug (along
>>> with an example file).
>>>
>>> Also, kind of odd that the sequence data wasn't checked...
>>>
>>> chris
>>>
>>> On Mar 5, 2008, at 5:43 PM, Staffa, Nick (NIH/NIEHS) wrote:
>>>
>>>> So the Howto says that Bio::SeqIO will read almost any known format
>>>> including GCG.
>>>> So I create a GCG file with Seqlab and try to printout its
>>>> sequence as a
>>>> string. ( I did guess at the way to get the sequence string:
>>>>
>>>> #!/usr/bin/perl -w
>>>> use strict;
>>>> $| = 1;
>>>> use Bio::SeqIO;
>>>> my $number_of_files = @ARGV;
>>>> if(!$number_of_files){print "no files entered\n";exit:}
>>>> foreach my $file (@ARGV){
>>>> my $seqio_object = Bio::SeqIO->new(-file => $file);
>>>> my $seq_object = $seqio_object->next_seq;
>>>> my $sequence = $seq_object->seq;
>>>> print "$sequence\n";
>>>> my $status = &windowscore($sequence);
>>>> }
>>>>
>>>> But what it returned was the entire contents of the file with no
>>>> format
>>>> decoding. Have I been deluded?
>>>>
>>>> NewDNALength:810March5,200818:26Type:NCheck:
>>>> 3368..1TGTTCGAATTCCGTGCGGTCCACCT
>>>> CCCCTAGGAGCTCAGTGGGCTGGTT51GGATTCCGTGCCATCCCGGCAGGGCAGAGCCTCGGGAGGGGG
>>>> CGAAGGT
>>>> T101GCCCGGGGCCGTGCGCTGGGTGCTGCTGCTGCGGTGGCGGCGGCGGTGCC151TGCGGTTGCAGC
>>>> GGCTGCT
>>>> GGGGTTGCGCGTGGAAACCGCGCCCCGCACT201TGCGGCGGGCGAGCCCATCGCGCCGTAGTACAGGT
>>>> GCAGAGC
>>>> GCTGGGGG251GCGCCAGGATCCCCGGCATCGCAGGGCCCGAGGGGTCCGGCCCCACTCGC301ATGGG
>>>> GCCAGCG
>>>> GGCGGCTCTACGGACACTGCATAGTCCGAGACTGGAGC351GTAAGTGTAGGTGCCGGCCGCCGGGCAG
>>>> TCCCCTG
>>>> GCAGCGGGGCTGCAA401AGAAAGCCGGGTCCTGCTCCACGCCATCCAGCGGGGATGTGTCCGGAGTG4
>>>> 51GGCAG
>>>> AGGGTAGCCGTCGAGCGCGGGAGCGCCCAGTCCCTGGCAGTCCCG501ATAGTGGGGGCCCATGTGCGG
>>>> AGACATC
>>>> AGCGGAGGACCGGCCGGATAGC551CCGGCTCCGGGAAAGGCAGACCCAGGCCATCCATGGCCACGCGG
>>>> CCGCCC6
>>>> 01TCGGGACCAAGCGCGCCGGCCTGGGGCTCGACGAGAGCGTGCAGGAAGCC651TCCCTCCACCCGCT
>>>> TCATGCG
>>>> CTTCACCTGCTTGCGCCGCCGCGGCCGGT701ACTTGTAGTTGGGGTGGTCCTGCATATGCTGCACGCG
>>>> CAGCCGC
>>>> TCGGCC751TCTTCCACGAAGGGCCGCTTCTCTGCCAAGGTCAACGCCTTCCAAGACTT801GCCTGCA
>>>> GGG
>>>>
>>>>
>>>>
>>>> Nick Staffa
>>>> Telephone: 919-316-4569 (NIEHS: 6-4569)
>>>> Scientific Computing Support Group
>>>> NIEHS Information Technology Support Services Contract
>>>> (Science Task Monitor: Roy W. Reter (reter at niehs.nih.gov)
>>>> National Institute of Environmental Health Sciences
>>>> National Institutes of Health
>>>> Research Triangle Park, North Carolina
>>>>
>>>>
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>>> Christopher Fields
>>> Postdoctoral Researcher
>>> Lab of Dr. Robert Switzer
>>> Dept of Biochemistry
>>> University of Illinois Urbana-Champaign
>>>
>>>
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign
More information about the Bioperl-l
mailing list