.. _`bio/rubic`:
RUBIC
=====
.. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/rubic?label=version%20update%20pull%20requests
:target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/rubic
`RUBIC `_
detects recurrent copy number alterations using copy number breaks.
Example
-------
This wrapper can be used in the following way:
.. code-block:: python
rule rubic:
input:
seg="{samples}/segments.txt",
markers="{samples}/markers.txt"
output:
out_gains="{samples}/gains.txt",
out_losses="{samples}/losses.txt",
out_plots=directory("{samples}/plots") #only possible to provide output directory for plots
params:
fdr="",
genefile=""
wrapper:
"v3.0.1/bio/rubic"
Note that input, output and log file paths can be chosen freely.
When running with
.. code-block:: bash
snakemake --use-conda
the software dependencies will be automatically deployed into an isolated environment before execution.
Software dependencies
---------------------
* ``r-base=3.4.1``
* ``r-rubic=1.0.3``
* ``r-data.table=1.10.4``
* ``r-pracma=2.0.4``
* ``r-ggplot2=2.2.1``
* ``r-gtable=0.2.0``
* ``r-codetools=0.2_15``
* ``r-digest=0.6.12``
Input/Output
------------
**Input:**
* seg
* markers
**Output:**
* out_gains
* out_losses
* out_plots
Params
------
* ``fdr``: false discovery rate (optional, leave empty to use default value of 0.25)
* ``genefile``: file path to use custom gene file (optional, leave empty to use default file)
Authors
-------
* Beatrice F. Tan
Code
----
.. code-block:: R
# __author__ = "Beatrice F. Tan"
# __copyright__ = "Copyright 2018, Beatrice F. Tan"
# __email__ = "beatrice.ftan@gmail.com"
# __license__ = "LUMC"
library(RUBIC)
all_genes <- if (snakemake@params[["genefile"]] == "") system.file("extdata", "genes.tsv", package="RUBIC") else snakemake@params[["genefile"]]
fdr <- if (snakemake@params[["fdr"]] == "") 0.25 else snakemake@params[["fdr"]]
rbc <- rubic(fdr, snakemake@input[["seg"]], 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"]])
.. |nl| raw:: html