West Virginia University Genomics Core Facility

You've got data. We turn it into information

This is how I do some of the standard analyses. I am constantly evaluating and changing my procedures, so this may be out of date. You will want to change file names, directory structure, and such. If running on the HPC, you'll need to wrap the commands in a script to submit. You may (will) have to load modules, and some of the commands may be (are) slightly different on different machines.

File Conversions

Convert sam to sorted bam

samtools view -bS A1.sam | samtools sort - -@ 10 A1
samtools index A1.bam                      (if you want it indexed)

Transform BAM to BED

bamToBed -i map.bam > map.bed

Fastq to fasta

paste - - - - < in.fq | cut -f 1,2 | sed 's/^@/>/' | tr "\t" "\n" > out.fa

For questions, help, or to offer a beer, get in touch with the bioinformatician, Niel Infante