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 //
In reply to Re: A strange error message with Bio::SeqIO
by Khen1950fx
in thread A strange error message with Bio::SeqIO
by genbank
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |