![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
About samtools sort | Richard.Y | Genomic Resequencing | 1 | 07-04-2013 08:34 AM |
samtools sort | hanshart | Bioinformatics | 4 | 07-01-2013 08:45 AM |
merging bam files with samtools | tahamasoodi | Bioinformatics | 3 | 01-19-2013 12:38 AM |
samtools sort | EBER | Bioinformatics | 1 | 06-08-2012 06:15 PM |
failed when merging the example VCF files using VCFtools | jianfeng.mao | Bioinformatics | 1 | 02-02-2011 06:44 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: China Join Date: Dec 2013
Posts: 8
|
![]()
I was sorting a hug BAM file using
Code:
samtools sort -@ 5 -m 4G <in.bam> <out.prefix> Code:
[bam_sort_core] merging from 630 files... So I checked the temp files and found that I could not simply use samtools merge to merge those temp files 'cos they were not in order What shall I do if I just don't wanna start over again...* |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Location: Walnut Creek, CA Join Date: Jan 2014
Posts: 2,707
|
![]()
FYI, the "-@ 5" and "-m 4G" specify 4GB per thread for 5 threads, so 20GB total. You need to reduce the number of threads or the memory limit if you were trying to stay under 4GB.
|
![]() |
![]() |
![]() |
#3 | |
Junior Member
Location: China Join Date: Dec 2013
Posts: 8
|
![]() Quote:
I just wanna know is there any way to tell samtools to redo the merge( just the merge), 'cos the temp files are already sorted in some way( fast sort? I'm not sure) and I don't want to waste the time to redo the sort. Thank you~ |
|
![]() |
![]() |
![]() |
#4 |
Super Moderator
Location: Walnut Creek, CA Join Date: Jan 2014
Posts: 2,707
|
![]()
No, it probably died sorting the temp files. The split and merge parts are both low-memory, only the sort is high-memory.
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
Location: China Join Date: Dec 2013
Posts: 8
|
![]() Quote:
Code:
[bam_sort_core] merging from 630 files... samtools was killed while doing merging work ... The point is, is there any way to redo the merging only, 'cos sorting was really time consuming... |
|
![]() |
![]() |
![]() |
#6 |
Super Moderator
Location: Walnut Creek, CA Join Date: Jan 2014
Posts: 2,707
|
![]()
I imagine that the merge and sort are done simultaneously. Anyway - if you want results you can trust, of course you can't use temp files from a program that crashed with a nondeterministic out-of-memory error; they could be in any condition.
Note - I could be wrong; I can't remember the order of samtools' sort messages since I always ignore them. But there's no reason for it to need 25GB RAM while merging unless it is sorting at the same time, or writes are being internally buffered; and in either case, the temp files could be corrupt. Last edited by Brian Bushnell; 05-05-2014 at 09:37 PM. |
![]() |
![]() |
![]() |
#7 | |
Junior Member
Location: China Join Date: Dec 2013
Posts: 8
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|