Skip to content

Commit

Permalink
perf: autobump bio/gridss/setupreference (#848)
Browse files Browse the repository at this point in the history
Automatic update of bio/gridss/setupreference.

---------

Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: Filipe G. Vieira <1151762+fgvieira@users.noreply.github.com>
  • Loading branch information
snakedeploy-bot[bot] and fgvieira committed Mar 21, 2023
1 parent ae2a295 commit c2f9766
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 37 deletions.
2 changes: 1 addition & 1 deletion bio/gridss/setupreference/environment.yaml
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- gridss ==2.9.4
- gridss =2.13.2
2 changes: 1 addition & 1 deletion bio/gridss/setupreference/meta.yaml
Expand Up @@ -5,6 +5,6 @@ description: >
``setupreference`` is a once-off setup generating additional files in the same directory as the reference.
WARNING multiple instances of GRIDSS attempting to perform setupreference at the same time will result in file corruption.
Make sure these files are generated before running parallel GRIDSS jobs.
Documentation at: https://github.com/PapenfussLab/gridss
url: https://github.com/PapenfussLab/gridss
authors:
- Christopher Schröder
4 changes: 1 addition & 3 deletions bio/gridss/setupreference/test/Snakefile
@@ -1,10 +1,8 @@
rule gridss_setupreference:
input:
reference="reference/genome.fasta",
dictionary="reference/genome.dict",
indices=multiext("reference/genome.fasta", ".amb", ".ann", ".bwt", ".pac", ".sa")
output:
multiext("reference/genome.fasta", ".gridsscache", ".img")
idx=multiext("reference/genome.fasta", ".amb", ".ann", ".bwt", ".dict", ".fai", ".pac", ".sa")
params:
extra="--jvmheap 1g"
log:
Expand Down
2 changes: 0 additions & 2 deletions bio/gridss/setupreference/test/reference/genome.dict

This file was deleted.

1 change: 0 additions & 1 deletion bio/gridss/setupreference/test/reference/genome.fasta.amb

This file was deleted.

3 changes: 0 additions & 3 deletions bio/gridss/setupreference/test/reference/genome.fasta.ann

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion bio/gridss/setupreference/test/reference/genome.fasta.fai

This file was deleted.

Binary file not shown.
Binary file not shown.
24 changes: 1 addition & 23 deletions bio/gridss/setupreference/wrapper.py
Expand Up @@ -14,30 +14,8 @@
# Placeholder for optional parameters
extra = snakemake.params.get("extra", "")

# Check inputs/arguments.
reference = snakemake.input.get("reference", None)

if not snakemake.input.reference:
raise ValueError("A reference genome has to be provided!")

for ending in (".amb", ".ann", ".bwt", ".pac", ".sa"):
if not path.exists("{}{}".format(reference, ending)):
raise ValueError(
"{reference}{ending} missing. Please make sure the reference was properly indexed by bwa.".format(
reference=reference, ending=ending
)
)

dictionary = path.splitext(reference)[0] + ".dict"
if not path.exists(dictionary):
raise ValueError(
"{dictionary}.dict missing. Please make sure the reference dictionary was properly created. This can be accomplished for example by CreateSequenceDictionary.jar from Picard".format(
dictionary=dictionary
)
)

shell(
"(gridss -s setupreference " # Tool
"--reference {reference} " # Reference
"--reference {snakemake.input.reference} " # Reference
"{extra}) {log}"
)
9 changes: 7 additions & 2 deletions test.py
Expand Up @@ -854,8 +854,13 @@ def test_gridss_setupreference():
"1",
"--use-conda",
"--show-failed-logs",
"reference/genome.fasta.gridsscache",
"reference/genome.fasta.img",
"reference/genome.fasta.amb",
"reference/genome.fasta.ann",
"reference/genome.fasta.bwt",
"reference/genome.fasta.dict",
"reference/genome.fasta.fai",
"reference/genome.fasta.pac",
"reference/genome.fasta.sa",
],
)

Expand Down

0 comments on commit c2f9766

Please sign in to comment.