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
5e4ef9cf
Commit
5e4ef9cf
authored
Aug 02, 2012
by
Magali Ruffier
Browse files
constitutive exon analysis added to the pipeline
parent
32ccf1c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
modules/Bio/EnsEMBL/Pipeline/Production/ConstitutiveExons.pm
modules/Bio/EnsEMBL/Pipeline/Production/ConstitutiveExons.pm
+69
-0
No files found.
modules/Bio/EnsEMBL/Pipeline/Production/ConstitutiveExons.pm
0 → 100644
View file @
5e4ef9cf
package
Bio::EnsEMBL::Pipeline::Production::
ConstitutiveExons
;
use
strict
;
use
warnings
;
use
base
qw/Bio::EnsEMBL::Pipeline::Base/
;
use
Bio::EnsEMBL::Utils::
Exception
qw(throw warning)
;
use
Bio::EnsEMBL::Utils::
ConversionSupport
;
use
Bio::EnsEMBL::
DensityType
;
use
Bio::EnsEMBL::
DensityFeature
;
## Default run method
## For a given species, generates the required density features in the core database
sub
run
{
my
(
$self
)
=
@_
;
my
$species
=
$self
->
param
('
species
');
my
$dba
=
Bio::EnsEMBL::
Registry
->
get_DBAdaptor
(
$species
,
'
core
');
my
$helper
=
$dba
->
dbc
()
->
sql_helper
();
my
$ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$species
,
'
core
',
'
Gene
');
my
$slices
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$species
,
'
core
',
'
slice
')
->
fetch_all
('
toplevel
');
my
@gene_dbIDs
=
sort
{
$a
<=>
$b
}
@
{
$ga
->
list_dbIDs
()
};
my
$bin
=
scalar
(
@gene_dbIDs
)
/
1000
;
my
@gene_list
;
for
(
my
$i
=
0
;
$i
<
$bin
;
$i
++
)
{
push
(
@gene_list
,
@
{
$ga
->
fetch_all_by_dbID_list
([
splice
(
@gene_dbIDs
,
0
,
1000
)])
});
}
while
(
my
$gene
=
shift
(
@gene_list
)
){
my
@transcripts
=
@
{
$gene
->
get_all_Transcripts
()
};
my
$transcript_count
=
scalar
(
@transcripts
);
my
%exon_count
;
my
%exon_object
;
foreach
my
$transcript
(
@transcripts
)
{
my
@exons
=
@
{
$transcript
->
get_all_Exons
()
};
while
(
my
$exon
=
shift
(
@exons
)
)
{
my
$key
=
$exon
->
dbID
();
++
$exon_count
{
$key
};
$exon_object
{
$key
}
=
$exon
;
}
}
foreach
my
$exon_key
(
keys
(
%exon_count
)
)
{
my
$exon
=
$exon_object
{
$exon_key
};
my
$is_constitutive
=
$exon
->
is_constitutive
();
if
(
$exon_count
{
$exon_key
}
==
$transcript_count
)
{
if
(
!
$exon
->
is_constitutive
()
)
{
$is_constitutive
=
1
;
}
}
else
{
if
(
$exon_object
{
$exon_key
}
->
is_constitutive
()
)
{
$is_constitutive
=
0
;
}
}
$ga
->
dbc
()
->
sql_helper
()
->
execute_update
(
-
SQL
=>
'
update exon set is_constitutive = ? where exon_id =?
',
-
PARAMS
=>
[
$is_constitutive
,
$exon
->
dbID
()]
);
}
}
}
1
;
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