File: CountSequences.pl

package info (click to toggle)
ampliconnoise 1.29-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,040 kB
  • sloc: ansic: 18,080; sh: 2,899; perl: 2,089; makefile: 235
file content (17 lines) | stat: -rwxr-xr-x 185 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

$total = 0;

while($line = <STDIN>){
    chomp($line);

    if($line=~/>(.*)/){
	$total ++;
    }
}
if($ARGV[0] eq "c"){
	print "$total,";
}
else{
	print "$total\n";
}