Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
07a64ab8
Commit
07a64ab8
authored
13 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
added option -show_links to show the genes linked to for the xrefs if a name is given
parent
efbf2306
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/xref_mapping/xref_data_analysis.pl
+14
-2
14 additions, 2 deletions
misc-scripts/xref_mapping/xref_data_analysis.pl
with
14 additions
and
2 deletions
misc-scripts/xref_mapping/xref_data_analysis.pl
+
14
−
2
View file @
07a64ab8
...
...
@@ -10,6 +10,7 @@ my $user;
my
$dbname
;
my
$display_name
;
my
$source
;
my
$show_links
;
my
$ret
=
Getopt::Long::
GetOptions
('
dbname=s
'
=>
\
$dbname
,
'
species=s
'
=>
\
$species
,
...
...
@@ -18,6 +19,7 @@ my $ret = Getopt::Long::GetOptions ('dbname=s' => \$dbname,
'
version=s
'
=>
\
$version
,
'
name=s
'
=>
\
$display_name
,
'
source=s
'
=>
\
$source
,
'
show_links
'
=>
\
$show_links
,
'
help
'
=>
sub
{
usage
();
exit
(
0
);
}
);
...
...
@@ -120,6 +122,7 @@ sub specific_example {
my
(
$search_name
,
$source_name
)
=
@_
;
my
$db_adap
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$species
,"
core
","
dbentry
");
my
$gene_adap
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$species
,"
core
","
gene
");
my
$dbentrys
=
$db_adap
->
fetch_all_by_name
(
$search_name
,
$source_name
);
...
...
@@ -139,6 +142,13 @@ sub specific_example {
if
(
defined
$dbentry
->
info_text
){
print
"
info text:
"
.
$dbentry
->
info_text
.
"
\n
";
}
if
(
$show_links
&&
!
(
$dbentry
->
info_type
=~
/UNMAPPED/ms
)){
print
"
Linked to the following genes:
";
foreach
my
$gene
(
@
{
$gene_adap
->
fetch_all_by_external_name
(
$dbentry
->
primary_id
,
$dbentry
->
dbname
)}){
print
$gene
->
stable_id
.
"
";
}
print
"
\n
";
}
print
"
##############################
\n
";
}
if
(
!
$found
){
...
...
@@ -174,6 +184,8 @@ sub usage {
-
source
the
source
name
for
the
accession
(
i
.
e
.
HGNC
,
MGI
,
RefSeq_mRNA
)
-
show_links
If
name
used
then
show
which
ensembl
objects
is
is
linked
to
.
A
typical
run
would
be
to
see
what
xrefs
are
there
for
human
:
-
perl
xref_data_analysis
.
pl
-
species
human
...
...
@@ -196,9 +208,9 @@ sub usage {
To
find
how
a
partcular
xref
was
mapped
use
-
name
to
specify
this
and
-
source
if
more
than
one
xref
may
have
the
same
accession
e
.
g
.
how
was
accession
BRCA2
in
HGNC
mapped
to
ensembl
e
.
g
.
how
was
accession
BRCA2
in
HGNC
mapped
to
ensembl
and
to
which
genes
perl
xref_data_analysis
.
pl
-
species
human
-
name
BRCA2
-
source
HGNC
perl
xref_data_analysis
.
pl
-
species
human
-
name
BRCA2
-
source
HGNC
-
show_links
EOF
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment