in reply to A strange error message with Bio::SeqIO
For the input, I took your sequence and put it in a file called seqIOnew.fasta. I tried to get the accession number, but it returned "unknown". Printing out the $seq, you'll see that there is no accession number, so that's why it came back unknown.#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $in = Bio::SeqIO->new( -file => "/root/Desktop/seqIOnew.fasta", -format => 'FASTA'); my $out = Bio::SeqIO->new( -file => ">/root/Desktop/new_out.log", -format => "EMBL" ); while ( my $seq = $in->next_seq() ) { print $out->write_seq($seq), "\n"; }
For the output, I used new_out.log on my desktop.
Here's the corrected sequence:
And here's the output:>gi|1786958|gb|AAC73831.1| membrane spanning protein in TolA-TolQ-TolR + complex [Escherichia coli str. K-12 substr. MG1655] MTDMNILDLFLKASLL +VKLIMLILIGFSIASWAIIIQRTRILNAAAREAEAFEDKFWSGIELSRLYQESQ GKRDNLTGSEQIFY +SGFKEFVRLHRANSHAPEAVVEGASRAMRISMNRELENLETHIPFLGTVGSISPYI GLFGTVWGIMHA +FIALGAVKQATLQMVAPGIAEALIATAIGLFAAIPAVMAYNRLNQRVNKLELNYDNFM EEFTAILHRQ +AFTVSESNKG
ID unknown; SV 1; linear; ; STD; UNC; 0 BP. XX AC unknown; XX DE membrane spanning protein in TolA-TolQ-TolR complex [Escherichia +coli str. DE K-12 substr. MG1655] DE MTDMNILDLFLKASLLVKLIMLILIGFSIASWAIIIQRTRILNAAAREAEAFEDKFWSGIELSRL +YQESQ DE GKRDNLTGSEQIFYSGFKEFVRLHRANSHAPEAVVEGASRAMRISMNRELENLETHIPFLGTVGS +ISPYI DE GLFGTVWGIMHAFIALGAVKQATLQMVAPGIAEALIATAIGLFAAIPAVMAYNRLNQRVNKLELN +YDNFM DE EEFTAILHRQAFTVSESNKG XX FH Key Location/Qualifiers FH XX //
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A strange error message with Bio::SeqIO
by genbank (Novice) on Aug 26, 2011 at 13:05 UTC | |
by Khen1950fx (Canon) on Aug 26, 2011 at 13:27 UTC | |
by genbank (Novice) on Aug 27, 2011 at 02:02 UTC | |
by Khen1950fx (Canon) on Aug 27, 2011 at 04:03 UTC |