Usefull small commands scripts etc
From mn/bio/cees-bioinf
Revision as of 10:51, 9 December 2014 by Alexajo@uio.no (talk | contribs) (Created page with "<div> ==== Quick command to index a bunch of bam files ==== <div><u><span style="font-size: 12px;">Use case:</span></u></div></div> *you have a set of bam files, some (or all)...")
Quick command to index a bunch of bam files
Use case:
- you have a set of bam files, some (or all) of which are not yet indexed
- you want to run 'samtools index' on those that are not yet indexed
- (optional) you would like to run this in parallel
Solution: use the makefile I created for this: /projects/cees/scripts/makefiles/index_all_bams.mk
Usage:
cd path/to/folder/with/bam/files module load samtools make -f /projects/cees/scripts/makefiles/index_all_bams.mk
To run this in parallel, add the '-j' flag and the number of threads to start:
make -j 5 -f /projects/cees/scripts/makefiles/index_all_bams.mk
Author: Lex Nederbragt