CreateBfastIndex longreads base.sh

From BITS wiki
Jump to: navigation, search

Return to the Bfast page


BFAST is an aligner of short reads to a reference genome. It is know for its astonishingly large indexed genome, which you can create following the script below. Adjust the parameters to suit your case. The hash keys are taken from the article.

#!/bin/bash
# This script creates an index of a genome for bfast with highest accuracity for reads <40bp
# Based on the sets of masks reported in the manuscript of bfast
# Usage: pass the reference genome file in fasta (.brg needs to be in same dir) as an argument
 
genomefile=$1
numThreads=16
 
bfast index -f $genomefile -n $numThreads -A 0 -i 1 -m 111111111111111111111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 2 -m 1111101110111010100101011011111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 3 -m 1011110101101001011000011010001111111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 4 -m 10111001101001100100111101010001011111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 5 -m 11111011011101111011111111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 6 -m 111111100101001000101111101110111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 7 -m 11110101110010100010101101010111111 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 8 -m 111101101011011001100000101101001011101 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 9 -m 111101101000100011010110010110011010011 -w 14
bfast index -f $genomefile -n $numThreads -A 0 -i 10 -m 1111010010110110101110010110111011  -w 14 
 
echo "Done!"