I would reverse the order of the last two arguments to samtools sort, and use the -o flag to specify the output file name. Thus,

   samtools view -bS SMDC-1_aln-pe.sam | samtools sort -m 30000000000 -o 
SMDC-1_sorted  -

Can't help with samtools view not finding "SMDC-1_aln-pe.sam". That's probably a typing error or a directory path issue. Could be a permissions problem, but that's most unlikely.

                                                -  tom blackwell  -

On Thu, 11 Jun 2015, ???? Fang Liu wrote:


Dear all,
I just started analyzing my RNA-seq results,
first, I used command

bwa mem -t 20 transmycale95300.fasta SMDC-1_R1_shortReadRemoved.fq 
SMDC-1_R2_shortReadRemoved.fq > SMDC-1_aln-pe.sam

to generate sam files for downstream analysis. But then when I ran samtools, it 
says there???s something wrong with my sam file.

samtools view -bS SMDC-1_aln-pe.sam | samtools sort -m 30000000000 - 
SMDC-1_sorted
[bam_header_read] EOF marker is absent. The input is probably truncated.
[main_samview] fail to open "SMDC-1_aln-pe.sam" for reading.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)

Can anyone tell me how to solve this? Many thanks!

Kind. Fang
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to