TheJacksonLaboratory/Picky

Can't locate hashFastq.pm in @INC if using symlink

Opened this issue · 0 comments

Hi,

I downloaded the latest release from GitHub and unpacked the tar.gz. I've put a symlink to picky.pl in my $PATH

When executing

picky.pl script --fastq myfile.fastq --thread 16 > LongRead.sh

I get:

Can't locate hashFastq.pm in @INC (@INC contains: $HOME/bin /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at $HOME/bin/picky.pl line 24.
BEGIN failed--compilation aborted at $HOME/bin/picky.pl line 24.

(I have changed some paths to $HOME for simplicity)

This is inconvenient. I don't want to place everything in my $PATH, I don't want to use the full path every time I use Picky. I guess I could write a bash alias for this. I'm not sufficiently familiar with Perl to know how to fix this directly.

However, when using the full path to the picky.pl script

$HOME/bin/Picky-0.2.a/src/picky.pl script --fastq myreads.fastq --thread 16 > LongRead.sh

It does work.

Now, I don't think issues are going to be over here, because the script LongRead.sh contains:

# general installation
export LASTAL=last-755/src/lastal
export PICKY=./picky.pl
...

Note that it contains here ./picky.pl, which is going to throw the same error as above.
For my system, potentially portable, the following would solve this:

export PICKY=$(readlink -f $(which picky.pl))

I don't understand why you use a perl script to generate a bash script, and then the bash script to execute LAST and Picky. Why not have the perl script execute LAST directly? It's also not particularly convenient that we have to modify the bash script to suit our installation (lastdb, fasta, last executable). But there are probably design considerations here I'm not aware of...

Cheers,
Wouter