Hello, Everytime I run my script it shows "bad file descriptor" in terminal. Following is my script. Please help
import os
import subprocess
import shlex
fastq1 = []
fastq2 = []
path = os.listdir('kud')
for files in path:
if '_1' in files:
fastq1.append(files)
if '_2' in files:
fastq2.append(files)
for i,j in zip(fastq1,fastq2):
command = "bowtie2 -x bt2_base -1 i -2 j -S z.sam"
cmd = shlex.split(command)
subprocess.run(cmd,shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE,universal_newlines=True)
Even after string formating, i.e f"(-1 {i} -2 {j})" it is showing problem of "bowtie2-align exited with value 2\n')"
Why do you have parenthesis? Shouldn't look like this?