calculate_memory_for_sort
Calculate available memory for samtools sort function. If there is enough memory, no temp files are created. Enough is defined as at least 1G per CPU.
samtools sort
sort_memory: str or None
String to use directly with -m option in sort, or None.