new file: cell2loc.py
[GalaxyCodeBases.git] / perl / etc / WoodyMiaoLin / Tiger / get_fasta_length.pl
blob3a244a3ca1fb38fbb1cf97627ef41a139e4c3de0
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
5 my %length;
6 while (<>) {
7 chomp;
8 s/^>//;
9 $/=">";
10 my $seq = <>;
11 chomp $seq;
12 $seq =~ s/\s//g;
13 $/="\n";
14 $length{$_} = length $seq;
17 foreach (sort keys %length) {
18 print "$_\t$length{$_}\n";