<commit_before>#!/usr/bin/env perl
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2017] EMBL-European Bioinformatics Institute
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



=head1 CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <helpdesk.org>.

=cut


# Script to dump out a table of variation sets that can be used in the documentation

use strict;
use warnings;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::DBSQL::OntologyTermAdaptor;
use Bio::EnsEMBL::Variation::Utils::Constants qw(%VARIATION_CLASSES);
use Getopt::Long;

my $registry = my $onto_registy = 'Bio::EnsEMBL::Registry';

# Print the usage instructions if run without parameters
usage() unless (scalar(@ARGV));

my ($species, $host, $port, $ohost, $db_version, $output_file, $help);

GetOptions(
  'v=i'         => \$db_version,
  'o=s'         => \$output_file,
  'host=s'      => \$host,
  'port=i'      => \$port,
  'ohost=s'     => \$ohost,
  'species|s=s' => \$species,
  'help!'       => \$help
);

usage ("Species, host, port, version and output_file must be specified") unless ($species && $host && $port && $db_version && $output_file);
usage("Host providing the ontology database must be specified") unless ($ohost);

# Load the registry from db
$registry->load_registry_from_db(
    -host => $host,
    -port => $port,
    -user => 'ensro',
    -db_version => $db_version
);

my $internal_link = '/i/16/internal_link.png';

my %colour = (
    'copy_number_variation'          => '#8601AF',
    'insertion'                      => '#000099',
    'copy_number_gain'               => '#0000CC',
    'copy_number_loss'               => '#CC0000',
    'loss_of_heterozygosity'         => '#8601AF',
    'inversion'                      => '#C530FF',
    'complex_structural_alteration'  => '#007FFF',
    'complex_substitution'           => '#007FFF',
    'tandem_duplication'             => '#732E00',
    'short_tandem_repeat_variation'  => '#732E00',
    'mobile_element_insertion'       => '#000080',
    'novel_sequence_insertion'       => '#000080',
    'Alu_insertion'                  => '#000080',
    'translocation'                  => '#C3A4FF',
    'interchromosomal_translocation' => '#C3A4FF',
    'intrachromosomal_translocation' => '#C3A4FF',
    'deletion'                       => '#CC0000',
    'duplication'                    => '#0000CC',
    'indel'                          => 'gold',
    'probe'                          => '#4682B4',
);
my $default_colour = '#000000';


my %type = (
  '1' => { 'label' => 'Variant', 'type' => 'var'},
  '2' => { 'label' => '<span class="_ht ht" title="Structural variant">SV</span>', 'type' => 'sv'},
  '3' => { 'label' => 'Variant</li><li style="margin:4px 0px 0px"><span class="_ht ht" title="Structural variant">SV</span>',
           'type'  => 'both'},
  '4' => { 'label' => 'CNV probe', 'type' => 'sv'},
);


my %example_urls = (<commit_msg>Add a new SV class<commit_after>#!/usr/bin/env perl
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2017] EMBL-European Bioinformatics Institute
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



=head1 CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <helpdesk.org>.

=cut


# Script to dump out a table of variation sets that can be used in the documentation

use strict;
use warnings;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::DBSQL::OntologyTermAdaptor;
use Bio::EnsEMBL::Variation::Utils::Constants qw(%VARIATION_CLASSES);
use Getopt::Long;

my $registry = my $onto_registy = 'Bio::EnsEMBL::Registry';

# Print the usage instructions if run without parameters
usage() unless (scalar(@ARGV));

my ($species, $host, $port, $ohost, $db_version, $output_file, $help);

GetOptions(
  'v=i'         => \$db_version,
  'o=s'         => \$output_file,
  'host=s'      => \$host,
  'port=i'      => \$port,
  'ohost=s'     => \$ohost,
  'species|s=s' => \$species,
  'help!'       => \$help
);

usage ("Species, host, port, version and output_file must be specified") unless ($species && $host && $port && $db_version && $output_file);
usage("Host providing the ontology database must be specified") unless ($ohost);

# Load the registry from db
$registry->load_registry_from_db(
    -host => $host,
    -port => $port,
    -user => 'ensro',
    -db_version => $db_version
);

my $internal_link = '/i/16/internal_link.png';

my %colour = (
    'copy_number_variation'          => '#8601AF',
    'insertion'                      => '#000099',
    'copy_number_gain'               => '#0000CC',
    'copy_number_loss'               => '#CC0000',
    'loss_of_heterozygosity'         => '#8601AF',
    'inversion'                      => '#C530FF',
    'complex_structural_alteration'  => '#007FFF',
    'complex_substitution'           => '#007FFF',
    'tandem_duplication'             => '#732E00',
    'short_tandem_repeat_variation'  => '#732E00',
    'mobile_element_insertion'       => '#000080',
    'novel_sequence_insertion'       => '#000080',
    'Alu_insertion'                  => '#000080',
    'translocation'                  => '#C3A4FF',
    'interchromosomal_translocation' => '#C3A4FF',
    'intrachromosomal_translocation' => '#C3A4FF',
    'deletion'                       => '#CC0000',
    'mobile_element_deletion'        => '#CC0000',
    'duplication'                    => '#0000CC',
    'indel'                          => 'gold',
    'probe'                          => '#4682B4',
);
my $default_colour = '#000000';


my %type = (
  '1' => { 'label' => 'Variant', 'type' => 'var'},
  '2' => { 'label' => '<span class="_ht ht" title="Structural variant">SV</span>', 'type' => 'sv'},
  '3' => { 'label' => 'Variant</li><li style="margin:4px 0px 0px"><span class="_ht ht" title="Structural variant">SV</span>',
           'type'  => 'both'},
  '4' => { 'label' => 'CNV probe', 'type' => 'sv'},
);


my %example_urls = (
{'fraction_non_alphanumeric': 0.15278922780983786, 'fraction_numerical': 0.03187688925528991, 'mean_word_length': 3.0193263390392047, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 108, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7472113', 'n_tokens_mistral': 2539, 'n_tokens_neox': 2293, 'n_words': 638}