Error in BWA-MEM running in linux
0
0
Entering edit mode
6.4 years ago
modarzi ▴ 170

hi,

my data set belong to human. I construct bwa index(wg.fa) and for alignment I run below command:

bwa mem  ~/cirRNA/apps/wg.fa   sra_data_SRR1427482.fastq -t 30 > sra_data_SRR1427482_bwa.sam

and then in terminal I have below result:

[M::bwa_idx_load_from_disk] read 0 ALT contigs

[M::process] read 8646532 sequences (300000008 bp)...

but after some minutes, my process will be killed.

I also, ran this command for one other sample and receive below message:

[M::bwa_idx_load_from_disk] read 0 ALT contigs

Segmentation fault (core dumped)

I appreciate if you share your comment with me.

Best Regards,

Mohammad

RNA-Seq BWA-MEM alignment • 6.4k views
ADD COMMENT
2
Entering edit mode

I see that you tagged rna-seq. If that's the case then bwa is not an appropriate aligner and you need a splice aware aligner such as HISAT2 or STAR

ADD REPLY
0
Entering edit mode

ok, I am align with you. I used HISAT2 for alignment but I need SAM file for another tool(CIRI2). That tool accept SAM file that generate with bwa-mem. based on your comment, is RNA-seq alignment is impossible via bwa? I am looking forward to your comment.

Best Regards, Mohammad

ADD REPLY
0
Entering edit mode

RNA, in eukaryotes, has splicing. bwa-mem does not perform spliced alignment. bwa mem might still map reads from RNA-seq, but not across splice junctions, so it's generally not what you want.

But CIRI2 explicitly recommends BWA mem (with argument -T 19). That's a bit odd, but it might be specifically adapted to bwa mem output. I don know.

The manual also writes:

CIRI detected circRNAs from transcriptome data by processing SAM file generated by BWA-MEM tool, which is a split mapping algorithm (http://bio-bwa.sourceforge.net/bwa.shtml).

I don't think it is the optimal tool for this... but it might work.

Would be interesting to do the alignment as well with e.g. STAR and compare.

ADD REPLY
1
Entering edit mode

Hi, How many RAM do you have to run bwa ? Try to extract, let's say, 10000 reads and try again.

Segmentation fault (core dumped)

This is a generic error, take a look at the log file, you could find some hints about the error.

bwa mem seq and Segmentation fault (core dumped)

ADD REPLY
0
Entering edit mode

I had the same error. Did you try uprgrading BWA ?

ADD REPLY
0
Entering edit mode

No.

my version is 0.7.12-r1039. should I upgrade it?

my OS is Linux(ubuntu) and I install it based on bellow command:

sudo apt-get install bwa

I appreciate if you share your comment me.

Best Regards,

Mohammad

ADD REPLY
1
Entering edit mode

As mentioned, this is a generic error but usually relates to RAM / memory. How much RAM have you got and to which genome are you re-aligning your reads?

Also, why are you using such a high thread number (30)? - do you even have that number available?

ADD REPLY
0
Entering edit mode

My server has 8 GB RAM capacity.

I see this command in related forum. I don't know optimum value of it. do you have better recommendation? I am looking forward to your answer.

Best Regards, Mohammad

ADD REPLY
1
Entering edit mode

That may be just on the border of what is needed. Can you also just try to reduce the value that you're passing to -t? 30 seems way too high for me. Just try 2-4 and see if it even executes properly and remains stable processing the data.

See also the comment by Genomax.

ADD REPLY
0
Entering edit mode

Thanks, I set it as 4 and it seems ok. Now I get below process:

[M::bwa_idx_load_from_disk] read 0 ALT contigs

[M::process] read 1143936 sequences (40000015 bp)...

[M::process] read 1146814 sequences (40000041 bp)... [M::mem_process_seqs] Processed 1143936 reads in 176.085 CPU sec, 43.765 real sec

[M::process] read 1134492 sequences (40000052 bp)... [M::mem_process_seqs] Processed 1146814 reads in 179.040 CPU sec, 44.192 real sec

[M::process] read 1132574 sequences (40000027 bp)... [M::mem_process_seqs] Processed 1134492 reads in 179.598 CPU sec, 43.955 real sec

[M::process] read 1134434 sequences (40000066 bp)... [M::mem_process_seqs] Processed 1132574 reads in 184.967 CPU sec, 45.691 real sec

[M::process] read 1139764 sequences (40000027 bp)... [M::mem_process_seqs] Processed 1134434 reads in 184.097 CPU sec, 45.477 real sec

[M::process] read 1131274 sequences (40000057 bp)... [M::mem_process_seqs] Processed 1139764 reads in 183.103 CPU sec, 45.200 real sec

and finlay below message:

[main] Version: 0.7.12-r1039

[main] CMD: bwa mem -t 4 /home/cli-sim01/cirRNA/apps/wg.fa sra_data_SRR1427483.fastq

[main] Real time: 1928.164 sec; CPU: 7767.544 sec

now the process was finished.

based on your experience,is it ok?

ADD REPLY
1
Entering edit mode

With 8 G RAM I am going to suggest that you use only a single core. -t 1.

Note: As long as the alignment is working leave it alone.

ADD REPLY
0
Entering edit mode

Thanks, I run it by -t 4. is it difference between -t 1 and 4 output?

ADD REPLY
1
Entering edit mode

It's the number of computer threads (roughly processors I guess) which are used.

You can take a look using htop

ADD REPLY
1
Entering edit mode

bwa is possibly the lightest memory requirement NGS aligner. I recall that it needs about 6-7 GB of free RAM for human genome. You need to have at least that much RAM free.

ADD REPLY

Login before adding your answer.

Traffic: 1227 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