Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: create tabix index sub-wrapper #501

Merged
merged 4 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- htslib ==1.10
- htslib =1.15
11 changes: 11 additions & 0 deletions bio/tabix/index/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tabix
description: Process given file with tabix (e.g., create index).
url: https://www.htslib.org/doc/tabix.html#INDEXING_OPTIONS
authors:
- Johannes Köster
input:
- Bgzip compressed file (e.g. BED.gz, GFF.gz, or VCF.gz)
output:
- Tabix index file
notes: |
* Specify tabix index params (e.g. `-p vcf`) through `params`.
12 changes: 12 additions & 0 deletions bio/tabix/index/test/Snakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rule tabix:
input:
"{prefix}.vcf.gz",
output:
"{prefix}.vcf.gz.tbi",
log:
"logs/tabix/{prefix}.log",
params:
# pass arguments to tabix (e.g. index a vcf)
"-p vcf",
wrapper:
"master/bio/tabix/index"
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions bio/tabix/meta.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion bio/tabix/query/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- htslib==1.12
- htslib =1.15
6 changes: 4 additions & 2 deletions bio/tabix/query/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: tabix
description: Query given file with tabix.
url: https://github.com/samtools/htslib
url: https://www.htslib.org/doc/tabix.html#QUERYING_AND_OTHER_OPTIONS
authors:
- William Rowell
input:
- Bgzip compressed file (e.g. BED.gz, GFF.gz, or VCF.gz)
- Tabix index file
- Region of interest to retrieve (params.region)
output:
- Uncompressed subset of the input file from the given region
notes: |
* The `region` param (required) allows to specify region of interest to retrieve.
* The `extra` param allows for additional program arguments.
13 changes: 7 additions & 6 deletions bio/tabix/query/test/Snakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
rule tabix:
input:
"{prefix}.bed.gz",
"{prefix}.bed.gz.tbi"
## list the VCF/BCF as the first input
## and the index as the second input
"{prefix}.bed.gz",
"{prefix}.bed.gz.tbi",
output:
"{prefix}.output.bed"
params:
region = "1"
"{prefix}.output.bed",
log:
"logs/tabix/query/{prefix}.log"
"logs/tabix/query/{prefix}.log",
params:
region="1",
extra="",
wrapper:
"master/bio/tabix/query"
12 changes: 0 additions & 12 deletions bio/tabix/test/Snakefile

This file was deleted.

4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3924,9 +3924,9 @@ def test_bismark_bismark2bedgraph():


@skip_if_not_modified
def test_tabix():
def test_tabix_index():
run(
"bio/tabix",
"bio/tabix/index",
["snakemake", "--cores", "1", "--use-conda", "-F", "test.vcf.gz.tbi"],
)
johanneskoester marked this conversation as resolved.
Show resolved Hide resolved

Expand Down