2GB for header job is too small
added LD_LIBRARY_PATH for bamindex command, sort the SAM after extracting using -L, as the original sorted order may not be maintained although the chance is close to zero