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
481378f8
Commit
481378f8
authored
19 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
more checks done now on the mapping files
parent
4e94d2ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+66
-10
66 additions, 10 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
with
66 additions
and
10 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+
66
−
10
View file @
481378f8
...
@@ -879,6 +879,9 @@ sub parse_mappings {
...
@@ -879,6 +879,9 @@ sub parse_mappings {
# Note %object_xref_mappings is global
# Note %object_xref_mappings is global
my
@dna_check
=
();
my
@pep_check
=
();
foreach
my
$file
(
glob
("
$dir
/*.map
"))
{
foreach
my
$file
(
glob
("
$dir
/*.map
"))
{
#print "Parsing results from " . basename($file) . "\n";
#print "Parsing results from " . basename($file) . "\n";
...
@@ -886,10 +889,20 @@ sub parse_mappings {
...
@@ -886,10 +889,20 @@ sub parse_mappings {
$total_files
++
;
$total_files
++
;
# files are named Method_(dna|peptide)_N.map
# files are named Method_(dna|peptide)_N.map
my
$type
=
get_ensembl_object_type
(
$file
);
# my $type = get_ensembl_object_type($file);
#
my
$method
=
get_method
(
$file
);
# my $method = get_method($file);
my
(
$method
,
$type
,
$part
)
=
get_parts
(
$file
);
if
(
$type
=~
'
Translation
'){
$pep_check
[
$part
]
=
$part
;
}
elsif
(
$type
=~
'
Transcript
'){
$dna_check
[
$part
]
=
$part
;
}
else
{
die
"
unknown type
$type
\n
";
}
# get or create the appropriate analysis ID
# get or create the appropriate analysis ID
# XXX restore when using writeable database
# XXX restore when using writeable database
my
$analysis_id
=
$self
->
get_analysis_id
(
$type
);
my
$analysis_id
=
$self
->
get_analysis_id
(
$type
);
...
@@ -950,12 +963,31 @@ sub parse_mappings {
...
@@ -950,12 +963,31 @@ sub parse_mappings {
print
"
Read
$total_lines
lines from
$total_files
exonerate output files
\n
";
print
"
Read
$total_lines
lines from
$total_files
exonerate output files
\n
";
if
(
!
defined
(
$self
->
use_existing_mappings
())
if
(
$self
->
jobcount
()
!=
$total_files
){
and
$self
->
jobcount
()
!=
$total_files
){
print
$dna_check
[
-
1
]
.
"
dna map files
\n
";
print
"
There should be
"
.
$self
->
jobcount
()
.
"
files. Please check
\n
";
print
$pep_check
[
-
1
]
.
"
peptide map files
\n
";
print
"
As this is the number of jobs submitted
\n
";
my
$test_failed
=
0
;
die
"
There should be
"
.
$self
->
jobcount
()
.
"
files. Please check
\n
";
for
(
my
$i
=
1
;
$i
<
$dna_check
[
-
1
];
$i
++
){
}
if
(
$dna_check
[
$i
]
!=
$i
){
print
"
DNA
$i
file not found
\n
";
$test_failed
=
1
;
}
}
for
(
my
$i
=
1
;
$i
<
$pep_check
[
-
1
];
$i
++
){
if
(
$pep_check
[
$i
]
!=
$i
){
print
"
PEPTIDE
$i
file not found
\n
";
$test_failed
=
1
;
}
}
if
(
$test_failed
){
die
"
Missing Files aborting run
\n
";
}
if
(
!
defined
(
$self
->
use_existing_mappings
())){
print
"
There should be
"
.
$self
->
jobcount
()
.
"
files. Please check
\n
";
print
"
As this is the number of jobs submitted
\n
";
die
"
There should be
"
.
$self
->
jobcount
()
.
"
files. Please check
\n
";
}
}
# write relevant xrefs to file
# write relevant xrefs to file
$max_object_xref_id
=
$self
->
dump_core_xrefs
(
\
%primary_xref_ids
,
$object_xref_id
+
1
,
$xref_id_offset
,
$object_xref_id_offset
,
\
%ensembl_object_types
);
$max_object_xref_id
=
$self
->
dump_core_xrefs
(
\
%primary_xref_ids
,
$object_xref_id
+
1
,
$xref_id_offset
,
$object_xref_id_offset
,
\
%ensembl_object_types
);
...
@@ -1325,6 +1357,30 @@ sub get_ensembl_object_type {
...
@@ -1325,6 +1357,30 @@ sub get_ensembl_object_type {
}
}
sub
get_parts
{
my
$filename
=
shift
;
$filename
=
basename
(
$filename
);
my
(
$method
,
$type
,
$part
)
=
$filename
=~
/^(.*)_(dna|peptide)_(\d+)\.map/
;
if
(
$type
eq
"
dna
"
)
{
$type
=
"
Transcript
";
}
elsif
(
$type
eq
"
peptide
")
{
$type
=
"
Translation
";
}
else
{
print
STDERR
"
Cannot deduce Ensembl object type from filename
$filename
\n
";
}
return
(
$method
,
$type
,
$part
);
}
sub
get_method
{
sub
get_method
{
my
$filename
=
shift
;
my
$filename
=
shift
;
...
...
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