hwlim / BisKit-RNA

BisKit for CCHMC HPC users
0 stars 0 forks source link

Robust handling of sam/bam file #1

Closed hwlim closed 4 months ago

hwlim commented 6 months ago
  1. Temporary files remain after run

    • There are many temporary files left over in the scratch folder including sam and tmp, which need to be cleaned up
    • If there is not clear advantage, any alignment results would better be stored in bam. It can be done simple piping e.g. hisat2-3n ###### | samtools view -b > align.bam
  2. Safer temporary file names

    • Currently, the temporary files are named by simply following the sample name
    • This is not safe because the same name can be used in other datasets
    • Whenever creating temporary files, it is strongly recommended to use random name
    • Please update it. Here is an example in bash environment
>> tmp=`mktemp -p ${TMPDIR}`
>> hisat-3n ......... -S ${tmp}
>> samtools sort ${tmp} -o {output.bam}

This is just an example, sam file better be bam file

cahn20 commented 4 months ago

Addressed in pull request #10