Error while opening index for file `bam/IS07_picard.bam`. Check that index exists

76 views
Skip to first unread message

alice....@gmail.com

unread,
Aug 31, 2016, 10:12:38 AM8/31/16
to OpEx User Group
Hello,

I'm trying to install our pipeline Opex on my computer.
After the quick install, I check with the script "test_installation.py"

And I obtain this :


================================================================================
Checking OpEx installation ... - Done.
OpEx is not installed correctly.
================================================================================


I search an answer in the log file in  _testinstall, but it is not very informative.

$ cat test_opex_log.txt
31.08.2016 16:54:11 : Pipeline started
31.08.2016 16:54:11 : Mapping reads, converting output to BAM file, sorting and indexing BAM
31.08.2016 16:55:27 : Comparing number of reads in FASTQ and BAM files
31.08.2016 16:55:27 : Duplicate marking
31.08.2016 16:55:30 : Checking coverage
31.08.2016 16:55:31 : Variant calling
31.08.2016 16:55:48 : Variant annotation
31.08.2016 16:55:48 : Creating output txt file
31.08.2016 16:55:48 : test_annotated_calls.vcf does not exist, cannot proceed. OpEx run terminated



I decide to run Opex with one sample. And I get more informations about the error. This is a part of my console with the error.





======================================================================================
CoverView v1.1.0 started running:  2016-08-31 16:03:41.364075

Input, output and settings:
--------------------------------------------------------------------------------------
Configuration file:     /local_data/OPEX/OpEx-1.0.0/CoverView_default.json
Input file name:        bam/IS07_picard.bam
BED file name:          /local_data/Projet_CNO_CNV-SV/CAEN/list_targeted/CASOv6_annotated.bed (482 regions)

Transcript db file:     /local_data/OPEX/OpEx-1.0.0/exome_65_GRCh37.gz

Output formats:         _summary, _regions, _profiles (failed regions), _poor
Output files prefix:    bam/IS07_coverview

Duplicate reads:        Included
Mapping quality cutoff: 20
Base quality cutoff:    10

Region fail parameters: MIN_MINQCOV=15

Multithreading:         4 processes
--------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/local_data/OPEX/OpEx-1.0.0/tools/CoverView-v1.1.0/CoverView.py", line 860, in <module>
    processes.append(SingleJob(threadidx, options, config, startline, endline, names))
  File "/local_data/OPEX/OpEx-1.0.0/tools/CoverView-v1.1.0/CoverView.py", line 37, in __init__
    self.samfile = pysam.Samfile(options.input, "rb")
  File "csamtools.pyx", line 736, in pysam.csamtools.Samfile.__cinit__ (pysam/csamtools.c:8722)
  File "csamtools.pyx", line 907, in pysam.csamtools.Samfile._open (pysam/csamtools.c:10652)
IOError: error while opening index `bam/IS07_picard.bam`

================================================================================
OpEx: Variant calling
================================================================================

2016-08-31 16:03:41,662 - INFO - Beginning variant calling
2016-08-31 16:03:41,662 - INFO - Output will go to bam/IS07_calls.vcf
[bam_index_load] fail to load BAM index.
Traceback (most recent call last):
  File "/local_data/OPEX/OpEx-1.0.0/tools/Platypus-0.1.5/Platypus.py", line 47, in <module>
    possCommands[command](sys.argv[2:])
  File "/local_data/OPEX/OpEx-1.0.0/tools/Platypus-0.1.5/runner.py", line 224, in callVariants
    runVariantCaller(options)
  File "/local_data/OPEX/OpEx-1.0.0/tools/Platypus-0.1.5/runner.py", line 115, in runVariantCaller
    regions = bamfileutils.getRegions(options)
  File "bamfileutils.pyx", line 179, in bamfileutils.getRegions (bamfileutils.c:3176)
  File "samtoolsWrapper.pyx", line 261, in samtoolsWrapper.Samfile.__cinit__ (samtoolsWrapper.c:1249)
  File "samtoolsWrapper.pyx", line 281, in samtoolsWrapper.Samfile._open (samtoolsWrapper.c:2101)
  File "samtoolsWrapper.pyx", line 322, in samtoolsWrapper.Samfile._open (samtoolsWrapper.c:1843)
IOError: Error while opening index for file `bam/IS07_picard.bam`. Check that index exists

================================================================================
OpEx: Variant annotation
================================================================================

OpEx error: bam/IS07_calls.vcf does not exist.
Cannot proceed with this step. OpEx run terminated.

--------------------------------------------------------------------------------
OpEx pipeline version 1.0.0
--------------------------------------------------------------------------------

Bash script has been successfully generated: bam/IS07_opex_pipeline.sh

Running the bam/IS07_opex_pipeline.sh script ...

--------------------------------------------------------------------------------
OpEx pipeline finished.
--------------------------------------------------------------------------------


We can see this error "Error while opening index for file `bam/IS07_picard.bam`. Check that index exists".
I search the index of IS07_picard.bam and there is here (IS07_picard.bai).
I regenerate manually the index with picard and the problem is still here.

Did I miss something ?

Thank you for your help and sorry for my bad english.

alice....@gmail.com

unread,
Aug 31, 2016, 10:17:29 AM8/31/16
to OpEx User Group
I forgot to precise the version of my picard : it's the 2.2.4 version
What is that a problem?

alice....@gmail.com

unread,
Sep 1, 2016, 6:59:29 AM9/1/16
to OpEx User Group
Ok I tried to run manually Platypus, and I have the same error.
I rename the index file. 

cp bam/IS07_picard.bai bam/IS07_picard.bam.bai

and now there is no problem !!

Márton Münz

unread,
Sep 12, 2016, 7:19:30 AM9/12/16
to OpEx User Group
Hello,

Thank you very much for your question and sorry for the delay in our answer!

As the test_installation.py script informed you, your installation of OpEx is incomplete.

You write that you ran 'Quick installation". However, after Quick Installation, running the test_installation.py script you should get the following message:
"Reference genome not yet added to the configuration file. You must have performed Quick or Manual installation.
Please run Full Installation (see Section 3.2 in the Documentation) or add the reference genome manually (Section 7.4)."

Instead, you say you received a different message:
"Checking OpEx installation ... - Done.
OpEx is not installed correctly."

Are you sure you have run Quick Installation and not Full Installation? Or have you modified the configuration file after Quick Installation and before running the test_installation.py script?

Could you please re-install OpEx with the following command and send us the standard output and errors captured in the install_log.txt file?
./install.py -r path/to/reference/genome/file  >> install_log.txt  2>&1

(Or quick installation:
./install.py  >> install_log.txt  2>&1
)

Based on the install_log.txt file we can tell more about what went wrong during installation!

Best wishes,
Márton
Reply all
Reply to author
Forward
0 new messages