<commit_before>#!/usr/bin/env perl
use strict;
use warnings;

my $dir = ".";
if (@ARGV) {
  $dir = shift;
}

opendir(DIR, $dir) or die;
my @fasta_files = sort grep {/\.fa$/} readdir(DIR);
closedir(DIR);

print join("\t", "FILENAME", "high-conf(ACTG)", "perc", "low-conf(actg)", "perc", "fail(N)", "perc", "insertions(-)", "perc", "no coverage(.)", "perc", "total"), "\n";

foreach my $this_file (@fasta_files) {
  open(FASTA, $this_file) or die;
  my $uc = 0;
  my $base_A = 0;
  my $base_C = 0;
  my $base_G = 0;
  my $base_T = 0;
  my $lc = 0;
  my $n = 0;
  my $gaps = 0;
  my $dots = 0;
  while (<FASTA>) {
    next if (/^>/);
    $base_A += ($_ =~ tr/Aa/Aa/);
    $base_C += ($_ =~ tr/Cc/Cc/);
    $base_G += ($_ =~ tr/Gg/Gg/);
    $base_T += ($_ =~ tr/Tt/Tt/);<commit_msg>*** empty log message ***<commit_after>#!/usr/bin/env perl
use strict;
use warnings;

my $dir = ".";
if (@ARGV) {
  $dir = shift;
}

opendir(DIR, $dir) or die;
my @fasta_files = sort grep {/\.fa$/} readdir(DIR);
closedir(DIR);

print join("\t", "FILENAME", "high-conf(ACTG)", "perc", "low-conf(actg)", "perc", "fail(N)", "perc", "insertions(-)", "perc", "no coverage(.)", "perc", "total"), "\n";

foreach my $this_file (@fasta_files) {
  open(FASTA, $this_file) or die "Cannot open $this_file for reading.\n";
  my $uc = 0;
  my $base_A = 0;
  my $base_C = 0;
  my $base_G = 0;
  my $base_T = 0;
  my $lc = 0;
  my $n = 0;
  my $gaps = 0;
  my $dots = 0;
  while (<FASTA>) {
    next if (/^>/);
    $base_A += ($_ =~ tr/Aa/Aa/);
    $base_C += ($_ =~ tr/Cc/Cc/);
    $base_G += ($_ =~ tr/Gg/Gg/);
    $base_T += ($_ =~ tr/Tt/Tt/);
{'fraction_non_alphanumeric': 0.2568407960199005, 'fraction_numerical': 0.011194029850746268, 'mean_word_length': 3.083756345177665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2259554', 'n_tokens_mistral': 784, 'n_tokens_neox': 747, 'n_words': 181}