<commit_before>#!/usr/bin/env perl

# This is a driver script that uses the following perl scripts:
# plot_pco_with_stats,
# plot_qiime_pco_with_stats, or
# plot_OTU_pco_with_stats
#
# It runs these sequntially based on arguments in a list 

use warnings;
use Getopt::Long;
use Cwd;

my $start_time_stamp =`date +%m-%d-%y_%H:%M:%S`;  # create the time stamp month-day-year_hour:min:sec:nanosec
my ($command_file, $debug, $help);

if ( (@ARGV > 0) && ($ARGV[0] =~ /-h/) ) { &usage(); }

unless ( @ARGV > 0 || $command_file ) { &usage(); }

if ( ! GetOptions (
		   "f|command_file=s" => \$command_file
		  )
   ) { &usage(); }

my $current_dir = getcwd()."/";
my $path_file = $current_dir.$command_file;
my $log_file = $current_dir.$command_file.".MASTER.log";
my $log_prefix = "my_log";

open(LOG, ">", $log_file) or die "cant open LOG $log_file"."\n";
print LOG "Start: ".$start_time_stamp."\n\n";

my $job_counter = 1;

open(FILE, "<", $path_file) or die "can't open FILE $path_file"."\n"; 

while (my $line = <FILE>){

  chomp $line;
  
  unless ( ($line =~ m/^#/) || ($line =~ m/^\s*$/) ){

    print LOG "Start Command_".$job_counter."( ".$log_prefix." ) at ".`date +%m-%d-%y_%H:%M:%S`.$line."\n";
    my $job_log = $current_dir.$command_file.".".$log_prefix.".job_".$job_counter.".error_log";
    
    if($debug){
      print("MADE IT HERE (0)"."\n");
      $line = $line." 2>$job_log";
      print("\n"."LINE:"."\n".$line."\n\n");
    }<commit_msg>minor improvements to MASTER driver script<commit_after>#!/usr/bin/env perl

# This is a driver script that uses the following perl scripts:
# plot_pco_with_stats,
# plot_qiime_pco_with_stats, or
# plot_OTU_pco_with_stats
#
# It runs these sequntially based on arguments in a list 

use warnings;
use Getopt::Long;
use Cwd;

my $start_time_stamp =`date +%m-%d-%y_%H:%M:%S`;  # create the time stamp month-day-year_hour:min:sec:nanosec
my ($command_file, $debug, $help);

if ( (@ARGV > 0) && ($ARGV[0] =~ /-h/) ) { &usage(); }

unless ( @ARGV > 0 || $command_file ) { &usage(); }

if ( ! GetOptions (
		   "f|command_file=s" => \$command_file
		  )
   ) { &usage(); }

my $current_dir = getcwd()."/";
my $path_file = $current_dir.$command_file;
my $log_file = $current_dir.$command_file.".MASTER.log";
my $log_prefix = "my_log";

open(LOG, ">", $log_file) or die "cant open LOG $log_file"."\n";
print LOG "Start: ".$start_time_stamp."\n\n";

my $job_counter = 1;

open(FILE, "<", $path_file) or die "can't open FILE $path_file"."\n"; 

while (my $line = <FILE>){

  chomp $line;
  
  unless ( ($line =~ m/^#/) || ($line =~ m/^\s*$/) ){

    print LOG "Start Command_".$job_counter."( ".$log_prefix." ) at ".`date +%m-%d-%y_%H:%M:%S`.$line."\n";
    my $job_log = $current_dir.$command_file.".".$log_prefix.".command_".$job_counter.".error_log";
    
    if($debug){
      print("MADE IT HERE (0)"."\n");
      $line = $line." 2>$job_log";
      print("\n"."LINE:"."\n".$line."\n\n");
    }
{'fraction_non_alphanumeric': 0.21950390757730207, 'fraction_numerical': 0.004077471967380225, 'mean_word_length': 3.7483870967741937, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '351025', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1193, 'n_words': 261}