Thanks Bob for the info.
A bit of distraction from samtools bug, I like to mention the reason I wanted 
to use sorting here is to allow conversion of bam with paired end reads to 
fastq. 

I wonder if it would lead to misleading fastq outpur if I convert bam to fastq 
without sorting the reads ?

Thanks Collins for ur suggestion of novosort.


> Subject: Re: [Samtools-help] [bam_sort_core] truncated file. Continue anyway
> From: [email protected]
> Date: Fri, 19 Sep 2014 22:37:40 -0400
> CC: [email protected]
> To: [email protected]
> 
> As I recall, there's some condition that the decompression library 
> incorrectly decides means there's something wrong with the input file, and it 
> returns a value that the calling routine can't distinguish from an end of 
> file.  The calling routine then reports that the file is truncated but 
> continues to try to read the rest of the file, and might be successful.
> 
> I believe I reported this a few months back but I really got no response from 
> the samtools folks.  I think/guess the basic problem is that the 
> decompression library doesn't originate with this project, so there's 
> resistance to making any changes to it.  The change I suggested at the time 
> *looked* simple enough, but it would involve a change to how that library 
> reports errors.
> 
> All that may have nothing to do with why your file isn't being sorted though.
> 
> Bob H
> 
> 
> On Sep 19, 2014, at 8:04 PM, Vickie S  wrote:
> 
>> Hi 
>> I am trying to sort the bam file by using the sort command:  
>> samtools sort -n aln.bam aln.qsort
>> [W::sam_hdr_read] bgzf_check_EOF: Value too large for defined data type
>> [bam_sort_core] truncated file. Continue anyway.
>> 
>> I am not sure if "continue anyway" means it continues to sort or just 
>> aborts. 
>> I checked the file size. 
>> $ du -hs *
>> 113G    aln.bam
>> 8.4M    aln.bam.bai
>> 28K    aln.qsort.bam
>> 
>> So it does not seem like file is sorted. I have checked one previous thread 
>> about this bug but could not find any solution. Anyone comments ? Suggestion 
>> for any other tool ?
>> 
>> Thanks
>>                                        
>> ------------------------------------------------------------------------------
>> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Samtools-help mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/samtools-help
>> 
> 
                                          
------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to