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
c6db8b19
Commit
c6db8b19
authored
16 years ago
by
Daniel Rios
Browse files
Options
Downloads
Patches
Plain Diff
updated translation_attribs to calculate peptide stats in vega and otherfeatures databases
parent
416308b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc-scripts/translation_attribs.pl
+31
-6
31 additions, 6 deletions
misc-scripts/translation_attribs.pl
misc-scripts/translation_attribs_wrapper.pl
+16
-0
16 additions, 0 deletions
misc-scripts/translation_attribs_wrapper.pl
with
47 additions
and
6 deletions
misc-scripts/translation_attribs.pl
+
31
−
6
View file @
c6db8b19
...
...
@@ -153,8 +153,8 @@ elsif(defined ($pattern)){
$sth
->
execute
();
my
$dbs
=
$sth
->
fetchall_arrayref
();
foreach
my
$db_name
(
@
{
$dbs
}){
my
(
$species
)
=
(
$db_name
->
[
0
]
=~
/(^[a-z]+_[a-z]+)_core_\d+/
);
#this is a core database
my
(
$species
)
=
(
$db_name
->
[
0
]
=~
/(^[a-z]+_[a-z]+)_
(
core
|vega|otherfeatures)
_\d+/
);
my
$dba
=
Bio::EnsEMBL::DBSQL::
DBAdaptor
->
new
(
-
host
=>
$host
,
-
user
=>
$user
,
-
pass
=>
$pass
,
...
...
@@ -162,7 +162,20 @@ elsif(defined ($pattern)){
-
group
=>
'
core
',
-
species
=>
$species
,
-
dbname
=>
$db_name
->
[
0
]
);
);
if
(
$db_name
->
[
0
]
=~
/(vega|otherfeatures)/
){
my
$other_dbname
=
$db_name
->
[
0
];
$other_dbname
=~
s/$1/core/
;
#for vega databases, add the core as the dna database
my
$core_db
=
Bio::EnsEMBL::DBSQL::
DBAdaptor
->
new
(
-
host
=>
$host
,
-
user
=>
$user
,
-
pass
=>
$pass
,
-
port
=>
$port
,
-
species
=>
$species
,
-
dbname
=>
$other_dbname
);
$dba
->
dnadb
(
$core_db
);
}
push
@
{
$dbas
},
$dba
;
}
}
...
...
@@ -174,13 +187,24 @@ elsif(defined ($dbname)){
-
port
=>
$port
,
-
dbname
=>
$dbname
);
if
(
$dbname
=~
/(vega|otherfeatures)/
){
my
$other_dbname
=
$dbname
;
$other_dbname
=~
s/$1/core/
;
#for vega databases, add the core as the dna database
my
$core_db
=
Bio::EnsEMBL::DBSQL::
DBAdaptor
->
new
(
-
host
=>
$host
,
-
user
=>
$user
,
-
pass
=>
$pass
,
-
port
=>
$port
,
-
dbname
=>
$other_dbname
);
$dba
->
dnadb
(
$core_db
);
}
push
@
{
$dbas
},
$dba
;
}
else
{
thrown
("
Not entered properly database connection param. Read docs
\n
");
}
my
%attributes
;
#hash containing attributes to be stored and removed from the databse
my
$run_both
=
undef
;
if
(
!
defined
(
$pepstats_only
)
and
!
defined
(
$met_and_stop_only
)){
...
...
@@ -250,7 +274,7 @@ sub get_pepstats {
my
$peptide_seq
;
eval
{
$peptide_seq
=
$translation
->
seq
;
};
eval
{
$peptide_seq
=
$translation
->
seq
};
return
{}
if
(
$@
||
$peptide_seq
=~
m/[BZX]/ig
);
if
(
$peptide_seq
!~
/\n$/
){
$peptide_seq
.=
"
\n
"
}
$peptide_seq
=~
s/\*$//
;
...
...
@@ -291,7 +315,8 @@ sub get_met_and_stop{
my
$peptide_seq
;
eval
{
$peptide_seq
=
$translation
->
seq
;
};
return
{}
if
(
$@
||
$peptide_seq
=~
m/[BZX]/ig
);
# return {} if ($@ || $peptide_seq =~ m/[BZX]/ig);
return
if
(
$@
);
#if there is no translation, return
if
(
$peptide_seq
!~
/\n$/
){
$peptide_seq
.=
"
\n
"
}
#need to get transleatable_seq to find out if there is a stop codon
...
...
This diff is collapsed.
Click to expand it.
misc-scripts/translation_attribs_wrapper.pl
+
16
−
0
View file @
c6db8b19
...
...
@@ -133,3 +133,19 @@ foreach my $pattern (@ranges){
#print $call,"\n";
}
#we now need to run it for the otherfeatures|vega databases, but only the pepstats
$options
.=
"
--pepstats_only
";
my
$vega_db
=
"
.*_vega_
$release
\
_.*
";
$call
=
"
bsub -o /lustre/scratch1/ensembl/dr2/tmp_smallfiles/output_translation_vega.txt -q
$queue
-R
$memory
./translation_attribs.pl -user
$user
-pass
$pass
$options
";
$call
.=
"
--pattern '
"
.
$vega_db
.
"
'
";
system
(
$call
);
#print $call,"\n";
my
$other_db
=
"
.*_otherfeatures_
$release
\
_.*
";
$call
=
"
bsub -o /lustre/scratch1/ensembl/dr2/tmp_smallfiles/output_translation_other.txt -q
$queue
-R
$memory
./translation_attribs.pl -user
$user
-pass
$pass
$options
";
$call
.=
"
--pattern '
"
.
$other_db
.
"
'
";
system
(
$call
);
#print $call,"\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