Skip to content

Commit

Permalink
Comment out unused code
Browse files Browse the repository at this point in the history
Refs #2776
  • Loading branch information
kimrutherford committed Sep 25, 2023
1 parent e0bfa4b commit e2e8e3d
Showing 1 changed file with 39 additions and 44 deletions.
83 changes: 39 additions & 44 deletions etc/update_canto_alleles_from_chado.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl

# for each allele in APPROVED sessions, look it up in Chado then use
# the Chado details to fill in missing Canto allele details
# the Chado details to fill in missing Canto allele type and/or
# description

use strict;
use warnings;
Expand Down Expand Up @@ -187,28 +188,24 @@ BEGIN
$allele->update();
}

if (1) {
if (defined $allele_name && $allele_name ne 'noname' &&
$chado_allele_name ne $allele_name =~ s/[Δ∆]/delta/gr &&
($allele_type ne 'deletion' || !$_deletion_name_match->())) {
warn "$curs_key: allele name in Chado differs from Canto, ",
qq|"$chado_allele_name" vs "$allele_name" (for $allele_type $allele_primary_identifier / $chado_allele_systematic_id)\n|;
}
}

if (defined $allele_description && $allele_description ne 'unknown') {
if (0) {
if (defined $chado_allele_description) {
if ($chado_allele_description =~ s/, +/,/gr ne $allele_description =~ s/, +/,/gr) {
warn "$curs_key: allele description for $printable_allele_name in Chado differs from Canto, ",
qq|"$chado_allele_description" vs "$allele_description" (for $allele_primary_identifier / $chado_allele_systematic_id)\n|;
}
} else {
if ($allele_type ne 'deletion' || $allele_description ne 'deletion') {
warn "$curs_key: no description in Chado for $printable_allele_name($allele_description) $allele_primary_identifier\n";
}
}
}
# if (defined $chado_allele_description) {
# if ($chado_allele_description =~ s/, +/,/gr ne $allele_description =~ s/, +/,/gr) {
# warn "$curs_key: allele description for $printable_allele_name in Chado differs from Canto, ",
# qq|"$chado_allele_description" vs "$allele_description" (for $allele_primary_identifier / $chado_allele_systematic_id)\n|;
# }
# } else {
# if ($allele_type ne 'deletion' || $allele_description ne 'deletion') {
# warn "$curs_key: no description in Chado for $printable_allele_name($allele_description) $allele_primary_identifier\n";
# }
# }
} else {
if (defined $chado_allele_description &&
$chado_allele_description ne 'unknown' &&
Expand All @@ -225,35 +222,33 @@ BEGIN
}
}

if (0) {
if (defined $chado_allele_description) {
if (defined $allele_description && $allele_description ne 'unknown') {
if ($chado_allele_description ne $allele_description) {
warn qq|$curs_key: setting description of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
qq|"$chado_allele_description" (was "$printable_allele_description")\n|;
}
} else {
# warn qq|$curs_key: setting description of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
# qq|"$chado_allele_description" (was unset)\n|;
}
} else {
if (defined $allele_description && $allele_description ne 'unknown') {
die $allele_description;
}
}

if (defined $allele_name && $allele_name ne 'noname') {
if ($chado_allele_name ne $allele_name) {
warn qq|$curs_key: setting name of $allele_primary_identifier / $chado_allele_systematic_id $chado_allele_type|,
" to ",
qq|"$chado_allele_name" (was "$printable_allele_name")\n|;
}
} else {
# warn qq|$curs_key: setting name of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
# qq|"$chado_allele_name" (was unset)\n|;
}
#my $chado_external_uniquename = $chado_allele->{external_uniquename};
}
# if (defined $chado_allele_description) {
# if (defined $allele_description && $allele_description ne 'unknown') {
# if ($chado_allele_description ne $allele_description) {
# warn qq|$curs_key: setting description of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
# qq|"$chado_allele_description" (was "$printable_allele_description")\n|;
# }
# } else {
# # warn qq|$curs_key: setting description of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
# # qq|"$chado_allele_description" (was unset)\n|;
# }
# } else {
# if (defined $allele_description && $allele_description ne 'unknown') {
# die $allele_description;
# }
# }
#
# if (defined $allele_name && $allele_name ne 'noname') {
# if ($chado_allele_name ne $allele_name) {
# warn qq|$curs_key: setting name of $allele_primary_identifier / $chado_allele_systematic_id $chado_allele_type|,
# " to ",
# qq|"$chado_allele_name" (was "$printable_allele_name")\n|;
# }
# } else {
# # warn qq|$curs_key: setting name of $allele_primary_identifier / $chado_allele_systematic_id $allele_type to |,
# # qq|"$chado_allele_name" (was unset)\n|;
# }
# #my $chado_external_uniquename = $chado_allele->{external_uniquename};
}
};

Expand Down

0 comments on commit e2e8e3d

Please sign in to comment.