I did qiime analysis on 6 samples and now I need to run it on my whole data. I prepared the manifest file first-time using python panda dataframe but I do not know how to change the command after the changes I need to do:
- I need to make the forward and reverse sequences in different files
- I need to include the absolute paths of all the files
- I need to change the header into header-absolute-path
Does anyone have experience in Python? last time, I had a colleague who helped me writing the code. below are the previous commands of 6 samples. Thanks
Assign to pandas dataframe
result = DataFrame(columns = ["sample-id", "filename", "direction"])
for idx, filename in enumerate(filenames):
try:
print("Processing", filename)
splitname = filename.split("_")
result.loc[idx, "sample-id"] = splitname[0]
result.loc[idx, "filename"] = filename
result.loc[idx, "direction"] =
"forward" if splitname[3] == "R1" else "Reverse"
except Exception as e:
print(e)