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
dd4fb292
Commit
dd4fb292
authored
Aug 02, 2002
by
Arne Stabenau
Browse files
didnt use dnadb set in db now it does.
So it get sequence for sanger/estgenes (in theory)
parent
4dbd4d41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+17
-8
No files found.
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
dd4fb292
...
...
@@ -71,12 +71,14 @@ sub fetch_by_contig_id_start_end_strand {
$self
->
throw
(
"
Wrong parameters
"
);
}
my
$query
;
if
(
$end
==
-
1
)
{
$
sth
=
$self
->
prepare
(
"
SELECT c.length, SUBSTRING( d.sequence,
$start
)
FROM dna d, contig c
WHERE d.dna_id = c.dna_id
AND c.contig_id =
$contig_id
"
)
;
$
query
=
"
SELECT c.length, SUBSTRING( d.sequence,
$start
)
FROM dna d, contig c
WHERE d.dna_id = c.dna_id
AND c.contig_id =
$contig_id
";
}
else
{
my
$length
=
$end
-
$start
+
1
;
...
...
@@ -84,12 +86,19 @@ sub fetch_by_contig_id_start_end_strand {
$self
->
throw
(
"
Wrong parameters
"
);
}
$
sth
=
$self
->
prepare
(
"
SELECT c.length, SUBSTRING( d.sequence,
$start
,
$length
)
FROM dna d, contig c
WHERE d.dna_id = c.dna_id
AND c.contig_id =
$contig_id
"
)
;
$
query
=
"
SELECT c.length, SUBSTRING( d.sequence,
$start
,
$length
)
FROM dna d, contig c
WHERE d.dna_id = c.dna_id
AND c.contig_id =
$contig_id
";
}
if
(
defined
$self
->
db
()
->
dnadb
()
)
{
$sth
=
$self
->
db
()
->
dnadb
()
->
prepare
(
$query
);
}
else
{
$sth
=
$self
->
prepare
(
$query
);
}
$sth
->
execute
();
if
(
my
$aref
=
$sth
->
fetchrow_arrayref
()
)
{
...
...
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