newCancerPanel {PrecisionTrialDrawer} | R Documentation

## CancerPanel object constructor

### Description

Given a `data.frame` with your panel specifications, it creates a `CancerPanel` object to be used for both simulations and panel design.

### Usage

    newCancerPanel(panel
                , rules=NULL
                , padding_length = 100
                , utr = FALSE
                , canonicalTranscript=TRUE
                , myhost="www.ensembl.org"
                )

### Arguments

`panel` | A data.frame describing your panel with alterations, associated drugs and relative genes involved.
`padding_length` | An integer that defines how much to extend the targeted regions. `paddind_lenght` value is subtracted from the start coordinate of the targeted region in the panel and, at the same time, it is also added to the end coordinate of the panel. The result is an extension of the target region by the `padding_length` value in both 5' and 3' direction.
`utr` | If `TRUE`, the genomic coordinates will also include the UTR regions.
`canonicalTranscript` | if FALSE, every exon of every transcript of the gene is taken into consideration in calculating gene length. Default to TRUE is to select the canonical transcript (see references)
`myhost` | In case of a biomart breakdown, choose a different host than the default ensembl.org. check availability on biomart mirrors
`rules` | a data.frame similar to the panel that implement a set of rules so that specific associations between genes/mutations/actionability are overwritten. See Details

### Details

This constructor accepts a `data.frame`, `tibble` or `data.table` with the following columns:

`drug` - character vector

  A character vector of drug names or drug compounds. It is required, but it can be also filled with `NA` if no compound is associated with the alterations or the user is not interested in this feature.

`gene_symbol` - character vector

  A character vector of HGNC gene symbols. In case of specific fusion gene, the format is 'gene1__gene2'.

`alteration` - character vector

  A character vector with one of the following values: `SNV` (Single Nucleotide Variation) or `CNA` (Somatic Copy Number Alteration), `expression` (up or down gene expression), `fusion` (hybrid gene formed from two previously separated genes). This represents the class of alteration.

`exact_alteration` - character vector

  According to the alteration column, it can be one of the cases described in the table below.

`mutation_specification` - character vector

  This column refines the location of the alteration type defined in the previous column. In case the record in `alteration` is set to 'SNV', the location of the mutation must be specified according to the available options shown in the table below. In case of an alteration type different from 'SNV' the value must be left blank ("") or NA.

`group` - character vector (Optional)

  A character vector describing a specific group for the alteration. In the `panelexample`, we use it to divide the alterations between druggable (Actionable) and non druggable (Driver). Another possible use is to perform comparisons between different panels.

Possible values for a cancer panel to specify the alterations are:

alteration | exact_alteration | mutation_specification
CNA | amplification | ""
CNA | deletion | ""
expression | up | ""
expression | down | ""
SNV | "" | ""
SNV | mutation_type | missense
SNV | mutation_type | truncating
SNV | amino_acid_position | 300-300
SNV | amino_acid_position | 300-350
SNV | amino_acid_variant | V600E
SNV | genomic_position | 13:20000-40000
SNV | genomic_position | 13:20000-20000
SNV | genomic_variant | 13:20000:A,C
SNV | dbSNP_rs | rs1234567
fusion | "" | ""

`drug` values NA or empty are transformed to "no_drug", that is a reserved value. `group` values NA or empty are transformed to "no_group", that is a reserved value. `gene_symbol` is mandatory for any alteration type because alterations are retrieved from cBioPortal using this key. In case of rs IDs, the closest gene symbol is the ideal annotation, even if the position is intergenic and generally not associated with any gene.

`rules` parameter implements a set of negation rules.

A data.frame like the following can be used in the rules parameter. The data.frame is the same as above but it adds tumor_type and in_out columns:

drug | gene_symbol | alteration | exact_alteration | mutation_specification | group | tumor_type | in_out
Erlotinib | EGFR | SNV | amino_acid_variant | T790M | Driver |  | exclude
Erlotinib | KRAS | SNV |  |  | Driver |  | exclude
Erlotinib |  |  |  |  | Driver | luad | include
Olaparib |  |  |  |  | Driver | brca | include

The new column `tumor_type` can contain a single tumor_type code or an empty string (which means that the rule is valid for any tumor type). The other new column is `in_out` which can only contain 'include' or 'exclude' values.

The first two rows implement a resistance rule. Any sample with a T790M mutaion on EGFR or a KRAS mutation cannot be associated with Erlotinib because it generates resistance to EGFR inhibitors. The effect is that every sample with either a EGFR T790M mutation or any KRAS mutation will no longer be associated with Erlotinib (it will be considered 'no_drug') but the mutation will not be filtered out. In the group slot, the user can put what group the patient with that drug association will be changed into (in the example from Actionable to Driver). We set the rule as exclusion (in_out=exclude) for any tumor type.

The other two rows are more stringent and contain a drug inclusion/exclusion rule. Erlotinib can only be associated with luad and Olaparib only to brca (in_out=include). No matter what tumor type will be used in the future, these rules will always be applied so that any tumor type that is not luad or brca will be excluded.

### Value

This method returns a `CancerPanel` object with the slot arguments updated.

### Author(s)

Giorgio Melloni , Alessandro Guida

### References

source of gene length and exon structure

source of official gene symbols and mapping with ensembl

canonical transcript definition according to ENSEMBL

biomart mirrors

### See Also

`panelDesigner`

### Examples

    # Load the panel example
    data(panelexample)
    # Create a CancerPanel object for the first 3 lines
    mypanel <- newCancerPanel(panelexample[1:3 , ] , canonicalTranscript=FALSE)

[Package PrecisionTrialDrawer version 1.11.0 Index]