Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Samtools index error when running Preprocessing on GenomeStrip Release

JojoTanJojoTan SingaporeMember
edited July 2015 in GenomeSTRiP


I am running GenomeStrip Release

I did the installtest run and everything works fine.

Currently, I am working on 17 WGS bam files and I am constantly getting the following error.
Error: samtools index /mnt/projects/tanhjj99/drug_response/svtoolkit/installtest/TEST/metadata/headers.bam

I ran this line of command and it works without error.

This is the command which I used to run the preprocessing:


java -cp ${classpath} ${mx}
\ org.broadinstitute.gatk.queue.QCommandLine
\ -S ${SV_DIR}/qscript/SVPreprocess.q
\ -S ${SV_DIR}/qscript/SVQScript.q
\ -gatk ${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar
\ -cp ${classpath}
\ -configFile ${confile}
\ -tempDir ${SV_TMPDIR}
\ -R ${refgenome}
\ -genomeMaskFile ${processingdatapath}/human_g1k_v37.mask.100.fasta
\ -copyNumberMaskFile ${processingdatapath}/cn2_mask_g1k_v37.fasta
\ -genderMapFile ${currentpath}/bamfilegendermap.txt
\ -ploidyMapFile ${processingdatapath}/humgen_g1k_v37_ploidy.map
\ -runDirectory ${runDir}
\ -md ${runDir}/metadata
\ -useMultiStep
\ -reduceInsertSizeDistributions true
\ -computeGCProfiles true
\ -computeReadCounts true
\ -jobLogDir ${runDir}/logs
\ -I SEQUENCINGbamfile.list
\ -run

What should I do to solve this problem?

Thank you very much.

Best regards,


  • bhandsakerbhandsaker Member, Broadie, Moderator admin

    And if you run
    samtools index /mnt/projects/tanhjj99/drug_response/svtoolkit/installtest/TEST/metadata/headers.bam
    from the command line?
    And does it return a zero exit status?

  • JojoTanJojoTan SingaporeMember

    I ran this line from the command line and it executes perfectly.

    There was no error.

  • bhandsakerbhandsaker Member, Broadie, Moderator admin

    It's hard to say without more context or more of an error message. Assuming you are running on a compute cluster, perhaps the execution environment on the cluster node is slightly different than when you run the command interactively.

  • JojoTanJojoTan SingaporeMember

    I tried to run it on both a cluster node and interactively and the error appears.

    Despite the error, the program is able to continue running the downstream of Preprocessing without throwing other errors.

    Will this error affect the output of the preprocess pipeline?

  • bhandsakerbhandsaker Member, Broadie, Moderator admin

    As long you as you created a bam index, you will certainly be fine.
    The bam index may not even be required, but it is better to have it there just in case.

  • zengjyzengjy ChinaMember

    Hi, i am trying to do SV calling using Genome STRiP release 2.00.2665.

    I did the installtest run and everything works fine.

    Whatever I worked on a single bam file or a set of bam files, I am constantly getting the following error:
    ERROR 11:59:05,289 FunctionEdge - Error: samtools index /p200/pmod_group/zengjingyao/Genome_STRiP/test3/test1/metadata/headers.bam
    ERROR 11:59:05,311 FunctionEdge - Contents of /p200/pmod_group/zengjingyao/Genome_STRiP/test3/test1/logs/SVPreprocess-3.out:

    Therefore, i compared my bam files to the installtest.bam, and i found that the header of installtest.bam has muptiple @RG while my bam files just hava uniq @RG in the header per file. Is this the reason for the error? Is the installtest.bam the result of merging multiple raw bam files?

    In addtion, can i use truncated bam files to run Genome STRiP?

Sign In or Register to comment.