lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
482 stars 133 forks source link

sortsamrefname stalling at end for hours #83

Closed antmarge closed 7 years ago

antmarge commented 7 years ago

Subject of the issue

sortsamrefname Makes consistent progress but then stalls at "1 minute remaining"

Environment

Steps to reproduce

input=/abs/path/to/bamfile.bam (is a valid bam file as verified by samtools) output=/abs/path/to/bamfile.sorted.bam SORT_SAM_REFNAME=/abs/path/to/bin/jvarkit/dist/sortsamrefname.jar

Run java -jar $SORT_SAM_REFNAME $input -o $output

Stalled output

Makes consistent progress for the first 45 minutes, then stalls at last chromosome, at "1 minute remaining" for hours [INFO][SAMSequenceDictionaryProgress]Count: 803650002 Elapsed: 45 minutes(96.82%) Remains: 1 minute(3.18%) Last: 21:41150167

antmarge commented 7 years ago

Update: It finished at about 3 hours, Staying on the last step for over 2 hours. Any idea as to why this is the case?

lindenb commented 7 years ago

no idea, could be a memory problem or too many files open or no more space on device ? isn't there an error message ? Try to increase the jvm memory with xmx or maxRecordsInRam(http://lindenb.github.io/jvarkit/SortSamRefName.html)

java -Xmx3g -jar sortsamrefname --maxRecordsInRam 1000000 --tmpDir . -o out.bam in.bam

lindenb commented 7 years ago

It finished at about 3 hours

does that mean that it ends with success or with failure ?

antmarge commented 7 years ago

Finished with success.

lindenb commented 7 years ago

Any idea as to why this is the case?

the progress bar stops after all the reads have been loaded in the temporary directory. At this point, the program looks over all the temporary files and starts writing...