| 1 |
#!/usr/bin/env perl |
| 2 |
use strict; |
| 3 |
use warnings; |
| 4 |
use File::Temp; |
| 5 |
|
| 6 |
BEGIN { unshift( @INC, './lib' ) } |
| 7 |
BEGIN { unshift( @INC, '../lib' ) } |
| 8 |
|
| 9 |
BEGIN { |
| 10 |
use Test::Most; |
| 11 |
use_ok('Bio::Tradis::DetectTags'); |
| 12 |
} |
| 13 |
|
| 14 |
my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 ); |
| 15 |
my $destination_directory = $destination_directory_obj->dirname(); |
| 16 |
|
| 17 |
my ( $bamfile, $obj ); |
| 18 |
|
| 19 |
$bamfile = "t/data/DetectTags/sample_sm_tr.bam"; |
| 20 |
|
| 21 |
ok( |
| 22 |
$obj = Bio::Tradis::DetectTags->new( |
| 23 |
bamfile => $bamfile, |
| 24 |
script_name => 'name_of_script' |
| 25 |
), |
| 26 |
'testing tag checker - tradis' |
| 27 |
); |
| 28 |
is( $obj->tags_present, 1, 'testing output' ); |
| 29 |
|
| 30 |
|
| 31 |
my $cramfile = "t/data/DetectTags/sample_sm_tr.cram"; |
| 32 |
|
| 33 |
ok( |
| 34 |
$obj = Bio::Tradis::DetectTags->new( |
| 35 |
bamfile => $cramfile, |
| 36 |
script_name => 'name_of_script' |
| 37 |
), |
| 38 |
'testing tag checker for cram- tradis' |
| 39 |
); |
| 40 |
is( $obj->tags_present, 1, 'testing output cram' ); |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
$bamfile = "t/data/DetectTags/sample_sm_no_tr.bam"; |
| 45 |
|
| 46 |
ok( |
| 47 |
$obj = Bio::Tradis::DetectTags->new( |
| 48 |
bamfile => $bamfile, |
| 49 |
script_name => 'name_of_script' |
| 50 |
), |
| 51 |
'testing tag checker - no tradis' |
| 52 |
); |
| 53 |
is( $obj->tags_present, 0, 'testing output' ); |
| 54 |
|
| 55 |
done_testing(); |