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
e253c783
Commit
e253c783
authored
19 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
pod added
parent
02a80c53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+72
-9
72 additions, 9 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
with
72 additions
and
9 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+
72
−
9
View file @
e253c783
...
...
@@ -8,6 +8,7 @@ use IPC::Open3;
use
Bio::EnsEMBL::DBSQL::
DBAdaptor
;
use
Bio::EnsEMBL::
Translation
;
use
XrefMapper::
db
;
use
vars
'
@ISA
';
=head1 NAME
...
...
@@ -520,6 +521,17 @@ sub method{
return
$self
->
{
_method
};
}
=head2 core
Arg [1] : (optional)
Example : $mapper->core($new_core);
Description: Getter / Setter for the core.
info for the ensembl core database.
Returntype : XrefMapper::db
Exceptions : none
=cut
sub
core
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -528,6 +540,19 @@ sub core{
return
$self
->
{
_core
};
}
=head2 dumpcheck
Arg [1] : (optional)
Example : $mapper->dumpcheck("yes");
Description: Getter / Setter for dumpcheck.
If set the mapper will not dump fasta files
if they exist already.
Returntype : scalar
Exceptions : none
=cut
sub
dumpcheck
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -536,6 +561,18 @@ sub dumpcheck {
return
$self
->
{
_dumpcheck
};
}
=head2 maxdump
Arg [1] : (optional)
Example : $mapper->maxdump(10);
Description: Getter / Setter for maxdump.
If set the mapper will only dump that number of
sequences into the fasta files. (Mainly used for testing).
Returntype : scalar
Exceptions : none
=cut
sub
maxdump
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -544,6 +581,20 @@ sub maxdump {
return
$self
->
{
_maxdump
};
}
=head2 use_existing_mappings
Arg [1] : (optional)
Example : $mapper->use_existing_mappings("yes");
Description: Getter / Setter for use_existing_mappings.
If set the mapper will not redo the mapping
but parse the existing .map files.
Returntype : scalar
Exceptions : none
=cut
sub
use_existing_mappings
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -552,6 +603,18 @@ sub use_existing_mappings {
return
$self
->
{
_use_existing_mappings
};
}
=head2 xref
Arg [1] : (optional)
Example : $mapper->core($new_core);
Description: Getter / Setter for the core.
info for the xref database.
Returntype : XrefMapper::db
Exceptions : none
=cut
sub
xref
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -560,6 +623,8 @@ sub xref{
return
$self
->
{
_xref
};
}
=head2 run_mapping
Arg[1] : List of lists of (method, query, target)
...
...
@@ -577,7 +642,7 @@ sub run_mapping {
my
(
$self
,
$lists
)
=
@_
;
# delete old output files in target directory if we're going to produce new ones
if
(
!
defined
(
$self
->
use_existing_mappings
))
{
if
(
!
defined
(
$self
->
use_existing_mappings
()
))
{
my
$dir
=
$self
->
core
->
dir
();
unlink
(
<
$dir
/*.map $dir/
*.
out
$dir
/*.
err
>
);
}
...
...
@@ -710,8 +775,6 @@ sub submit_depend_job {
=head2 parse_mappings
Arg[1] : The target file used in the exonerate run. Used to work out the Ensembl object type.
Arg[2] :
Example : none
Description: Parse exonerate output files and build files for loading into target db tables.
Returntype : List of strings
...
...
@@ -791,8 +854,8 @@ sub parse_mappings {
# get or create the appropriate analysis ID
# XXX restore when using writeable database
#
my $analysis_id = $self->get_analysis_id($type);
my
$analysis_id
=
999
;
my
$analysis_id
=
$self
->
get_analysis_id
(
$type
);
#
my $analysis_id = 999;
while
(
<
FILE
>
)
{
...
...
@@ -1105,8 +1168,8 @@ sub get_analysis_id {
my
(
$self
,
$ensembl_type
)
=
@_
;
my
%typeToLogicName
=
(
'
dna
'
=>
'
XrefExonerateDNA
',
'
protei
n
'
=>
'
XrefExonerateProtein
'
);
my
%typeToLogicName
=
(
'
transcript
'
=>
'
XrefExonerateDNA
',
'
translatio
n
'
=>
'
XrefExonerateProtein
'
);
my
$logic_name
=
$typeToLogicName
{
lc
(
$ensembl_type
)};
...
...
@@ -1118,7 +1181,7 @@ sub get_analysis_id {
if
(
my
@row
=
$sth
->
fetchrow_array
())
{
$analysis_id
=
$row
[
0
];
print
"
Found exising analysis ID (
$analysis_id
) for
$logic_name
\n
";
#
print "Found exising analysis ID ($analysis_id) for $logic_name\n";
}
else
{
...
...
@@ -1770,7 +1833,7 @@ sub do_upload {
}
print
"
Setting
$table
display_xrefs from
$file
\n
";
my
$str
=
"
mysql -u
"
.
$core_db
->
user
()
.
"
-p
"
.
$core_db
->
password
()
.
"
-h
"
.
$core_db
->
host
()
.
"
-P
"
.
$core_db
->
port
()
.
"
"
.
$core_db
->
dbname
()
.
"
<
$file
";
my
$str
=
"
mysql -u
"
.
$core_db
->
user
name
()
.
"
-p
"
.
$core_db
->
password
()
.
"
-h
"
.
$core_db
->
host
()
.
"
-P
"
.
$core_db
->
port
()
.
"
"
.
$core_db
->
dbname
()
.
"
<
$file
";
system
$str
;
#$sth = $core_db->prepare("UPDATE $table SET display_xref_id=? WHERE ${table}_id=?");
...
...
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