Skip to content

Commit

Permalink
Fix #401 Add yaml possibility for statistics output. Use list for sen…
Browse files Browse the repository at this point in the history
…tences with format option. Formating done at the very end.
  • Loading branch information
Juke34 committed Jun 6, 2024
1 parent c236669 commit 07fe98e
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 75 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

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 07fe98e

Please sign in to comment.