Alignment using bwa mem throws segmentation error
0
0
Entering edit mode
6.5 years ago
shuksi1984 ▴ 60

I am trying to run bwa-mem for human exome for hg38gatkbundle: HG100.1.exome.fastq 1.3G HG100.2.exome.fastq 1.3G

My machine configuration is:

RAM:16GB

HDD: 1TB

OS: Ubuntu 16.04.4 LTS, xenial

CPU: 64bit, 4 core

bwa version: BWA: 0.7.12-r1039

My command is:

 sudo bwa mem -t 2 -M -R '@RG\tID:sample_1\tLB:sample_1\tPL:ILLUMINA\tPM:HISEQ\tSM:sample_1' /data/ngs/references/hg38gatkbundle/Homo_sapiens_assembly38.fasta HG100.1.exome.fastq HG100.2.exome.fastq > HG100_bwamem.sam

The above command is throwing error: segmentation fault (core dumped)

sequencing next-gen software error • 2.5k views
ADD COMMENT
1
Entering edit mode

Use the -v <INT> to get more details.

ADD REPLY
0
Entering edit mode

Hello shuksi1984,

segmentation fault is a very generic error message and makes quite hard to find the real problem. But you are are using sudo. Why? Never do this for running a program that has nothing to do with the system.

So first try running bwa without sudo and let's see what happens.

fin swimmer

ADD REPLY
0
Entering edit mode

Removed "sudo". Still getting error (same error)

ADD REPLY
0
Entering edit mode

Ok, so next thing you should do is updating bwa. 0.7.12 was published 2014. The current version is 0.7.17.

If this doesn't help either try running without the -t parameter.

fin swimmer

ADD REPLY
0
Entering edit mode

Can to tell me steps to update the bwa? I tried updating from the given link and followed the given steps:

tar -xvf bwa-0.7.17.tar.bz2   

 cd bwa-0.7.17

./configure  
 make  
 make install

But got error: ./bash configure not found

If this doesn't help either try running without the -t parameter.

Also, tried with and without -t. But no use.

ADD REPLY
0
Entering edit mode

Hello,

just do make. There is no ./configure nad make install for bwa. When then using this version of bwa make sure you type the complete path to the bwa binary.

ADD REPLY
0
Entering edit mode

Installed bwa -0.7.17. Ran following command:

path/to/bwa-0.7.17/bwa mem -M -R '@RG\tID:sample_1\tLB:sample_1\tPL:ILLUMINA\tPM:HISEQ\tSM:sample_1' /data/ngs/references/hg38gatkbundle/Homo_sapiens_assembly38.fasta HG100.1.exome.fastq HG100.2.exome.fastq > HG100_bwamem.sam

Problem still persists.

ADD REPLY
0
Entering edit mode

As arup suggested please run bwa with -v 4+ for getting debugging informations.

ADD REPLY
0
Entering edit mode

I ran following command

/path/to/bwa-0.7.17/bwa mem -M -R '@RG\tID:sample_1\tLB:sample_1\tPL:ILLUMINA\tPM:HISEQ\tSM:sample_1' /data/ngs/references/hg38gatkbundle/Homo_sapiens_assembly38.fasta HG100.1.exome.fastq HG100.2.exome.fastq > HG100_bwamem.sam -v 4+

This is what I got:

[M::bwa_idx_load_from_disk] read 3171 ALT contigs [M::process] read 10000 sequences (1079584 bp)... Segmentation fault (core dumped)

Can Homo_sapiens_assembly38.fasta be problematic? I checked for other dependencies but could hardly find any problem.

ADD REPLY
0
Entering edit mode

(core dumped) is mostly a memory issue. You should try to increase memory for that analysis.

ADD REPLY
0
Entering edit mode

I ran the command with very small single end fastq file of 4.0K, still getting the same error. Hence belive RAM, HDD, or core is not the problem because bwa is running on other machines with same configuration. I dont understand the root cause. Updating the tool along with java version and samtools also didnt help.

ADD REPLY
0
Entering edit mode

The configuration with other machine may be the same, but what I mean is that you may not have permission to use enough memory for bwa to write. In most case we, lets say, have 16 GB memory but we do not have permission to use all those memory for a program/tool. We need to allocate a memory for bwa to write files. Mostly there are read and write memories in OS. For instance, in graphic user tools in configuration file there is a memory option and we can increase in case the tools need. My advice is to use a pieces of fastq files (the first 20 seqs) to check your program is running correctly when it needs less memory.

ADD REPLY

Login before adding your answer.

Traffic: 1762 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6