-
Glenn Proctor authored
Added ability to project (apparent)one2many orthologs as well. Multiple targets are labeled "1 of 2", "2 of 2" etc
52181cbf
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
project_display_xrefs.pl 22.91 KiB
use strict;
# Sets display_xref_ids for novel genes in the "to" database based
# on their orthologs in the "from" database. Can also project GO xrefs.
# Orthology relationships are read from a Compara database.
use Getopt::Long;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::DBSQL::GeneAdaptor;
use Bio::EnsEMBL::Utils::Eprof qw(eprof_start eprof_end eprof_dump);
my $method_link_type = "ENSEMBL_ORTHOLOGUES";
my ($conf, $compara, $from_species, @to_multi, $print, $names, $go_terms, $delete_names, $delete_go_terms, $no_backup, $full_stats, $descriptions, $release, $no_database, $quiet, $single_source, $max_genes, $one_to_many);
GetOptions('conf=s' => \$conf,
'compara=s' => \$compara,
'from=s' => \$from_species,
'to=s' => \@to_multi,
'method=s' => \$method_link_type,
'names' => \$names,
'go_terms' => \$go_terms,
'print' => \$print,
'delete_names' => \$delete_names,
'delete_go_terms' => \$delete_go_terms,
'nobackup' => \$no_backup,
'full_stats' => \$full_stats,
'descriptions' => \$descriptions,
'release=i' => \$release,
'no_database' => \$no_database,
'quiet' => \$quiet,
'single_source=s' => \$single_source,
'max_genes=i' => \$max_genes,
'one_to_many' => \$one_to_many,
'help' => sub { usage(); exit(0); });
$| = 1; # auto flush stdout
$descriptions = 1;
if (!$conf) {
print STDERR "Configuration file must be supplied via -conf argument\n";
usage();
exit(1);
} elsif (!$from_species) {
print STDERR "From species must be supplied via -from argument\n";
usage();
exit(1);
} elsif (!@to_multi) {
print STDERR "At least one target species must be supplied via the -to argument\n";
usage();
exit(1);
} elsif (!$release && !$no_database) {
print STDERR "Release must be specified via -release argument unless -no_database is used\n";
usage();
exit(1);
}
if (!$go_terms && !$names) {
print STDERR "One or both of --names or --go_terms must be specified\n";