Bioinfo

 view release on metacpan or  search on metacpan

lib/Bioinfo/App/Cmd/Fasta/Cmd/GetByID.pm  view on Meta::CPAN

package Bioinfo::App::Cmd::Fasta::Cmd::GetByID;
use Modern::Perl;
use Moo;
use Bioinfo::Fasta;
use MooX::Cmd;
use MooX::Options prefer_commandline => 1;
use IO::All;
use Data::Dumper;

our $VERSION = '0.1.15'; # VERSION: 
# ABSTRACT: my perl module and CLIs for Biology


option input => (
  is  => 'ro',
  required  => 1,
  format  => 's',
  short => 'i',
  doc => 'a file of seq id, one per line'
);


option db => (
  is => 'ro',
  format => 's',
  short => 'd',
  doc => 'fasta file',
);


option output => (
  is => 'ro',
  format => 's',
  short => 'o',
  doc => 'output file',
);


sub execute {
  my ($self, $args_ref, $chain_ref) = @_;
  $self->options_usage unless (@$args_ref);
  my $input = $self->input;
  my $output = $self->output;
  my $db = $self->db;

  say "input:$input\toutput:$output\tdb:$db";
  my $fas_obj = Bioinfo::Fasta->new(file => $db);
  $fas_obj->get_seqs_batch("$input", $output);
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Bioinfo::App::Cmd::Fasta::Cmd::GetByID - my perl module and CLIs for Biology



( run in 1.500 second using v1.01-cache-2.11-cpan-5a3173703d6 )