Skip to content

Commit

Permalink
fix: create tabix index sub-wrapper (#501)
Browse files Browse the repository at this point in the history
* Created index sub-wrapper

* Fixed tests, paths, updated version, and added extra info

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
  • Loading branch information
fgvieira and johanneskoester committed Aug 16, 2022
1 parent 48c49a9 commit 6c47164
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 28 deletions.
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
@@ -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
@@ -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
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
@@ -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
@@ -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
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"],
)

Expand Down

0 comments on commit 6c47164

Please sign in to comment.