Question: samtools sort doesn't finish sorting bam file, just hangs for hours
0
gravatar for dec986
18 months ago by
dec986210
United States
dec986210 wrote:

I am trying to sort a bam file, which is 4.1 GB in size using simply samtools sort -o sorted.bam start.bam, but the file hangs after about 6.5 hours when the sorted file is 3.1 GB, no warning messages or anything. None of the temp files have been deleted either. I don't think the computer ran out of RAM. This has happened on my second attempt.

Why can't I sort this bam file? How can I get the sort to finish?

samtools • 721 views
ADD COMMENTlink written 18 months ago by dec986210
1

Very odd. Command seems fine. If you want to try a different tool use sambamba.

ADD REPLYlink written 18 months ago by Jeffin Rockey1.1k

Use top to see if the process is still running.

ADD REPLYlink written 18 months ago by ATpoint34k

I don't think the computer ran out of RAM.

How much RAM do you have?

ADD REPLYlink written 18 months ago by genomax83k
3
gravatar for lakhujanivijay
18 months ago by
lakhujanivijay5.0k
India
lakhujanivijay5.0k wrote:

Check 1 : is your BAM file okay? see below link

How to systematically check if a bam file is truncated

Check 2 : do you have enough space on disk ?

df -h
ADD COMMENTlink written 18 months ago by lakhujanivijay5.0k

indeed, the issue was disk space, silly me. It would have been nice had samtools provided an error, however, the temp files used more space than I anticipated.

ADD REPLYlink written 18 months ago by dec986210

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.
Upvote|Bookmark|Accept

ADD REPLYlink written 18 months ago by WouterDeCoster43k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2164 users visited in the last hour