[Bioperl-l] Blast server: checking seq prior to job submission

Charles Hauser chauser at duke.edu
Wed Feb 12 09:45:43 EST 2003


Jason,

(background for list): trying to code a cgi to either warn users that
their sequences while properly formatted FASTA are flawed, OR to
reformat seq post submission

On Wed, 2003-02-12 at 08:20, Jason Stajich wrote:
> See the problem is they are all technically valid FASTA...  You can put
> whatever you want on the line after the >  and then it must be sequence
> after the next newline.
> I'll think if there are any other ways to get at what you want.
> 
> BTW if you run that sequence through SeqIO::fasta, does it complain, or
> work?

No, this is my concern - the queries do not match what users think they
are submitting.  

seqIO fasta correctly returns the seq following the first newline. 
Somehow I need to warn users that their seq while FASTA is flawed. 

$in  = Bio::SeqIO->new(-file => "$infile" , '-format' => 'fasta');

while ( my $seq = $in->next_seq() ) {
    print "Sequence ",$seq->id," first 10 bases
",$seq->subseq(1,10),"\n";
}


>13560  MLINKLWLLL VTLCLTEELA AAGEKSYGKP CGGQDCSGSC QCFPEKGARG RPGPIGIQGP
	TGPQGFTGST GLSGLKGERG FPGLLGPYGP KGDKGPMGVP GFLGINGIPG HPGQPGPRGP
Sequence 13560 first 10 bases TGPQGFTGST

>14062MASEGPREPESEGIKLSADVKPFVPRFAGLNVAWLESSEACVFPSSAATYYPFVQEPPVTEQKIYTEDMA
FGASTFPPQYLSSEITLHPYAYSPYTLDSTQNVYSVPGSQYLYNQPSCYRGFQTVKHRNENTCPLPQEMK
Sequence 14062MASEGPREPESEGIKLSADVKPFVPRFAGLNVAWLESSEACVFPSSAATYYPFVQEPPVTEQKIYTEDMA first 10 bases FGASTFPPQY




Chuck







More information about the Bioperl-l mailing list