galgo {GSgalgoR} | R Documentation

## GSgalgoR main function

### Description

`galgo` accepts an expression matrix and a survival object to find robust gene expression signatures related to a given outcome

### Usage

    galgo (population = 30, generations = 2, nCV = 5,
    distancetype = "pearson", TournamentSize = 2, period = 1825,
    OS, prob_matrix, res_dir = "", start_galgo_callback = callback_default,
    end_galgo_callback = callback_base_return_pop,
    report_callback = callback_base_report,
    start_gen_callback = callback_default,
    end_gen_callback = callback_default,
    verbose = 2)

### Arguments

`population` | a number indicating the number of solutions in the population of solutions that will be evolved
`generations` | a number indicating the number of iterations of the galgo algorithm
`nCV` | number of cross-validation sets
`distancetype` | character, it can be `'pearson'` (centered pearson), `'uncentered'` (uncentered pearson), `'spearman'` or `'euclidean'`
`TournamentSize` | a number indicating the size of the tournaments for the selection procedure
`period` | a number indicating the outcome period to evaluate the RMST
`OS` | a `survival` object (see `Surv` function from the `survival` package)
`prob_matrix` | a `matrix` or `data.frame`. Must be an expression matrix with features in rows and samples in columns
`res_dir` | a `character` string indicating where to save the intermediate and final output of the algorithm
`start_galgo_callback` | optional callback function for the start of the galgo execution
`end_galgo_callback` | optional callback function for the end of the galgo execution
`report_callback` | optional callback function
`start_gen_callback` | optional callback function for the beginning of the run
`end_gen_callback` | optional callback function for the end of the run
`verbose` | select the level of information printed during galgo execution

### Value

an object of type `'galgo.Obj'` that corresponds to a list with the elements `$Solutions` and `$ParetoFront`. `$Solutions` is a l x (n + 5) matrix where n is the number of features evaluated and l is the number of solutions obtained. The submatrix l x n is a binary matrix where each row represents the chromosome of an evolved solution from the solution population, where each feature can be present (1) or absent (0) in the solution. Column n +1 represent the k number of clusters for each solutions. Column n+2 to n+5 shows the SC Fitness and Survival Fitness values, the solution rank, and the crowding distance of the solution in the final pareto front respectively. For easier interpretation of the `'galgo.Obj'`, the output can be reshaped using the `to_list` and `to_dataframe` functions

### Author(s)

Martin E Guerrero-Gimenez, mguerrero@mendoza-conicet.gob.ar

### Examples

    # load example dataset
    library(breastCancerTRANSBIG)
    data(transbig)
    Train <- transbig
    rm(transbig)

    expression <- Biobase::exprs(Train)
    clinical <- Biobase::pData(Train)
    OS <- survival::Surv(time = clinical$t.rfs, event = clinical$e.rfs)

    # We will use a reduced dataset for the example
    expression <- expression[sample(seq_len(nrow(expression)), 100), ]

    # Now we scale the expression matrix
    expression <- t(scale(t(expression)))

    # Run galgo
    output <- GSgalgoR::galgo(generations = 5, population = 15,
    prob_matrix = expression, OS = OS)
    outputDF <- to_dataframe(output)
    outputList <- to_list(output)

[Package GSgalgoR version 1.2.1 Index]