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
91b2f5aa
Commit
91b2f5aa
authored
8 years ago
by
Magali Ruffier
Browse files
Options
Downloads
Patches
Plain Diff
moved method to parent class
parent
2e11580f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!130
Test/transcript mapper
,
!130
Test/transcript mapper
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
+47
-0
47 additions, 0 deletions
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+0
-48
0 additions, 48 deletions
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
with
47 additions
and
48 deletions
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
+
47
−
0
View file @
91b2f5aa
...
...
@@ -1113,5 +1113,52 @@ sub get_dumped_data {
return
eval
(
$data
);
## no critic
}
#
# Given a logic name and an existing constraint this will
# add an analysis table constraint to the feature. Note that if no
# analysis_id exists in the columns of the primary table then no
# constraint is added at all
#
sub
_logic_name_to_constraint
{
my
$self
=
shift
;
my
$constraint
=
shift
;
my
$logic_name
=
shift
;
return
$constraint
if
(
!
$logic_name
);
#make sure that an analysis_id exists in the primary table
my
(
$prim_tab
)
=
$self
->
_tables
();
my
$prim_synonym
=
$prim_tab
->
[
1
];
my
$found_analysis
=
0
;
foreach
my
$col
(
$self
->
_columns
)
{
my
(
$syn
,
$col_name
)
=
split
(
/\./
,
$col
);
next
if
(
$syn
ne
$prim_synonym
);
if
(
$col_name
eq
'
analysis_id
')
{
$found_analysis
=
1
;
last
;
}
}
if
(
!
$found_analysis
)
{
warning
("
This feature is not associated with an analysis.
\n
"
.
"
Ignoring logic_name argument = [
$logic_name
].
\n
");
return
$constraint
;
}
my
$aa
=
$self
->
db
->
get_AnalysisAdaptor
();
my
$an
=
$aa
->
fetch_by_logic_name
(
$logic_name
);
if
(
!
defined
(
$an
)
)
{
return
undef
;
}
my
$an_id
=
$an
->
dbID
();
$constraint
.=
'
AND
'
if
(
$constraint
);
$constraint
.=
"
${prim_synonym}
.analysis_id =
$an_id
";
return
$constraint
;
}
1
;
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+
0
−
48
View file @
91b2f5aa
...
...
@@ -1166,54 +1166,6 @@ sub _remap {
}
#
# Given a logic name and an existing constraint this will
# add an analysis table constraint to the feature. Note that if no
# analysis_id exists in the columns of the primary table then no
# constraint is added at all
#
sub
_logic_name_to_constraint
{
my
$self
=
shift
;
my
$constraint
=
shift
;
my
$logic_name
=
shift
;
return
$constraint
if
(
!
$logic_name
);
#make sure that an analysis_id exists in the primary table
my
(
$prim_tab
)
=
$self
->
_tables
();
my
$prim_synonym
=
$prim_tab
->
[
1
];
my
$found_analysis
=
0
;
foreach
my
$col
(
$self
->
_columns
)
{
my
(
$syn
,
$col_name
)
=
split
(
/\./
,
$col
);
next
if
(
$syn
ne
$prim_synonym
);
if
(
$col_name
eq
'
analysis_id
')
{
$found_analysis
=
1
;
last
;
}
}
if
(
!
$found_analysis
)
{
warning
("
This feature is not associated with an analysis.
\n
"
.
"
Ignoring logic_name argument = [
$logic_name
].
\n
");
return
$constraint
;
}
my
$aa
=
$self
->
db
->
get_AnalysisAdaptor
();
my
$an
=
$aa
->
fetch_by_logic_name
(
$logic_name
);
if
(
!
defined
(
$an
)
)
{
return
undef
;
}
my
$an_id
=
$an
->
dbID
();
$constraint
.=
'
AND
'
if
(
$constraint
);
$constraint
.=
"
${prim_synonym}
.analysis_id =
$an_id
";
return
$constraint
;
}
=head2 store
Arg [1] : list of Bio::EnsEMBL::SeqFeature
...
...
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