Skip to content

Commit

Permalink
Remove dup header from output file
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Jan 28, 2025
1 parent 89cd08c commit 0426a7e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions workflow/rules/metavirs.smk
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,10 @@ rule metaspades:
{output.ktaxlineage} \\
>> {output.kviral_unf}
# Filtered viral taxonomic table
head -1 {output.kviral_unf} \\
> {output.kviral_flt}
awk -F '_' -v OFS='\\t' \\
'{{ if (NR==1) {{print}} else if ($4+0>={params.filter_length}) {{print}} }}' \\
{output.kviral_unf} \\
>> {output.kviral_flt}
> {output.kviral_flt}
# Collapse and aggregate cov/counts at family-level
python3 {params.script} \\
--input {output.kviral_flt} \\
Expand Down Expand Up @@ -925,11 +923,9 @@ rule megahit:
{output.ktaxlineage} \\
>> {output.kviral_unf}
# Filtered viral taxonomic table
head -1 {output.kviral_unf} \\
> {output.kviral_flt}
awk -F '\\t' '{{split($1,a,"="); if (NR==1) {{print}} else if (a[4] >= {params.filter_length}) print $0}}' \\
{output.kviral_unf} \\
>> {output.kviral_flt}
> {output.kviral_flt}
# Collapse and aggregate cov/counts at family-level
python3 {params.script} \\
--input {output.kviral_flt} \\
Expand Down

0 comments on commit 0426a7e

Please sign in to comment.