How I Learned to Stop Worrying and Love the Shell

Every now and then, I am faced with a problem that I have not faced before and I set out to try to solve it using Bash, preferably as a one-liner. Often, it's more about genomics tools. This page chronicles the tasks I've faced and the code that I wrote to solve them. Some may be short, while some may deserve a longer piece, but all of them helped me learn some new things, and I hope you do too. As I write these, I know that some of them might have more elegant or faster solutions. If you think you know one, please reach out to me!

#2. Converting subsets of a BAM to FASTA/FASTQ using samtools

#1. Repeat (Not PCR duplicate!) reads in BAM files