Skip to content
Snippets Groups Projects
Commit 04cf3058 authored by Susheel Busi's avatar Susheel Busi
Browse files

updated Snakefile to fix key errors in rule comparison

parent 2578f3d8
No related branches found
No related tags found
1 merge request!78Add zymo workflow
......@@ -238,12 +238,13 @@ rule comparison:
for fname in input.cdhit:
fname_col=os.path.basename(fname).split("__")[0] # column name to be used
fname_pids=[]
with open(input.cdhit,'r') as fi:
with open(fname,'r') as fi:
for ln in fi:
if ln.startswith('>'):
fname_pids.append(re.sub("^>", "", ln.strip().split(" ")[0]))
nam=re.sub("^>", "", ln.strip().split(" ")[0])
fname_pids.append(nam.strip().split("__")[2])
df.loc[fname_pids,fname_col] = True
# save
df.to_csv(output[0], sep='\t', header=0)
\ No newline at end of file
df.to_csv(output[0], sep='\t', header=0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment