RUBIC

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

RUBIC detects recurrent copy number alterations using copy number breaks.

URL: https://github.com/NKI-CCB/RUBIC

Example

This wrapper can be used in the following way:

rule rubic:
    input:
        seg="{samples}/segments.txt",
        markers="{samples}/markers.txt"
#        genefile="path/to/genefile"
    output:
        out_gains="out/{samples}/gains.txt",
        out_losses="out/{samples}/losses.txt",
        out_plots=directory("out/{samples}/plots") #only possible to provide output directory for plots
    log:
        "logs/{samples}/rubic.log"
    params:
        fdr=0.2,
    wrapper:
        "v5.7.0/bio/rubic"

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.

Software dependencies

  • r-rubic=1.0.3

  • libgfortran=3.0.0

  • r-data.table=1.11.4

Input/Output

Input:

  • seg

  • markers

  • genefile

Output:

  • out_gains

  • out_losses

  • out_plots

Params

  • fdr: false discovery rate (optional, leave empty to use default value of 0.25)

Authors

  • Beatrice F. Tan

Code

# __author__ = "Beatrice F. Tan"
# __copyright__ = "Copyright 2018, Beatrice F. Tan"
# __email__ = "beatrice.ftan@gmail.com"
# __license__ = "LUMC"

library(RUBIC)

all_genes <- if ("genefile" %in% snakemake@input) snakemake@input[["genefile"]] else system.file("extdata", "genes.tsv", package="RUBIC")
fdr <- if ("fdr" %in% snakemake@params) snakemake@params[["fdr"]] else 0.25

rbc <- rubic(fdr=fdr, seg.cna=snakemake@input[["seg"]], markers=snakemake@input[["markers"]], genes=all_genes)
rbc$save.focal.gains(snakemake@output[["out_gains"]])
rbc$save.focal.losses(snakemake@output[["out_losses"]])
rbc$save.plots(snakemake@output[["out_plots"]])