/usr/share/doc/libbio-asn1-entrezgene-perl/examples/parse_sequence_example.pl is in libbio-asn1-entrezgene-perl 1.091-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/perl
# launch it like "perl parse_sequence_example.pl seq.asn1"
# one can use the included test file "perl parse_sequence_example.pl ../t/seq.asn"
use strict;
use Dumpvalue;
use Bio::ASN1::Sequence;
use Benchmark;
my $parser = Bio::ASN1::Sequence->new(file => $ARGV[0]); # instantiate a parser object
my ($t0, $end, $i) = (new Benchmark, 10, 0); # process the first 10 records in the input file
while(my $value = $parser->next_seq)
{
Dumpvalue->new->dumpValue($value); # uncomment to dump the data structure out
last if ++$i >= $end; # only process the first 20 records
}
my $t1 = new Benchmark;
print "The first $i records in $ARGV[0] took Sequence parser:",timestr(timediff($t1, $t0)),"\n";
|