[ensembl-dev] SNP Effect Predictor: Reading input from STDIN doesn't work

Gert Jan Hulselmans gert.hulselmans at student.kuleuven.be
Mon Oct 4 10:50:14 BST 2010


Hi Ensembl developers,

Reading input from STDIN doesn't work for the SNP Effect Predictor script.

$ cat snp_input.txt | ./software/snp_effect_predictor-original.pl -s "drosophila_melanogaster" -o snp-effect.txt
usage: $fh->open(FILENAME [,MODE [,PERMS]]) at ./software/snp_effect_predictor-original.pl line 125

The following patch fixes the issue for me:

================================================================
$ diff -u ./software/snp_effect_predictor.pl ./software/snp_effect_predictor-STDIN-fixed.pl
--- ./software/snp_effect_predictor.pl  2010-08-23 10:39:27.000000000 +0200
+++ ./software/snp_effect_predictor-STDIN-fixed.pl      2010-09-21 14:58:01.452373172 +0200
@@ -122,7 +122,7 @@
 
 # no file specified - try to read data off command line
 else {
-       $in_file_handle->open(<STDIN>);
+       $in_file_handle = 'STDIN';
 }
 
 # define filehandle to write to
================================================================


Kind regards,
Gert Hulselmans



More information about the Dev mailing list