Dear everyone,
I try to convert some SAM files to BAM files following the Samtools FAQ method :
First indexing my reference fasta file (I have no header in my SAM file) :
Then converting my SAM file to BAM file :
Until here, everything seems fine, but...
When trying to sort my BAM file :
I instantly get :
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_sort_core] truncated file. Continue anyway.
Seegmentation fault (core dumped)
The problem seems to be in the SAM-->BAM conversion... My SAM file seems OK (obtained with the Illumina script : illumina_export2sam.pl). It only contains one "@PG" line at its beginning, that's why I followed the Samtools FAQ method.
I've already once done that on another data and everything went fine...So I really don't understand what is happening now.
Could someone tell me what is wrong ?
I'd be very grateful if someone could help me !!!
Best regards,
Marine
I try to convert some SAM files to BAM files following the Samtools FAQ method :
First indexing my reference fasta file (I have no header in my SAM file) :
Code:
samtools faidx ref.fa
Code:
samtools view -bt ref.fa.fai aln.sam > aln.bam
When trying to sort my BAM file :
Code:
samtools sort aln.bam aln-sorted
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_sort_core] truncated file. Continue anyway.
Seegmentation fault (core dumped)
The problem seems to be in the SAM-->BAM conversion... My SAM file seems OK (obtained with the Illumina script : illumina_export2sam.pl). It only contains one "@PG" line at its beginning, that's why I followed the Samtools FAQ method.
I've already once done that on another data and everything went fine...So I really don't understand what is happening now.
Could someone tell me what is wrong ?
I'd be very grateful if someone could help me !!!
Best regards,
Marine
Comment