Skip to content

Commit

Permalink
kofamscan: TSV output; fix merge_kofamscan_hits.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidealbanese committed Nov 10, 2022
1 parent 63cd12c commit 6adfed8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions bin/merge_kofamscan_hits.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
for input_fn in args.input:
input_bn = os.path.basename(input_fn)
input_id = input_bn.split(args.suffix)[0]
input_df = pd.read_fwf(input_fn, skiprows=[1],
colspecs = [(0, 1), (2, 22), (22, 29), (54, 1024)])
input_df = pd.read_csv(input_fn, delimiter='\t', skiprows=[1])
input_df = input_df[input_df['#'] == '*']
input_df = input_df.groupby(["KO", "KO definition"]) \
[["gene name"]].nunique()
Expand All @@ -27,3 +26,10 @@

compl_df.fillna(0, inplace=True)
compl_df.to_csv('kofamscan_hits.tsv', sep='\t', float_format='%.d')
Footer
© 2022 GitHub, Inc.
Footer navigation
Terms
Privacy
Security

2 changes: 1 addition & 1 deletion modules/kofamscan.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process kofamscan {
script:
"""
exec_annotation \
-f detail \
-f detail-tsv \
--cpu ${task.cpus} \
--tmp-dir tmp \
-o ${id}.hits.txt \
Expand Down

0 comments on commit 6adfed8

Please sign in to comment.