#!/bin/bash #https://www.biostars.org/p/336891/ #python Mutate.py -v -o /path/to/output.fasta mutation_map_file.csv input.fasta # pnca_all_muts_msa_FIXME: This should be formatted like this from python script # change to a cmd script that takes this "prefix" as an input for i in $(cat pnca_all_muts_msa_FIXME.csv); do echo "3PL1,${i}"; done > pnca_copy.txt # 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/pnca_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