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
acb18be4
Commit
acb18be4
authored
12 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
Die if we had no files
parent
319742e3
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
modules/Bio/EnsEMBL/Pipeline/FASTA/ConcatFiles.pm
+8
-6
8 additions, 6 deletions
modules/Bio/EnsEMBL/Pipeline/FASTA/ConcatFiles.pm
with
8 additions
and
6 deletions
modules/Bio/EnsEMBL/Pipeline/FASTA/ConcatFiles.pm
+
8
−
6
View file @
acb18be4
...
...
@@ -52,7 +52,6 @@ use strict;
use
warnings
;
use
base
qw/Bio::EnsEMBL::Pipeline::FASTA::Base/
;
use
Bio::EnsEMBL::Utils::
Exception
qw/throw/
;
use
File::
Spec
;
sub
param_defaults
{
...
...
@@ -91,14 +90,14 @@ sub run {
if
(
-
f
$target_file
)
{
$self
->
info
("
Target already exists. Removing
");
unlink
$target_file
or
throw
"
Could not remove
$target_file
: $!
";
unlink
$target_file
or
$self
->
throw
(
"
Could not remove
$target_file
: $!
"
)
;
}
$self
->
info
('
Running concat
');
foreach
my
$file
(
@file_list
)
{
$self
->
fine
('
Processing %s
',
$file
);
system
("
cat
$file
>>
$target_file
")
and
throw
sprintf
('
Cannot concat %s into %s. RC %d
',
$file
,
$target_file
,
(
$?
>>
8
));
and
$self
->
throw
(
sprintf
('
Cannot concat %s into %s. RC %d
',
$file
,
$target_file
,
(
$?
>>
8
))
)
;
}
$self
->
info
("
Catted files together
");
...
...
@@ -106,14 +105,17 @@ sub run {
$self
->
param
('
target_file
',
$target_file
);
}
else
{
$self
->
info
("
No files
found
s
o
nothing
to concat
");
$self
->
throw
("
Cannot continue as we
found
n
o
files
to concat
");
}
return
;
}
sub
write_output
{
my
(
$self
)
=
@_
;
$self
->
dataflow_output_id
({
file
=>
$self
->
param
('
target_file
'),
species
=>
$self
->
param
('
species
')
},
1
);
my
$file
=
$self
->
param
('
target_file
');
if
(
$file
)
{
$self
->
dataflow_output_id
({
file
=>
$file
,
species
=>
$self
->
param
('
species
')
},
1
);
}
return
;
}
...
...
@@ -123,7 +125,7 @@ sub get_dna_files {
my
$data_type
=
$self
->
param
('
data_type
');
my
$regex_hash
=
$self
->
param
(
$data_type
);
if
(
!
$regex_hash
)
{
throw
"
We do not have an entry for the data_type
$data_type
in our regex lookup hash. Edit this module
";
$self
->
throw
(
"
We do not have an entry for the data_type
$data_type
in our regex lookup hash. Edit this module
"
)
;
}
my
$regex
=
$regex_hash
->
{
regex
};
my
$filter
=
sub
{
...
...
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