RSEM GENERATE DATA MATRIX

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/rsem/generate-data-matrix?label=version%20update%20pull%20requests

Run rsem-generate-data-matrix to combine a set of single-sample rsem results into a single matrix.

Example

This wrapper can be used in the following way:

rule rsem_generate_data_matrix:
    input:
        # one or more expression files created by rsem-calculate-expression
        ["a.genes.results", "b.genes.results"],
    output:
        # a tsv containing each sample in the input as a column
        "genes.results",
    params:
        # optional additional parameters
        extra="",
    log:
        "logs/rsem/generate_data_matrix.log",
    wrapper:
        "v3.8.0-1-g149ef14/bio/rsem/generate-data-matrix"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Notes

Software dependencies

  • rsem=1.3.3

Input/Output

Input:

  • a list of rsem results files

Output:

  • Quantification results summarized by allele/gene/isoform per sample

Authors

  • Brett Copeland

Code

__author__ = "Brett Copeland"
__copyright__ = "Copyright 2021, Brett Copeland"
__email__ = "brcopeland@ucsd.edu"
__license__ = "MIT"


import os

from snakemake.shell import shell

extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=False, stderr=True)
shell(
    "rsem-generate-data-matrix {extra} "
    "{snakemake.input} > {snakemake.output} "
    "{log}"
)