Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
99ff8cb8
Commit
99ff8cb8
authored
Nov 04, 2009
by
Ian Longden
Browse files
new faster sql
parent
5ef55fec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
misc-scripts/xref_mapping/XrefMapper/DisplayXrefs.pm
misc-scripts/xref_mapping/XrefMapper/DisplayXrefs.pm
+38
-12
No files found.
misc-scripts/xref_mapping/XrefMapper/DisplayXrefs.pm
View file @
99ff8cb8
...
@@ -1293,18 +1293,44 @@ SQL
...
@@ -1293,18 +1293,44 @@ SQL
#######################################################################
#######################################################################
my
$gene_desc_sql
=
(
<<
DXS
);
my
$gene_desc_sql
=
(
<<
DXS
);
SELECT
gtt
.
gene_id
,
x
.
description
,
s.source_id, x.accession
select
IF
(
ox
.
ensembl_object_type
=
'
Gene
',
gtt_gene
.
gene_id
,
FROM source s, xref x, object_xref ox, identity_xref ix, gene_transcript_translation gtt, gene_desc_prioritys p
IF
(
ox
.
ensembl_object_type
=
'
Transcript
',
gtt_transcript
.
gene_id
,
WHERE x.sourc
e_id
=
s.source_id
gtt_translation
.
gene_id
))
AS
gene_id
,
AND s.source_id = p.sourc
e_id
x
.
description
AS
description
,
AND
x
.
xref_id
=
ox
.
xref_id
s.source_id AS source_id,
AND
ox
.
ox_status
=
"
DUMP_OUT
"
x.accession AS accession
AND
(
(
ox
.
ensembl_object_type
=
"
Transcript
"
and
gtt
.
transcript_id
=
ox
.
ensembl_id
)
from ( gene_desc_prioritys p
OR
(
ox
.
ensembl_object_type
=
"
Translation
"
and
gtt
.
translation_id
=
ox
.
ensembl_id
)
join ( source s
OR
(
ox
.
ensembl_object_type
=
"
Gene
"
and
gtt
.
gene_id
=
ox
.
ensembl_id
)
join ( xref x
)
join ( object_xref ox
AND
ox
.
object_xref_id
=
ix
.
object_xref_id
join ( identity_xref ix
ORDER
BY
gtt
.
gene_id
DESC
,
p
.
priority
DESC
,
(
ix
.
target_identity
+
ix
.
query_identity
)
DESC
) using (object_xref_id)
) using (xref_id)
) using (source_id)
) using (source_id)
)
left join gene_transcript_translation gtt_gene
on (gtt_gene.g
ene_id
=
ox
.
ensembl_id
)
left
join
gene_transcript_translation
gtt_transcript
on
(
gtt_transcript
.
transcript_id
=
ox
.
ensembl_id
)
left
join
gene_transcript_translation
gtt_translation
on
(
gtt_translation
.
translation_id
=
ox
.
ensembl_id
)
where
ox
.
ox_status
=
'
DUMP_OUT
'
order
by
gene_id
desc
,
p
.
priority
desc
,
(
ix
.
target_identity
+
ix
.
query_identity
)
desc
# SELECT gtt.gene_id, x.description, s.source_id, x.accession
# FROM source s, xref x, object_xref ox, identity_xref ix, gene_transcript_translation gtt, gene_desc_prioritys p
# WHERE x.source_id = s.source_id
# AND s.source_id = p.source_id
# AND x.xref_id = ox.xref_id
# AND ox.ox_status = "DUMP_OUT"
# AND ( (ox.ensembl_object_type = "Transcript" and gtt.transcript_id = ox.ensembl_id)
# OR (ox.ensembl_object_type = "Translation" and gtt.translation_id = ox.ensembl_id)
# OR (ox.ensembl_object_type = "Gene" and gtt.gene_id = ox.ensembl_id)
# )
# AND ox.object_xref_id = ix.object_xref_id
# ORDER BY gtt.gene_id DESC, p.priority DESC, (ix.target_identity+ix.query_identity) DESC
DXS
DXS
########################################################################
########################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment