<commit_before>#!/usr/local/bin/perl
use strict;
use Bio::EnsEMBL::Registry;

Bio::EnsEMBL::Registry->load_registry_from_db
  (-host=>"ensembldb.ensembl.org", 
   -user=>"anonymous", 
   -db_version=>'47');
my $human_gene_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Homo sapiens", "core", "Gene");
my $member_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "Member");
my $homology_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "Homology");
my $proteintree_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "ProteinTree");
my $mlss_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "MethodLinkSpeciesSet");

my $genes = $human_gene_adaptor->
  fetch_all_by_external_name('BRCA2');

my $verbose = 0;
foreach my $gene (@$genes) {
  my $member = $member_adaptor->
    fetch_by_source_stable_id("ENSEMBLGENE",$gene->stable_id);
  die "no members" unless (defined $member);
  my $all_homologies = $homology_adaptor->fetch_by_Member($member);
  foreach my $homology (@$all_homologies) {
    my @two_ids = map { $_->get_longest_peptide_Member->member_id } @{$homology->gene_list};
    my $leaf_node_id = $homology->node_id;<commit_msg>get_longest_peptide_Member DEPRECATED -- use get_canonical_peptide_Member<commit_after>#!/usr/local/bin/perl
use strict;
use Bio::EnsEMBL::Registry;

Bio::EnsEMBL::Registry->load_registry_from_db
  (-host=>"ensembldb.ensembl.org", 
   -user=>"anonymous", 
   -db_version=>'47');
my $human_gene_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Homo sapiens", "core", "Gene");
my $member_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "Member");
my $homology_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "Homology");
my $proteintree_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "ProteinTree");
my $mlss_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor
  ("Compara", "compara", "MethodLinkSpeciesSet");

my $genes = $human_gene_adaptor->
  fetch_all_by_external_name('BRCA2');

my $verbose = 0;
foreach my $gene (@$genes) {
  my $member = $member_adaptor->
    fetch_by_source_stable_id("ENSEMBLGENE",$gene->stable_id);
  die "no members" unless (defined $member);
  my $all_homologies = $homology_adaptor->fetch_by_Member($member);
  foreach my $homology (@$all_homologies) {
    my @two_ids = map { $_->get_canonical_peptide_Member->member_id } @{$homology->gene_list};
    my $leaf_node_id = $homology->node_id;
{'fraction_non_alphanumeric': 0.16875981161695447, 'fraction_numerical': 0.0031397174254317113, 'mean_word_length': 6.022038567493113, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, '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': '2338142', 'n_tokens_mistral': 1040, 'n_tokens_neox': 956, 'n_words': 154}