File: fastaidx.pl

package info (click to toggle)
rtax 0.984-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 316 kB
  • sloc: perl: 1,123; sh: 203; makefile: 2
file content (22 lines) | stat: -rwxr-xr-x 426 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Long;
use File::Temp;

use FindBin;
use lib "$FindBin::Bin";
use FastaIndex;

my ($fastaFileName, $idRegex) = @ARGV;

my $indexA = FastaIndex->new();    # '-filename' => "A.idx", '-write_flag' => 1 );
print STDERR "Indexing $fastaFileName...\n";
$indexA->make_index( $fastaFileName, $idRegex, $fastaFileName );

while(<STDIN>)
{
    chomp;
    print $indexA->fetch($_);
}