Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
595d9e36
Commit
595d9e36
authored
Mar 07, 2012
by
Leo Gordon
Browse files
added support for reading compressed files
parent
5cb1771d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
+6
-1
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/FastaFactory.pm
View file @
595d9e36
...
...
@@ -72,7 +72,12 @@ sub fetch_input {
my
$self
=
shift
@_
;
my
$inputfile
=
$self
->
param
('
inputfile
')
||
die
"
'inputfile' is an obligatory parameter
";
my
$input_seqio
=
Bio::
SeqIO
->
new
(
-
file
=>
'
<
'
.
$inputfile
)
||
die
"
Could not open or parse '
$inputfile
', please investigate
";
die
"
Cannot read '
$inputfile
'
"
unless
(
-
r
$inputfile
);
if
(
$inputfile
=~
/\.(?:gz|Z)$/
)
{
$inputfile
=
"
gunzip -c
$inputfile
|
";
}
my
$input_seqio
=
Bio::
SeqIO
->
new
(
-
file
=>
$inputfile
)
||
die
"
Could not open or parse '
$inputfile
', please investigate
";
$self
->
param
('
input_seqio
',
$input_seqio
);
}
...
...
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