Reputation: 31
I have a query with regards to exporting library path & include for Platypus variant caller. The htslib it requires and platypus are installed on the server and I don't have sudo permissions to change them.
I am trying the following code to export library & include for running the caller. Am i missing osmething because am not able to execute it?
Code:
#!usr/perl-w
use strict;
use warnings;
`export LIBRARY_PATH=/opt/htslib/lib/`;
`export LD_LIBRARY_PATH=/opt/htslib/lib/`;
`export INCLUDE_PATH=/opt/htslib/include/`;
system ("python /opt/Platypus_0.8.1/Platypus.py callVariants --help");
Any sort of help would be appreciated.
Upvotes: 0
Views: 355
Reputation: 385496
You're setting the env vars of freshly-made shells, not of the Perl process that is to parent python
. For that, you need the following:
$ENV{LIBRARY_PATH} = '/opt/htslib/lib/';
$ENV{LD_LIBRARY_PATH} = '/opt/htslib/lib/';
$ENV{INCLUDE_PATH} = '/opt/htslib/include/';
The last line of your code is better written as follows, since it avoids a needless shell:
system("python", "/opt/Platypus_0.8.1/Platypus.py", "callVariants", "--help");
Upvotes: 2