Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [fix] (template): Missing code in wrappers' doc. Error #187 * New tested wrapper * Remove automatic addition from my IDE * Removed automatic IDE addition * Update bio/bustools/count/environment.yaml Co-authored-by: tdayris <tdayris@gustaveroussy.fr> Co-authored-by: tdayris <thibault.dayris@gustaveroussy.fr> Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
00f60b7
commit bb050e4
Showing
9 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- nodefaults | ||
dependencies: | ||
- bustools =0.41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: bustools count | ||
description: BUS files can be converted into a barcode-feature matrix | ||
url: https://github.com/BUStools/bustools#count | ||
author: | ||
- Thibault Dayris | ||
input: | ||
- bus: Single bus-file, or List of bus-files | ||
- genemap: Transcript to gene mapping | ||
- txnames: List of transcripts | ||
- ecmap: Equivalence classes for transcripts | ||
output: | ||
- barcodes, equivalence classes, and count matrix | ||
params: | ||
- extra: Optional parameters, besides `--output`, `--ecmap`, and `--genemap` | ||
notes: | | ||
When multiple bus files are provided, only one count matrix is returned. | ||
When an output endswith: ".hist.txt", then `--hist` parameter is automatically used. | ||
When an output endswith: ".genes.txt", then `--genemap` parameter is automatically used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
rule test_bustools_count: | ||
input: | ||
bus="file.bus", | ||
ecmap="matrix.ec", | ||
txnames="transcripts.txt", | ||
genemap="t2g.txt", | ||
output: | ||
multiext( | ||
"buscount", | ||
".barcodes.txt", | ||
".CUPerCell.txt", | ||
".cu.txt", | ||
".genes.txt", | ||
".hist.txt", | ||
".mtx", | ||
), | ||
threads: 1 | ||
params: | ||
extra="", | ||
log: | ||
"bustools.log", | ||
wrapper: | ||
"master/bio/bustools/count" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
0 0 | ||
1 1 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 | ||
6 6 | ||
7 7 | ||
8 8 | ||
9 9 | ||
10 10 | ||
11 11 | ||
12 12 | ||
13 13 | ||
14 6,12 | ||
15 0,1,2 | ||
16 0,1 | ||
17 6,11 | ||
18 3,12 | ||
19 1,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ENST00000282507.7 ENSG00000168671.9 | ||
ENST00000513300.5 ENSG00000168671.9 | ||
ENST00000504685.5 ENSG00000168671.9 | ||
ENST00000504954.1 ENSG00000168671.9 | ||
ENST00000515131.1 ENSG00000168671.9 | ||
ENST00000512916.2 ENSG00000249641.2 | ||
ENST00000243056.4 ENSG00000123364.4 | ||
ENST00000243103.3 ENSG00000123407.3 | ||
ENST00000546378.1 ENSG00000123388.4 | ||
ENST00000243082.4 ENSG00000123388.4 | ||
ENST00000515593.1 ENSG00000180818.4 | ||
ENST00000303460.4 ENSG00000180818.4 | ||
ENST00000511575.1 ENSG00000180818.4 | ||
ENST00000514415.1 ENSG00000180818.4 | ||
ENST00000513413.2 ENSG00000180818.4 | ||
ENST00000504315.1 ENSG00000197757.7 | ||
ENST00000509328.1 ENSG00000197757.7 | ||
ENST00000394331.3 ENSG00000197757.7 | ||
ENST00000243108.4 ENSG00000197757.7 | ||
ENST00000504557.1 ENSG00000180806.4 | ||
ENST00000508190.1 ENSG00000180806.4 | ||
ENST00000303450.4 ENSG00000180806.4 | ||
ENST00000040584.5 ENSG00000037965.5 | ||
ENST00000303406.4 ENSG00000198353.7 | ||
ENST00000507650.1 ENSG00000198353.7 | ||
ENST00000430889.2 ENSG00000198353.7 | ||
ENST00000312492.2 ENSG00000172789.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ENST00000513300.5 | ||
ENST00000282507.7 | ||
ENST00000504685.5 | ||
ENST00000243108.4 | ||
ENST00000303450.4 | ||
ENST00000243082.4 | ||
ENST00000303406.4 | ||
ENST00000303460.4 | ||
ENST00000243056.4 | ||
ENST00000312492.2 | ||
ENST00000040584.5 | ||
ENST00000430889.2 | ||
ENST00000394331.3 | ||
ENST00000243103.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python3 | ||
# coding: utf-8 | ||
|
||
"""Snakemake wrapper for bustools count""" | ||
|
||
__author__ = "Thibault Dayris" | ||
__copyright__ = "Copyright 2022, Thibault Dayris" | ||
__email__ = "thibault.dayris@gustaveroussy.fr" | ||
__license__ = "MIT" | ||
|
||
from snakemake.shell import shell | ||
from os.path import commonprefix | ||
|
||
log = snakemake.log_fmt_shell(stdout=True, stderr=True) | ||
|
||
# Get IO files and prefixes | ||
bus_files = snakemake.input["bus"] | ||
if isinstance(bus_files, list): | ||
bus_files = " ".join(bus_files) | ||
|
||
out_prefix = commonprefix(snakemake.output)[:-1] | ||
|
||
# Fill extra parameters if needed | ||
extra = snakemake.params.get("extra", "") | ||
if any(outfile.endswith(".hist.txt") for outfile in snakemake.output): | ||
if "--hist" not in extra: | ||
extra += " --hist" | ||
|
||
if any(outfile.endswith(".genes.txt") for outfile in snakemake.output): | ||
if "--genecounts" not in extra: | ||
extra += " --genecounts" | ||
|
||
shell( | ||
"bustools count {extra} " | ||
"--output {out_prefix} " | ||
"--genemap {snakemake.input.genemap} " | ||
"--ecmap {snakemake.input.ecmap} " | ||
"--txnames {snakemake.input.txnames} " | ||
"{bus_files} " | ||
"{log}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters