This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools sort error

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

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...)

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

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

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

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 :)

0 answers

No answers yet.

Log in to answer this question.