Finding SAM files in subfolders using find and regex, and convert to BAM format, sort, index within subfolders
Continuing on the previous post, if you want to find all SAM files in subdirectories and convert them to BAM, sort them and index within the subdirectories, use the following code.
Unix find command with -regex option will find all SAM files, make sure to add .* or .*\/ as the find command will find files using their full path.