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
e66cfc9e
Commit
e66cfc9e
authored
23 years ago
by
Arne Stabenau
Browse files
Options
Downloads
Patches
Plain Diff
continued, not running yet, probably not compiling.
parent
fa1c7d0d
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
modules/Bio/EnsEMBL/DBSQL/RawContigAdaptor.pm
+46
-13
46 additions, 13 deletions
modules/Bio/EnsEMBL/DBSQL/RawContigAdaptor.pm
with
46 additions
and
13 deletions
modules/Bio/EnsEMBL/DBSQL/RawContigAdaptor.pm
+
46
−
13
View file @
e66cfc9e
...
...
@@ -134,7 +134,25 @@ sub fetch_by_clone {
}
sub
fetch
{
my
$self
=
shift
;
my
$contig
=
shift
;
my
$dbID
=
$contig
->
dbID
();
my
$sth
=
$self
->
prepare
(
"
SELECT contig_id, name, clone_id, length,
offset, corder, dna_id, international_name
FROM contig
WHERE contig_id =
$dbID
"
);
$sth
->
execute
();
my
$aref
=
$sth
->
fetchrow_arrayref
();
if
(
defined
$aref
)
{
_contig_from_arrayref
(
$contig
,
$aref
);
}
else
{
$self
->
throw
(
"
Couldnt fetch contig, unexpected ..
"
);
}
}
sub
_contig_from_sth
{
...
...
@@ -146,20 +164,9 @@ sub _contig_from_sth {
$sth
->
execute
();
while
(
my
$aref
=
$sth
->
fetchrow_arrayref
()
)
{
my
$contig
=
Bio::EnsEMBL::
RawContig
->
new
(
$aref
->
[
0
],
$self
);
_contig_from_arrayref
(
$contig
,
$aref
);
my
(
$contig_id
,
$name
,
$clone_id
,
$length
,
$offset
,
$corder
,
$dna_id
,
$chromosome_id
,
$international_id
)
=
@$aref
;
# the contig object, how should it work ?
# clone, sequence, chromosome should be lightweight objects attached
# possibly either just dbID or I have a join
my
$dbPrimarySeq
=
Bio::EnsEMBL::
DBPrimary
();
# ?
my
$clone
=
Bio::EnsEMBL::
Clone
->
new
(
-
dbID
=>
$clone_id
);
my
$contig
=
Bio::EnsEMBL::
RawContig
->
new
(
);
push
(
@res
,
$contig
);
}
...
...
@@ -168,4 +175,30 @@ sub _contig_from_sth {
sub
_contig_from_arrayref
{
my
$self
;
my
$contig
;
my
$aref
;
my
(
$contig_id
,
$name
,
$clone_id
,
$length
,
$offset
,
$corder
,
$dna_id
,
$international_name
)
=
@$aref
;
my
$dbPrimarySeq
=
Bio::EnsEMBL::DBSQL::
DBPrimarySeq
->
new
(
$dna_id
,
$self
->
db
()
);
# ?
my
$clone
=
Bio::EnsEMBL::
Clone
->
new
(
$self
,
$clone_id
);
$contig
->
clone
(
$clone
);
$contig
->
sequence
(
$dbPrimarySeq
);
$contig
->
length
(
$length
);
$contig
->
name
(
$name
);
$contig
->
offset
(
$offset
);
$contig
->
corder
(
$corder
);
$contig
->
international_name
(
$international_name
);
}
1
;
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