| 1 | package App::Sandy::Command::Quality::Dump; | ||
| 2 | # ABSTRACT: quality subcommand class. Dump a quality profile from database. | ||
| 3 | |||
| 4 | 1 | ▶ | use App::Sandy::Base 'class'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | extends 'App::Sandy::Command::Quality'; | ||
| 7 | |||
| 8 | our $VERSION = '0.25'; # VERSION | ||
| 9 | |||
| 10 | sub validate_args { | ||
| 11 | my ($self, $args) = @_; | ||
| 12 | my $quality_profile = shift @$args; | ||
| 13 | |||
| 14 | if (not defined $quality_profile) { | ||
| 15 | die "Missing quality-profile\n"; | ||
| 16 | } | ||
| 17 | |||
| 18 | die "Too many arguments: '@$args'\n" if @$args; | ||
| 19 | } | ||
| 20 | |||
| 21 | sub execute { | ||
| 22 | my ($self, $opts, $args) = @_; | ||
| 23 | my $quality_profile = shift @$args; | ||
| 24 | |||
| 25 | my ($matrix, $deepth, $partil) = $self->retrievedb($quality_profile); | ||
| 26 | |||
| 27 | for (my $line = 0; $line < $deepth; $line++) { | ||
| 28 | for (my $col = 0; $col < $partil; $col++) { | ||
| 29 | print "$matrix->[$col][$line]"; | ||
| 30 | } | ||
| 31 | print "\n"; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | __END__ | ||