Skip to content

Commit

Permalink
Filter on viral contig length
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulthran committed Oct 19, 2023
1 parent 5ce1491 commit 3049472
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sbx_virus_id.smk
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ rule virsorter:
"envs/virsorter_env.yml"
shell:
"""
virsorter run -w {params.out_dir} -i {input.contigs} -j {threads} all
virsorter run -w {params.out_dir} -i {input.contigs} --min-length 1000 -j {threads} all
"""


Expand Down
6 changes: 6 additions & 0 deletions scripts/filter_virsorter_contigs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from sunbeamlib.parse import parse_fasta, write_fasta

# This does nothing but I'm leaving it in case we want to add custom filtering here later
with open(snakemake.input.contigs) as f_contigs, open(snakemake.output[0], "w") as f_out:
for header_str, seq_str in parse_fasta(f_contigs):
write_fasta((header_str, seq_str), f_out)

0 comments on commit 3049472

Please sign in to comment.