MAGECK FLUTERRA

https://img.shields.io/badge/wrapper_version-v9.11.0-10785b https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/mageckflute/fluterra?label=version%20update%20pull%20requests&color=1cb481

CRISPR integrative analysis pipeline using the gene summary table in MAGeCK RRA results

URL: https://bioconductor.org/packages/3.20/bioc/html/MAGeCKFlute.html

Example

This wrapper can be used in the following way:

rule test_mageck_flute_rra:
    input:
        rra="gene_summary_small.txt",
        # Optional path to sgRNA
        sgrna="sgrna_summary_small.txt",
    output:
        directory("test_mageck_flute_rra"),
    log:
        "test_mageck_flute_rra.log",
    params:
        keytype="Symbol",
        organism="mmu",
        proj="testing",
        verbose=True,
    wrapper:
        "v9.11.0/bio/mageckflute/fluterra"

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

The output directory content depends on optional parameters, and the content of the CRISPR data.

Software dependencies

  • bioconductor-mageckflute=2.9.0

Input/Output

Input:

  • rra: Path to the gene summary table from MAGeCK RRA results

  • sgrna: Optional path to the sgRNA summary data

Output:

  • Path to the directory holding results

Params

  • A:

  • n:

  • y:

  • `` ``:

  • n:

  • a:

  • m:

  • e:

  • d:

  • `` ``:

  • p:

  • a:

  • r:

  • a:

  • m:

  • e:

  • t:

  • e:

  • r:

  • `` ``:

  • b:

  • e:

  • s:

  • i:

  • d:

  • e:

  • s:

  • `` ``:

  • `:

  • g:

  • e:

  • n:

  • e:

  • _:

  • s:

  • u:

  • m:

  • m:

  • a:

  • r:

  • y:

  • `:

  • ,:

  • `` ``:

  • `:

  • s:

  • g:

  • r:

  • n:

  • a:

  • _:

  • s:

  • u:

  • m:

  • m:

  • a:

  • r:

  • y:

  • `:

  • `` ``:

  • o:

  • r:

  • `` ``:

  • `:

  • o:

  • u:

  • t:

  • d:

  • i:

  • r:

  • `:

  • .:

Authors

  • Thibault Dayris

Code

# This wrapper performs MAgeck flute rra downstream analysis

# __author__ = "Thibault Dayris"
# __copyright__ = "Copyright 2026, Thibault Dayris"
# __email__ = "thibault.dayris@gustaveroussy.fr"
# __license__ = "MIT"

# Sink the stderr and stdout to the snakemake log file
# https://stackoverflow.com/a/48173272
log_file <- base::file(description = snakemake@log[[1]], open = "wt")
base::sink(file = log_file)
base::sink(file = log_file, type = "message")

base::library(package = "MAGeCKFlute", character.only = TRUE)

# Loading RRA and dropping NA counts that breaks downstream analysis
base::message("Loading and filtering RRA")
rra_gene_summary <- MAGeCKFlute::ReadRRA(
    gene_summary = snakemake@input[["rra"]]
)
rra_gene_summary <- rra_gene_summary[
    !base::is.na(rra_gene_summary$id),
]

rra_sgrna_summary <- NULL
if ("sgrna" %in% base::names(snakemake@input)) {
    rra_sgrna_summary <- MAGeCKFlute::ReadsgRRA(
        sgRNA_summary = snakemake@input[["sgrna"]]
    )
}

# Running MAGeCK flute
base::message("Building command line")
outdir <- base::as.character(x = snakemake@output[[1]])
base::dir.create(
    outdir,
    showWarnings = FALSE,
    recursive = TRUE
)
flute_rra_extra <- base::list(
    gene_summary = rra_gene_summary,
    sgrna_summary = rra_sgrna_summary,
    outdir = outdir
)
if (base::length(snakemake@params) > 0) {
    extra <- snakemake@params[base::names(snakemake@params) != ""]
    flute_rra_extra <- c(flute_rra_extra, extra)
}

base::message("Running MAGeCK command line:")
base::do.call(MAGeCKFlute::FluteRRA, flute_rra_extra)

utils::sessionInfo()
# Proper syntax to close the connection for the log file
# but could be optional for Snakemake wrapper
base::sink(type = "message")
base::sink()