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
87f8d036
Commit
87f8d036
authored
Mar 11, 2008
by
Patrick Meidl
Browse files
initialise caches to work around a checkpointing issue; store transcripts length
parent
8ed4353f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/Bio/EnsEMBL/IdMapping/Cache.pm
modules/Bio/EnsEMBL/IdMapping/Cache.pm
+9
-1
No files found.
modules/Bio/EnsEMBL/IdMapping/Cache.pm
View file @
87f8d036
...
...
@@ -225,6 +225,13 @@ sub build_cache_from_genes {
throw
("
You must provide a type.
")
unless
$type
;
throw
("
You must provide a listref of genes.
")
unless
(
ref
(
$genes
)
eq
'
ARRAY
');
# initialise cache for the given type.
# this is a workaround for a problem with the checkpointing implementation
# which caused re-dumping of regions without features
foreach
my
$name
(
@
{
$self
->
cache_names
})
{
$self
->
{'
cache
'}
->
{
$name
}
->
{
$type
}
=
{};
}
#my $i = 0;
#my $num_genes = scalar(@$genes);
#my $progress_id = $self->logger->init_progress($num_genes);
...
...
@@ -268,6 +275,7 @@ sub build_cache_from_genes {
$tr
->
start
,
$tr
->
end
,
$tr
->
strand
,
$tr
->
length
,
md5_hex
(
$tr
->
spliced_seq
),
(
$tr
->
is_known
?
1
:
0
),
]);
...
...
@@ -687,7 +695,7 @@ sub write_to_file {
my
$name
=
shift
;
my
$type
=
shift
;
throw
("
You must provide a cache name (e.g. genes_by_id.
")
unless
$name
;
throw
("
You must provide a cache name (e.g. genes_by_id
)
.
")
unless
$name
;
throw
("
You must provide a cache type.
")
unless
$type
;
unless
(
$self
->
{'
cache
'}
->
{
$name
}
->
{
$type
})
{
...
...
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