Skip to content

Commit

Permalink
Merge pull request #12 from beardymcjohnface/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
beardymcjohnface authored Aug 30, 2023
2 parents fad39df + 5baec6b commit e26953e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_data_files():
"snakemake>=7.14.0",
"pyyaml>=6.0",
"Click>=8.1.3",
"metasnek>=0.0.7",
"metasnek>=0.0.8",
],
entry_points={
"console_scripts": [
Expand Down
12 changes: 6 additions & 6 deletions tests/test_trimnami.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def test_trimnami_cli(tmp_dir):
def test_trimnami_commands(tmp_dir):
exec_command("trimnami test --threads 1 -n prinseq fastp roundAB notrim filtlong cutadapt")
exec_command("trimnami test --threads 1 -n --fastqc")
exec_command("trimnami test --threads 1 -n --subsample 1k")
exec_command("trimnami test --threads 1 -n --subsample 1k --fastqc")
exec_command("trimnami test --threads 1 -n --subsample")
exec_command("trimnami test --threads 1 -n --subsample --fastqc")
exec_command("trimnami testhost --threads 1 -n prinseq fastp roundAB notrim filtlong cutadapt")
exec_command("trimnami testhost --threads 1 -n --fastqc")
exec_command("trimnami testhost --threads 1 -n --subsample 1k")
exec_command("trimnami testhost --threads 1 -n --subsample 1k --fastqc")
exec_command("trimnami testhost --threads 1 -n --subsample")
exec_command("trimnami testhost --threads 1 -n --subsample --fastqc")
exec_command("trimnami testnp --threads 1 -n")
exec_command("trimnami testnp --threads 1 -n --subsample 1k")
exec_command("trimnami testnp --threads 1 -n --subsample")
exec_command("trimnami testnp --threads 1 -n --fastqc")
exec_command("trimnami testnp --threads 1 -n --subsample 1k --fastqc")
exec_command("trimnami testnp --threads 1 -n --subsample --fastqc")
exec_command("trimnami config")
exec_command("trimnami citation")
4 changes: 2 additions & 2 deletions trimnami/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def common_options(func):
show_default=True,
),
click.option(
"--subsample",
"--subsample/--no-subsample",
default=None,
help="Subsample reads to this many bases with rasusa, e.g. 1000, 1m, 1g, 1t",
help="Perform subsampling (set in config)",
show_default=False,
),
click.option(
Expand Down
2 changes: 2 additions & 0 deletions trimnami/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ trimnami:
-F 3584
cutadapt:
-m 40
subsample:
--bases 1g
fastp:
--qualified_quality_phred 15
--length_required 90
Expand Down
2 changes: 1 addition & 1 deletion trimnami/trimnami.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
2 changes: 1 addition & 1 deletion trimnami/workflow/rules/preflight.smk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if config["args"]["host"] is not None:
)[0] + ".idx"
)

if config["args"]["subsample"] is not None:
if config["args"]["subsample"]:
config["args"]["subsampleStr"] = ".subsampled"

if config["args"]["fasta"]:
Expand Down
4 changes: 2 additions & 2 deletions trimnami/workflow/rules/rasusa.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rule rasusa:
conda:
os.path.join(dir["env"], "rasusa.yaml")
params:
bases=lambda wildcards: config["args"]["subsample"] if config["args"]["subsample"] else ""
bases=config["qc"]["subsample"]
benchmark:
os.path.join(dir["bench"], "rasusa_single.{dir}.{file}.txt")
log:
Expand All @@ -23,7 +23,7 @@ rule rasusa:
"-i {input} "
"-o {output} "
"-O g "
"--bases {params.bases} "
"{params.bases} "
"2> {log}; "
"else "
"touch {output}; "
Expand Down

0 comments on commit e26953e

Please sign in to comment.