Many thanks actually applying your suggestion worked when I tried to apply it on a single file but when I tried to put it in a loop to convert all files at once I got an error,
rootdir = '/home/phoebemagdy/workdir/PhD/1st_PhD_Trial_Code/Ecto_Data/'
fastq_extension = ".fastq"
for file in os.listdir(rootdir):
if file.endswith(fastq_extension): # check for ".fastq" extension
#print(file)
!seqkit fq2fa file -o file.fa
Any suggestions for the loop to work properly..??
Many thanks in advance