[Bioperl-l] script
Andreas Kahari
ak at ebi.ac.uk
Thu Sep 4 12:33:07 EDT 2003
If it's not a Unix system, this [untested] Perl snippet will do
approximately the same thing:
$/ = "\n>";
$count = 0;
open(IN, "file.fa") or die;
while (<IN>) { $count++ }
close(IN);
print "No. of seqs: ", $count, "\n";
On Thu, Sep 04, 2003 at 05:12:21PM +0100, James Wasmuth wrote:
> If its a standard FASTA format file, then at the command line prompt type:
>
> grep ">" file.fa | wc -l
>
> hth
> james
>
> Lobvi Matamoros wrote:
>
> >
> >Hi:
> >
> >Does any one have an script to count how many proteins do you have in
> >a database/file in FASTA format
> >
> >Thanks in advance for your help
[cut]
--
a n d r e ( Andreas Kähäri ) 0 1 0 0 0
a s . k a ) EMBL, European Bioinformatics Institute ( 1 0 0 0 1
h a r i @ ( Wellcome Trust Genome Campus, Hinxton ) 0 0 1 1 1
e b i . a ) Cambridge, CB10 1SD ( 0 0 1 0 0
c . u k ( United Kingdom ) 0 0 0 1
More information about the Bioperl-l
mailing list