<commit_before>#!/software/bin/perl

=head1 NAME

translation_attribs.pl - script to calculate peptide statistics and store 
                         them in translation_attrib table

=head1 SYNOPSIS

translation_attribs.pl [arguments]

Required arguments:

  --user=user                         username for the database

  --pass=pass                         password for database


Optional arguments:

  --pattern=pattern                   calculate translation attribs for databases matching pattern
                                      Note that this is a standard regular expression of the
                                      form '^[a-b].*core.*' for all core databases starting with a or b

  --binpath=PATH                      directory where the binary script to calculate 
                                      pepstats is stored (default: /software/pubseq/bin/emboss)

  --tmpfile=file                      file to store tmp results of pepstats (default=/tmp)

  --host=host                         server where the core databases are stored (default: ens-staging)

  --dbname=dbname                     if you want a single database to calculate the pepstats
                                      (all databases by default)

  --port=port                         port (default=3306)

  --help                              print help (this message)

=head1 DESCRIPTION

This script will calculate the peptide statistics for all core databases in the server 
and store them as a translation_attrib values

=head1 EXAMPLES
<commit_msg>Making the documentation reflect what is occuring in the code<commit_after>#!/software/bin/perl

=head1 NAME

translation_attribs.pl - script to calculate peptide statistics and store 
                         them in translation_attrib table

=head1 SYNOPSIS

translation_attribs.pl [arguments]

Required arguments:

  --user=user                         username for the database

  --pass=pass                         password for database


Optional arguments:

  --pattern=pattern                   calculate translation attribs for databases matching pattern
                                      Note that this is a standard regular expression of the
                                      form '^[a-b].*core.*' for all core databases starting with a or b

  --binpath=PATH                      directory where the binary script to calculate 
                                      pepstats is stored (default: /software/pubseq/bin/emboss)

  --tmpdir=dir                        directory to store tmp results of pepstats (default=/tmp)

  --host=host                         server where the core databases are stored (default: ens-staging)

  --dbname=dbname                     if you want a single database to calculate the pepstats
                                      (all databases by default)

  --port=port                         port (default=3306)

  --help                              print help (this message)

=head1 DESCRIPTION

This script will calculate the peptide statistics for all core databases in the server 
and store them as a translation_attrib values

=head1 EXAMPLES

{'fraction_non_alphanumeric': 0.04884237234379955, 'fraction_numerical': 0.00507453219156359, 'mean_word_length': 1.615257048092869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2537883', 'n_tokens_mistral': 766, 'n_tokens_neox': 678, 'n_words': 291}