« lib/Bio/AssemblyImprovement/Scaffold/SSpace/PreprocessInputFiles.pm
↑ Summary
lib/Bio/AssemblyImprovement/Scaffold/SSpace/Config.pm »
| 1 | package Bio::AssemblyImprovement::Util::ZipFileRole; | ||||||||||||||||||||
| 2 | # ABSTRACT: Zip file | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 6 | ▶ | use Moose::Role; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 6 | ▶ | use IO::Compress::Gzip qw(gzip $GzipError) ; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 6 | ▶ | use Cwd qw(abs_path); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 6 | ▶ | use Cwd; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 6 | ▶ | use File::Basename; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | ▶ | sub _zip_file { | ||||||||||||||||||
|
Subroutine
_zip_file: called CC=4 SCAR=14.2
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | my ( $self, $input_filename, $output_directory ) = @_; | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 2 | ▶ | return undef unless(defined($input_filename)); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 2 | ▶ | $output_directory ||= abs_path (getcwd()); | ||||||||||||||||||
|
Condition33%1/3
$output_directory ||= abs_path(getcwd())
MC/DC0%0/2
$output_directory ||= abs_path(getcwd())
$output_directory
abs_path(getcwd())
Truth table33%1/3
A ||= B
A= $output_directoryB= abs_path(getcwd())
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 2 | my ( $filename, $directories, $suffix ) = fileparse( $input_filename ); | |||||||||||||||||||
| 20 | 2 | my $output_filename = join( '/', ( $output_directory, $filename.'.gz' ) ); | |||||||||||||||||||
| 21 | 2 | ▶ | gzip $input_filename => $output_filename or die "gzip failed: $GzipError\n"; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 22 | 1 | return $output_filename; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 6 | ▶ | no Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 27 | 6 | 1; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||