Skip to content

Commit

Permalink
fix #401 (#466)
Browse files Browse the repository at this point in the history
* Fix #401 by add yaml possible output for statistics script.
  • Loading branch information
Juke34 authored Jun 6, 2024
1 parent 0278734 commit 3b94442
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 97 deletions.
22 changes: 18 additions & 4 deletions bin/agat_sp_statistics.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
my $config;
my $gff = undef;
my $opt_output = undef;
my $opt_yaml = undef;
my $opt_genomeSize = undef;
my $opt_plot = undef;
my $opt_verbose = 0;
Expand All @@ -22,6 +23,7 @@
'c|config=s' => \$config,
"h|help" => \$opt_help,
'o|output=s' => \$opt_output,
'yaml!' => \$opt_yaml,
'd|p' => \$opt_plot,
'v|verbose' => \$opt_verbose,
'g|f|gs=s' => \$opt_genomeSize,
Expand Down Expand Up @@ -52,6 +54,13 @@

#### IN / OUT
my $out = prepare_fileout($opt_output);
if(defined($opt_yaml)){
if( defined($opt_output)){
$opt_yaml = $opt_output.".yaml";
}else{
$out

Check failure on line 61 in bin/agat_sp_statistics.pl

View workflow job for this annotation

GitHub Actions / build

Useless use of private variable in void context
}
}

#Manage plot folder output
if($opt_plot){
Expand Down Expand Up @@ -93,10 +102,11 @@
##############
# STATISTICS #
print "Compute statistics\n";
print_omniscient_statistics ({ input => $hash_omniscient,
genome => $opt_genomeSize,
output => $out,
distri => $opt_plot,
print_omniscient_statistics ({ input => $hash_omniscient,
genome => $opt_genomeSize,
output => $out,
yaml => $opt_yaml,
distri => $opt_plot,
isoform => 1,
verbose => $opt_verbose
});
Expand Down Expand Up @@ -149,6 +159,10 @@ =head1 OPTIONS
File where will be written the result. If no output file is specified, the output will be written to STDOUT.
=item B<--yaml>
Bolean - When this option is activated , a second output will be printed either in STDOUT if no output provided or in <output.yaml> (a .yaml suffix is added to the --output value provided)
=item B<-c> or B<--config>
String - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any,
Expand Down
4 changes: 4 additions & 0 deletions docs/tools/agat_sp_statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ agat_sp_statistics.pl --help

File where will be written the result. If no output file is specified, the output will be written to STDOUT.

- **--yaml**

Bolean - When this option is activated , a second output will be printed either in STDOUT if no output provided or in <output.yaml> (a .yaml suffix is added to the --output value provided)

- **-c** or **--config**

String - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any,
Expand Down
Loading

0 comments on commit 3b94442

Please sign in to comment.