I am having a problem with displaying the result of my code despite following the many answers provided here.
How do I get the result of running a python script I wrote. It takes a directory as input from command line and should return the index files of executing bwa index script but I am not getting any output.Here is my code:
def bwaIndex(argv):
input_dir = sys.argv[1]
script = 'bwa index'
for infile in glob.glob(os.path.join(input_dir,"*.fasta")):
if infile.endswith('*.fasta'):
subprocess.call(["script, infile"])
if __name__ == '__main__':
bwaIndex(sys.argv)
I am not sure what I am doing wrong or if I am even right to an extent.