view release on metacpan or search on metacpan
t/03-exactmatch.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help exactmatch)] );
like( $result->stdout, qr{exactmatch}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(exactmatch)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(exactmatch t/not_exists t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(exactmatch t/not_exists t/pseudopig.fa)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "mummer or sparsemem not installed", 3
unless IPC::Cmd::can_run('mummer')
or IPC::Cmd::can_run('sparsemem');
$result = test_app( 'App::Egaz' => [qw(exactmatch t/pig2.fa t/pseudopig.fa)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 1, 'line count' );
like( $result->stdout, qr{pig2\(\+\):1\-22929}, 'exact position' );
t/04-lav2axt.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help lav2axt)] );
like( $result->stdout, qr{lav2axt}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(lav2axt)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lav2axt t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(lav2axt t/default.lav -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 30, 'line count' );
like( $result->stdout, qr{TCGCTCCACGGCGAAA--TAAGCGCACGAACCGG}, 'sequences' );
$result = test_app( 'App::Egaz' => [qw(lav2axt t/default.relative.lav -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 30, 'line count' );
like( $result->stdout, qr{TCGCTCCACGGCGAAA--TAAGCGCACGAACCGG}, 'sequences' );
t/05-lav2psl.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help lav2psl)] );
like( $result->stdout, qr{lav2psl}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(lav2psl)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lav2psl t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result
= test_app( 'App::Egaz' => [qw(lav2psl t/default.lav -o stdout)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 10, 'line count' );
like( $result->stdout, qr{2144\t1422\t0\t0\t30\t94\t28\t164\t\-}, 'last line matched' );
my $expect = join "", grep {/^\d/} Path::Tiny::path("t/default.psl")->lines;
is( $result->stdout, $expect, 'matched with expect' );
t/07-maskfasta.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help maskfasta)] );
like( $result->stdout, qr{maskfasta}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(maskfasta)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(maskfasta t/not_exists t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(maskfasta t/pseudocat.fa t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
{ # real run
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
my $tempdir = Path::Tiny->tempdir;
chdir $tempdir;
my $yaml = <<YAML;
t/09-partition.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help partition)] );
like( $result->stdout, qr{partition}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(partition)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(partition t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(partition t/pseudocat.fa t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(partition t/pseudopig.fa)] );
like( $result->error, qr{More than one sequence in}, 'error' );
{ # real run
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
my $tempdir = Path::Tiny->tempdir;
t/10-normalize.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help normalize)] );
like( $result->stdout, qr{normalize}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(normalize)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(normalize t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(normalize t/default.lav)] );
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 357, 'line count' );
like( $result->stdout, qr{normalize-lav 0 0}, 'd stanza matched' );
$result
= test_app( 'App::Egaz' => [qw(normalize t/partition.t.lav --tlen 18803 -o stdout)] );
my $expect = join "", Path::Tiny::path("t/partition.t.norm.lav")->lines;
is( $result->stdout, $expect, 'matched with expect' );
t/11-raxml.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help raxml)] );
like( $result->stdout, qr{raxml}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(raxml)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(raxml t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "raxml not installed", 5
unless IPC::Cmd::can_run('raxmlHPC')
or IPC::Cmd::can_run('raxmlHPC-PTHREADS');
$result = test_app( 'App::Egaz' => [qw(raxml t/YDL184C.fas)] );
is($result->error, undef, 'threw no exceptions');
is( ( scalar grep {/\S/} split( /\n/, $result->stdout ) ), 1, 'line count' );
t/13-blastn.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help blastn)] );
like( $result->stdout, qr{blastn}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(blastn)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(blastn t/not_exists)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(blastn t/not_exists t/pseudopig.fa)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "makeblastdb or blastn not installed", 5
unless IPC::Cmd::can_run('makeblastdb')
and IPC::Cmd::can_run('blastn');
$result = test_app( 'App::Egaz' => [qw(blastn t/pig2.fa t/pseudopig.fa --verbose)] );
is( $result->error, undef, 'threw no exceptions' );
is( ( scalar grep { !/^#/ } grep {/\S/} split( /\n/, $result->stdout ) ), 1, 'line count' );
t/14-lastz.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help lastz)] );
like( $result->stdout, qr{lastz}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(lastz)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lastz t/not_exists)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lastz t/not_exists t/pseudopig.fa)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "lastz not installed", 6 unless IPC::Cmd::can_run('lastz');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
my $tempdir = Path::Tiny->tempdir;
chdir $tempdir;
t/15-prepseq.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help prepseq)] );
like( $result->stdout, qr{prepseq}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(prepseq)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(prepseq t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "faops or faToTwoBit or samtools not installed", 12
unless IPC::Cmd::can_run('faops')
and IPC::Cmd::can_run('faToTwoBit')
and IPC::Cmd::can_run('samtools');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
t/16-lpcnam.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help lpcnam)] );
like( $result->stdout, qr{lpcnam}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(lpcnam)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lpcnam t/not_exists)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(lpcnam t/pseudocat t/pseudopig t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "kent-tools not installed", 12
unless IPC::Cmd::can_run('axtChain')
and IPC::Cmd::can_run('chainAntiRepeat')
and IPC::Cmd::can_run('chainMergeSort')
and IPC::Cmd::can_run('chainPreNet')
and IPC::Cmd::can_run('chainNet')
and IPC::Cmd::can_run('netSyntenic')
t/17-multiz.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help multiz)] );
like( $result->stdout, qr{multiz}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(multiz)] );
like( $result->error, qr{need .+input}, 'need inputs' );
$result = test_app( 'App::Egaz' => [qw(multiz t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'inputs not exists' );
$result = test_app( 'App::Egaz' => [qw(multiz t/Q_rubravsQ_aliena t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'inputs not exists' );
$result = test_app( 'App::Egaz' => [qw(multiz t/Q_rubravsQ_aliena --tree t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'inputs not exists' );
SKIP: {
skip "multiz not installed", 3 unless IPC::Cmd::can_run('multiz');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
my $tempdir = Path::Tiny->tempdir;
chdir $tempdir;
t/18-repeatmasker.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help repeatmasker)] );
like( $result->stdout, qr{repeatmasker}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(repeatmasker)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(repeatmasker t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
$result = test_app( 'App::Egaz' => [qw(repeatmasker t/not_exists t/pseudopig.fa)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "RepeatMasker or faops not installed", 7
unless IPC::Cmd::can_run('RepeatMasker')
and IPC::Cmd::can_run('faops');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
t/19-blastmatch.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help blastmatch)] );
like( $result->stdout, qr{blastmatch}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(blastmatch)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(blastmatch t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "makeblastdb or blastn not installed", 4
unless IPC::Cmd::can_run('makeblastdb')
and IPC::Cmd::can_run('blastn');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
t/20-blastlink.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help blastlink)] );
like( $result->stdout, qr{blastlink}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(blastlink)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(blastlink t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "makeblastdb or blastn not installed", 5
unless IPC::Cmd::can_run('makeblastdb')
and IPC::Cmd::can_run('blastn');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
t/21-fas2vcf.t view on Meta::CPAN
use App::Cmd::Tester;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help fas2vcf)] );
like( $result->stdout, qr{fas2vcf}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(fas2vcf)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(fas2vcf t/not_exists)] );
like( $result->error, qr{need .+input file}, 'need infile' );
$result = test_app( 'App::Egaz' => [qw(fas2vcf t/not_exists t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'infile not exists' );
SKIP: {
skip "snp-sites or bcftools not installed", 7
unless IPC::Cmd::can_run('snp-sites')
and IPC::Cmd::can_run('bcftools');
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
t/91-template.t view on Meta::CPAN
use App::Cmd::Tester::CaptureExternal;
use App::Egaz;
my $result = test_app( 'App::Egaz' => [qw(help template)] );
like( $result->stdout, qr{template}, 'descriptions' );
$result = test_app( 'App::Egaz' => [qw(template)] );
like( $result->error, qr{need .+ dir}, 'need directory' );
$result = test_app( 'App::Egaz' => [qw(template t/not_exists)] );
like( $result->error, qr{doesn't exist}, 'not exists' );
{
my $t_path = Path::Tiny::path("t/")->absolute->stringify;
my $cwd = Path::Tiny->cwd;
my $tempdir = Path::Tiny->tempdir;
chdir $tempdir;
$result = test_app(