Skip to content

Commit ebef6f8

Browse files
tdayristdayristdayrisjohanneskoestergithub-actions[bot]
authored
feat: Goleft indexcov (snakemake#2734)
<!-- Ensure that the PR title follows conventional commit style (<type>: <description>)--> <!-- Possible types are here: https://github.com/commitizen/conventional-commit-types/blob/master/index.json --> <!-- Add a description of your PR here--> THis PR add [goleft indexcov](https://github.com/brentp/goleft/tree/master/indexcov) to the list of available wrappers. ### QC <!-- Make sure that you can tick the boxes below. --> * [X] I confirm that: For all wrappers added by this PR, * there is a test case which covers any introduced changes, * `input:` and `output:` file paths in the resulting rule can be changed arbitrarily, * either the wrapper can only use a single core, or the example rule contains a `threads: x` statement with `x` being a reasonable default, * rule names in the test case are in [snake_case](https://en.wikipedia.org/wiki/Snake_case) and somehow tell what the rule is about or match the tools purpose or name (e.g., `map_reads` for a step that maps reads), * all `environment.yaml` specifications follow [the respective best practices](https://stackoverflow.com/a/64594513/2352071), * the `environment.yaml` pinning has been updated by running `snakedeploy pin-conda-envs environment.yaml` on a linux machine, * wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in `input:` or `output:`), * all fields of the example rules in the `Snakefile`s and their entries are explained via comments (`input:`/`output:`/`params:` etc.), * `stderr` and/or `stdout` are logged correctly (`log:`), depending on the wrapped tool, * temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function `tempfile.gettempdir()` points to (see [here](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir); this also means that using any Python `tempfile` default behavior works), * the `meta.yaml` contains a link to the documentation of the respective tool or command, * `Snakefile`s pass the linting (`snakemake --lint`), * `Snakefile`s are formatted with [snakefmt](https://github.com/snakemake/snakefmt), * Python wrapper scripts are formatted with [black](https://black.readthedocs.io). * Conda environments use a minimal amount of channels, in recommended ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as conda-forge should have highest priority and defaults channels are usually not needed because most packages are in conda-forge nowadays). --------- Co-authored-by: tdayris <[email protected]> Co-authored-by: tdayris <[email protected]> Co-authored-by: Johannes Köster <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com> Co-authored-by: Felix Mölder <[email protected]> Co-authored-by: Christopher Schröder <[email protected]> Co-authored-by: Filipe G. Vieira <[email protected]>
1 parent bbc990c commit ebef6f8

File tree

10 files changed

+4329
-0
lines changed

10 files changed

+4329
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file may be used to create an environment using:
2+
# $ conda create --name <env> --file <this file>
3+
# platform: linux-64
4+
@EXPLICIT
5+
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
6+
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.2.2-hbcca054_0.conda#2f4327a1cbe7f022401b236e915a5fef
7+
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-h7e041cc_5.conda#f6f6600d18a4047b54f803cf708b868a
8+
https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h807b86a_5.conda#d211c42b9ce49aee3734fdc828731689
9+
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d
10+
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h807b86a_5.conda#d4ff227c46917d3b4565302a2bbb276b
11+
https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda#69b8b6202a07720f448be700e300ccf4
12+
https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.27.0-hd590300_0.conda#f6afff0e9ee08d2f1b897881a4f38cdb
13+
https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2#30186d27e2c9fa62b45fb1476b7200e3
14+
https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.18-h0b41bf4_0.conda#6aa9c9de5542ecb07fdda9ca626252d8
15+
https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda#172bf1cd1ff8629f2b1179945ed45055
16+
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda#f36c115f1ee199da648e0597ec2047ad
17+
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.4-h59595ed_2.conda#7dbaa197d7ba6032caf7ae7f32c1efa0
18+
https://conda.anaconda.org/conda-forge/linux-64/openssl-3.2.1-hd590300_0.conda#51a753e64a3027bd7e23a189b1f6e91e
19+
https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2#2161070d867d1b1204ea749c8eec4ef0
20+
https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2#4d331e44109e3f0e19b4cb8f9b82f3e1
21+
https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda#700ac6ea6d53d5510591c4344d5c989a
22+
https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda#1f5a58e686b13bcfde88b93f547d23fe
23+
https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.5-hfc55251_0.conda#04b88013080254850d6c01ed54810589
24+
https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda#cd95826dbd331ed1be26bdf401432844
25+
https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.5.0-hca28451_0.conda#7144d5a828e2cae218e0e3c98d8a0aeb
26+
https://conda.anaconda.org/bioconda/linux-64/htslib-1.19.1-h81da01d_2.tar.bz2#ad57eedd99d6722b2f00a8f7d0d71e2a
27+
https://conda.anaconda.org/bioconda/linux-64/samtools-1.19.2-h50ea8bc_1.tar.bz2#446e85653117e24527bc4ba6d3841d8b
28+
https://conda.anaconda.org/bioconda/linux-64/goleft-0.2.4-h9ee0642_1.tar.bz2#a8658992b88c9323cff55ea1237a7103

bio/goleft/indexcov/environment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
channels:
2+
- conda-forge
3+
- bioconda
4+
- nodefaults
5+
dependencies:
6+
- goleft=0.2.4

bio/goleft/indexcov/meta.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "goleft indexcov"
2+
description: "Quickly estimate coverage from a whole-genome bam or cram index"
3+
url: "https://github.com/brentp/goleft/tree/master/indexcov#indexcov"
4+
authors:
5+
- "Thibault Dayris"
6+
input:
7+
- aln: Path to indexed BAM/CRAM file
8+
- fai: Path to fasta sequence index
9+
output:
10+
- html: Optional path to HTML report
11+
- bed: Optional path to coverage bed
12+
- ped: Optional path to pedigree file
13+
- roc: Optional path to coverage curves
14+
params:
15+
- extra: Optional parameters besides `-d` or `-r`
16+
notes: |
17+
Coverage bed, pedigree file, and roc curves are available in the HTML report.
18+
Using `bed`, `ped`, or `roc` output keys alongside with `html` will make these
19+
results unavailable in the HTML report, but won't break HTML content display.

bio/goleft/indexcov/test/Snakefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
rule test_goleft_indexcov:
2+
input:
3+
aln="sample.bam",
4+
fai="genome.fai",
5+
output:
6+
bed="regions.bed.gz",
7+
ped="indexcov.ped",
8+
roc="indexcov.roc",
9+
html=directory("report"),
10+
log:
11+
"indexcov.log",
12+
params:
13+
extra="-e",
14+
wrapper:
15+
"master/bio/goleft/indexcov"

bio/goleft/indexcov/test/genome.fai

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
1 249250621 52 60 61
2+
2 243199373 253404903 60 61
3+
3 198022430 500657651 60 61
4+
4 191154276 701980507 60 61
5+
5 180915260 896320740 60 61
6+
6 171115067 1080251307 60 61
7+
7 159138663 1254218344 60 61
8+
8 146364022 1416009371 60 61
9+
9 141213431 1564812846 60 61
10+
10 135534747 1708379889 60 61
11+
11 135006516 1846173603 60 61
12+
12 133851895 1983430282 60 61
13+
13 115169878 2119513096 60 61
14+
14 107349540 2236602526 60 61
15+
15 102531392 2345741279 60 61
16+
16 90354753 2449981581 60 61
17+
17 81195210 2541842300 60 61
18+
18 78077248 2624390817 60 61
19+
19 59128983 2703769406 60 61
20+
20 63025520 2763883926 60 61

bio/goleft/indexcov/test/sample.bam

2.16 KB
Binary file not shown.
30 KB
Binary file not shown.

0 commit comments

Comments
 (0)