Align Individuals to Existing Loci (reference)

If you aready of a reference genome or assembly, you can skip the de Novo steps and do as follows:

  1. Build index of contigs: bwa index final_contigs_300.fasta OR A_model_genome.fasta
    • Files will now end in .amb, .ann, etc.
  2. Using all fastq build a list of the fastq RA and RB files into different columns:
    • ls *RA* | sed "s/\.fastq//g" > bamlistA
    • ls *RB* | sed "s/\.fastq//g" > bamlistB
    • paste bamlist? > bamlist
  3. Obtain the script For example copy cp ~millermr/common/ ./
    • sh bamlist final_contigs_300.fasta
    • It’s taking all fastq files (RA and RB) and aligning to the _300.fasta file (or model genome file)
  4. This should create your final bam files

Node Failures and Missing Bams

Sometimes the nodes fail, and you need to find/re-run scripts for certain files. Best option is to find/sort the files that did work, and then grep against the files that didn’t to make a new list, then re-run script with new list.

  • ls *.flt.bam | sed "s/\.sort\.flt\.bam//g" | grep -f - -v bamlist > bamlist_rerun