Last active
January 30, 2019 13:42
-
-
Save idolawoye/069615f51911b1c64d985cf816fa04be to your computer and use it in GitHub Desktop.
BWA mapping of different samples against a reference genome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| total_files=`find -name '*.fastq' | wc -l` | |
| arr=( $(ls *.fastq) ) | |
| echo "mapping started" >> map.log | |
| echo "---------------" >> map.log | |
| for ((i=0; i<$total_files; i+=2)) | |
| { | |
| ref_genome=../ref.gb | |
| sample_name=`echo ${arr[$i]} | awk -F "_" '{print $1}'` | |
| echo "[mapping running for] $sample_name" | |
| printf "\n" | |
| echo "bwa mem -t 12 $ref_genome ${arr[$i]} ${arr[$i+1]} > $sample_name.sam" >> map.log | |
| bwa mem -t 12 A1_denovo_assembly.fasta ${arr[$i]} ${arr[$i+1]} > $sample_name.sam | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment