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
325dca7e
Commit
325dca7e
authored
20 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
removed hard coded xref database stuff amd added use . for directory if none specified
parent
60450512
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
+20
-19
20 additions, 19 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
with
20 additions
and
19 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+
20
−
19
View file @
325dca7e
...
...
@@ -19,9 +19,9 @@ XrefMapper::BasicMapper
This is the basic mapper routine. It will create the necessary fasta files for
both the xref and ensembl sequences. These will then be matched using exonerate
and the results written to another file.
The xref database is hard coded at the
beginning. By creating a <species>.pm file and inherit
ing
f
ro
m this base class
different matching routines, parameters, data
sets etc can be set.
and the results written to another file.
By creating a <species>.pm file and
inheriting from this base class different match
ing ro
utines, parameters, data
sets etc can be set.
=head1 CONTACT
...
...
@@ -31,17 +31,6 @@ Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk
=cut
#
# Specify xref database here
#
my
$xref_host
=
"
ecs1g
";
my
$xref_port
=
3306
;
my
$xref_database
=
"
ianl_test_xref
";
my
$xref_user
=
"
ensadmin
";
my
$xref_password
=
"
ensembl
";
sub
dump_seqs
{
my
(
$self
,
$xref
)
=
@_
;
$self
->
dump_ensembl
();
...
...
@@ -62,7 +51,14 @@ sub dump_xref{
if
(
!
defined
(
$xref
->
species
())){
$xref
->
species
(
$self
->
species
);
}
if
(
!
defined
(
$xref
->
dir
())){
if
(
defined
(
$self
->
species
)){
$xref
->
species
(
$self
->
species
)
}
else
{
$xref
->
species
("
.
");
}
}
#
# the species specified must be in the database and hence have a species_id
#
...
...
@@ -90,8 +86,8 @@ sub dump_xref{
# Dump out the sequences where the species has an id of species_id
# and the sequence type is 'dna'
#
$self
->
xref_dna_file
(
$
sel
f
->
dir
.
"
/
"
.
$xref
->
species
.
"
_xref_dna.fasta
");
open
(
XDNA
,"
>
"
.
$
sel
f
->
dir
.
"
/
"
.
$xref
->
species
.
"
_xref_dna.fasta
")
||
die
"
Could not open xref_dna.fasta
";
$self
->
xref_dna_file
(
$
xre
f
->
dir
.
"
/
"
.
$xref
->
species
.
"
_xref_dna.fasta
");
open
(
XDNA
,"
>
"
.
$
xre
f
->
dir
.
"
/
"
.
$xref
->
species
.
"
_xref_dna.fasta
")
||
die
"
Could not open xref_dna.fasta
";
my
$sql
=
"
select p.xref_id, p.sequence from primary_xref p, xref x
";
$sql
.=
"
where p.xref_id = x.xref_id and
";
$sql
.=
"
p.sequence_type ='dna' and
";
...
...
@@ -114,8 +110,8 @@ ENDDNA:
# Dump out the sequences where the species has an id of species_id
# and the sequence type is 'peptide'
#
$self
->
xref_protein_file
(
$
sel
f
->
dir
.
"
/
"
.
$self
->
species
.
"
_xref_prot.fasta
");
open
(
XPEP
,"
>
"
.
$
sel
f
->
dir
.
"
/
"
.
$self
->
species
.
"
_xref_prot.fasta
")
||
die
"
Could not open xref_prot.fasta
";
$self
->
xref_protein_file
(
$
xre
f
->
dir
.
"
/
"
.
$self
->
species
.
"
_xref_prot.fasta
");
open
(
XPEP
,"
>
"
.
$
xre
f
->
dir
.
"
/
"
.
$self
->
species
.
"
_xref_prot.fasta
")
||
die
"
Could not open xref_prot.fasta
";
$sql
=
"
select p.xref_id, p.sequence from primary_xref p, xref x
";
$sql
.=
"
where p.xref_id = x.xref_id and
";
$sql
.=
"
p.sequence_type ='peptide' and
";
...
...
@@ -159,6 +155,11 @@ sub fetch_and_dump_seq{
#
# store ensembl dna file name and open it
#
# if no directory set then dump in the current directory.
if
(
!
defined
(
$self
->
dir
())){
$self
->
dir
("
.
");
}
$self
->
ensembl_dna_file
(
$self
->
dir
.
"
/
"
.
$self
->
species
.
"
_dna.fasta
");
open
(
DNA
,"
>
"
.
$self
->
ensembl_dna_file
())
||
die
("
Could not open dna file for writing:
"
.
$self
->
ensembl_dna_file
.
"
\n
");
...
...
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