I'm trying to install Perl in a conda environment. I need Perl 5.18.2 and Bio::DB::Fasta. For this, I'm performing these steps:
Activate the environment:
conda activate name_envInstall perl 5.18.2 (the version that I need):
conda install -c nersc perl.I check the location of perl on my environment using
which perl, which results in/home/sergio/miniconda3/envs/name_env/bin/perl.Open the CPAN shell:
perl -MCPAN -e shellI install the package:
install Bio::DB::Fasta. This correctly install the package: Reading '/home/sergio/.cpan/sources/modules/03modlist.data.gz' DONE Bio::DB::Fasta is up to date (1.7.8).
Now, if I run my perl script, I get this error:
------------- EXCEPTION -------------
MSG: Could not open index file example-transcriptome.fa.index: No such file or directory
STACK Bio::DB::IndexedBase::_open_index /home/sergio/miniconda3/envs/prova/lib/perl5/site_perl/5.22.0/Bio/DB/IndexedBase.pm:666
STACK Bio::DB::IndexedBase::_index_files /home/sergio/miniconda3/envs/prova/lib/perl5/site_perl/5.22.0/Bio/DB/IndexedBase.pm:643
STACK Bio::DB::IndexedBase::index_file /home/sergio/miniconda3/envs/prova/lib/perl5/site_perl/5.22.0/Bio/DB/IndexedBase.pm:484
STACK Bio::DB::IndexedBase::new /home/sergio/miniconda3/envs/prova/lib/perl5/site_perl/5.22.0/Bio/DB/IndexedBase.pm:364
STACK toplevel offline_pausepred.pl:18
-------------------------------------
The fasta index file is in the directory from which I'm running the perl script. It seems that some package does not read correctly the index file. I tried to look for a solution, but without success
Do you have any suggestions?
Thanks a lot!