added mutate.py and run_mutate.sh to create MSA aligbments for mutant sequences required to generate logoplot from sequence in R

This commit is contained in:
Tanushree Tunstall 2020-09-14 15:17:49 +01:00
parent 3612ef0f2d
commit 09e20cf7b3
2 changed files with 196 additions and 0 deletions

17
scripts/run_mutate.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/bash
#=======================================================================
#https://www.biostars.org/p/336891/
#python Mutate.py -v -o /path/to/output.fasta mutation_map_file.csv input.fasta
#=======================================================================
# make sure there is no new line at the end of the mutation file (snps.csv)
#python3 Mutate.py -v -o /home/tanu/git/Data/pyrazinamide/input/output.fasta mut_map.csv 3pl1.fasta.txt
python3 mutate.py -v -o /home/tanu/git/Data/pyrazinamide/output/pnca_msa.txt /home/tanu/git/Data/pyrazinamide/output/pnca_all_muts_msa.csv /home/tanu/git/Data/pyrazinamide/input/3pl1.fasta.txt
# remove fasta style header lines in the output i.e
# lines beginning with '>' so the file is just the mutated seqs
sed -i '/^>.*$/d' /home/tanu/git/Data/pyrazinamide/output/pnca_msa.txt
printf 'No. of lines after cleaning: '
cat /home/tanu/git/Data/pyrazinamide/output/pnca_msa.txt | wc -l