-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vcfparser): Refactor define snpeff annotations
- Added test
- Loading branch information
1 parent
da0f402
commit 1284218
Showing
4 changed files
with
112 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/env perl | ||
|
||
use 5.026; | ||
use Carp; | ||
use charnames qw{ :full :short }; | ||
use English qw{ -no_match_vars }; | ||
use File::Basename qw{ dirname }; | ||
use File::Spec::Functions qw{ catdir }; | ||
use FindBin qw{ $Bin }; | ||
use open qw{ :encoding(UTF-8) :std }; | ||
use Params::Check qw{ allow check last_error }; | ||
use Test::More; | ||
use utf8; | ||
use warnings qw{ FATAL utf8 }; | ||
|
||
## CPANM | ||
use autodie qw { :all }; | ||
use Modern::Perl qw{ 2014 }; | ||
use Readonly; | ||
|
||
## MIPs lib/ | ||
use lib catdir( dirname($Bin), q{lib} ); | ||
use MIP::Constants qw{ $COMMA $SPACE }; | ||
use MIP::Test::Fixtures qw{ test_standard_cli }; | ||
|
||
my $VERBOSE = 1; | ||
our $VERSION = 1.00; | ||
|
||
$VERBOSE = test_standard_cli( | ||
{ | ||
verbose => $VERBOSE, | ||
version => $VERSION, | ||
} | ||
); | ||
|
||
BEGIN { | ||
|
||
use MIP::Test::Fixtures qw{ test_import }; | ||
|
||
### Check all internal dependency modules and imports | ||
## Modules with import | ||
my %perl_module = ( | ||
q{MIP::Vcfparser} => [qw{ define_snpeff_annotations }], | ||
q{MIP::Test::Fixtures} => [qw{ test_standard_cli }], | ||
); | ||
|
||
test_import( { perl_module_href => \%perl_module, } ); | ||
} | ||
|
||
use MIP::Vcfparser qw{ define_snpeff_annotations }; | ||
|
||
diag( q{Test define_snpeff_annotations from Vcfparser.pm v} | ||
. $MIP::Vcfparser::VERSION | ||
. $COMMA | ||
. $SPACE . q{Perl} | ||
. $SPACE | ||
. $PERL_VERSION | ||
. $SPACE | ||
. $EXECUTABLE_NAME ); | ||
|
||
## Given snpeff annotations | ||
my %snpeff_cmd = define_snpeff_annotations(); | ||
|
||
my $phastcons100way_vertebrate_prediction_term_file = q{SnpSift dbnsfp}; | ||
|
||
## Then keys should exist and annotation info should be set | ||
ok( keys %snpeff_cmd, q{Returned hash keys} ); | ||
|
||
is( | ||
$snpeff_cmd{snpeff}{phastCons100way_vertebrate_prediction_term}{File}, | ||
$phastcons100way_vertebrate_prediction_term_file, | ||
q{Got file info for annotation key} | ||
); | ||
|
||
done_testing(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters