2
$\begingroup$

I used this command for extracting read counts for almost 60 samples using featureCounts.

featureCounts -a /gencode.v27.primary_assembly.annotation_nochr.gtf -F GTF -p -s 2 -T 8 -o counts.txt sample.sorted.bam

I see many "temp-core-100373-A4BF0116E148.sam-TH00-BK004414.tmp" files like this dumped in my directory. I'm able to delete them only manually. Is there a way to get rid of these tmp files from my directory while using the command?

$\endgroup$
2
$\begingroup$

You shouldn't delete them while featureCounts is running, it's creating read-name-sorted temporary files so it can more easily look at both mates together. Just wait for it to finish running and it will clean up the files itself. Doing so beforehand is liable to cause an error.

$\endgroup$
  • $\begingroup$ Thanks. But will there be any memory problem for those temp files? Asking this cz right now I have only 60 samples, for those samples I removed temp files manually. It didn't clean up even after finishing the job. I have to use featureCounts on at least 900 samples in future. $\endgroup$ – beginner May 7 '18 at 8:33
  • 1
    $\begingroup$ There aren't memory issues involved, though I suppose you could run into temporary space constraints. If featureCounts didn't clean up after itself then I encourage you to check and ensure it didn't encounter an error. I have never had it leave temp files around otherwise. $\endgroup$ – Devon Ryan May 7 '18 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.