CINSIGNATUREQUANTIFICATION

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

Chromosomal instability signature quantification using unrounded absolute copy number profiles with the CINSignatureQuantification package

URL: https://github.com/markowetzlab/CINSignatureQuantification/

Example

This wrapper can be used in the following way:

rule quantify_cin_signatures:
    input:
        segments="data/TCGA_478_Samples_SNP6_GOLD_truncated",
    output:
        signatures="results/signatures.tsv",
    log:
        "logs/cin_signature_quantification.log",
    wrapper:
        "v9.10.0/bio/cin-signature-quantification"

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-cin-signature-quantification=1.2.0

Input/Output

Input:

  • absolute copy number profiles in segment table format, containing multiple samples, without allele or subclonal information

Output:

  • A file containing copy number signature activities for each sample

Authors

Code

# __author__ = "Carlo Monschein"
# __copyright__ = "Copyright 2026, Carlo Monschein"
# __email__ = "carlo.monschein@hotmail.de"
# __license__ = "MIT"

if (length(snakemake@log) > 0) {
    log <- file(snakemake@log[[1]], open="wt")
    sink(log)
    sink(log, type="message")
    on.exit({
        sink(type = "message")
        sink()
        close(log)
        }, add = TRUE)
}

library(CINSignatureQuantification)

# Input data is absolute copy number profiles in segment table format, containing
# multiple samples, without allele or subclonal information. It is perferable to use
# unrounded absolute copy number profiles.
segments_file <- snakemake@input[[1]]
out_file <- snakemake@output[[1]]

cat("Quantifing Signatures...", "\n")
Signatures <- quantifyCNSignatures(segments_file)
Signatures_matrix <- getActivities(Signatures)

Signatures_df <- data.frame(Sample = rownames(Signatures_matrix),
                            Signatures_matrix,
                            row.names = NULL,
                            check.names = FALSE)

cat("Saving signatures in: ", out_file, "\n")
write.table(Signatures_df, file = out_file, sep = "\t", quote = FALSE, row.names = FALSE, col.names = TRUE)