Perl script does not find the fasta index file (STACK Bio::DB::IndexedBase)

Viewed 73

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:

  1. Activate the environment: conda activate name_env

  2. Install perl 5.18.2 (the version that I need): conda install -c nersc perl.

  3. I check the location of perl on my environment using which perl, which results in /home/sergio/miniconda3/envs/name_env/bin/perl.

  4. Open the CPAN shell: perl -MCPAN -e shell

  5. I 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!

0 Answers
Related