samtools sort error
0
0
Entering edit mode
3.8 years ago
Morris_Chair ▴ 350

Hello everyone, I am getting an error by sorting sam file to bam files, please attached is the screenshot

enter image description here

this is the code I use

samtools sort pf382wt-bcat.sam > pf382wt-bcat.bam

Failed to open file pf382wt-bcat.sam samtools view: failed to open "pf382wt-bcat.sam" for reading: Exec format error

the ligament was performed with bowtie

Do you guys have any suggestion? thank you

ChIP-Seq • 959 views
ADD COMMENT
0
Entering edit mode

this is the code I use

are you sure ? the error message specify it was about samtools view.

about the error Exec format error. How did you get the samtools executable ? aren't you mixing a program compiled for 32 bits on a 64 bits computer ? (or the other way around...)

ADD REPLY
0
Entering edit mode

Hi Pierre, It doesn't like anything I do with samtools on this files, I don't work on my own computer but I use the workstation of the research institute. All tools are already installed there. To get the executable for samtools, I used bwa with this cmd line

bwa mem hg38.fa -1 R1_001.fastq.gz -2 R2_001.fastq.gz > R.sam

thanks for help

ADD REPLY
1
Entering edit mode

The usage of bwa mem and bowtie2 are different, you'd better refer to the manual of bwa or bowtie2 at first.

ADD REPLY
0
Entering edit mode

Oh I didn't know that the usage was different, I used bwa because I read that is better for alignment of ChIP-seq experiment compared to bowtie2

but then how can I convert this sam file to bam from bwa?

thank you

ADD REPLY
0
Entering edit mode

ok probably I solved, I m doing again the alignment by using this code to get directly the bam file

bwa mem ref.fa read1.fq read2.fq | samtools view -o output.bam

finger crossed.. and thank you :)

ADD REPLY

Login before adding your answer.

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