# Stemness score

## Calculate stemness score with `TCGAanalyze_Stemness`

If you use this function please also cite:

Malta TM, Sokolov A, Gentles AJ, et al. Machine Learning Identifies Stemness Features Associated with Oncogenic Dedifferentiation. Cell. 2018;173(2):338-354.e15. (doi:10.1016/j.cell.2018.03.034)

## Data

The input data are: - a matrix (samples as columns, Gene names as rows) - the signature to calculate the correlation score.

Possible scores are:

- SC_PCBC_stemSig - Stemness Score
- DE_PCBC_stemSig - endoderm score
- EB_PCBC_stemSig - embryoid bodies score
- ECTO_PCBC_stemSig - ectoderm score
- MESO_PCBC_stemSig - mesoderm score

# Function

    # Selecting TCGA breast cancer (10 samples) for example stored in dataBRCA
    dataNorm <- TCGAanalyze_Normalization(
        tabDF = dataBRCA,
        geneInfo =  geneInfo
    )

    # quantile filter of genes
    dataFilt <- TCGAanalyze_Filtering(
      tabDF = dataNorm,
      method = "quantile",
      qnt.cut =  0.25
    )

    data(SC_PCBC_stemSig)
    Stemness_score <- TCGAanalyze_Stemness(
      stemSig = SC_PCBC_stemSig,
      dataGE = dataFilt
    )
    data(ECTO_PCBC_stemSig)
    ECTO_score <- TCGAanalyze_Stemness(
      stemSig = ECTO_PCBC_stemSig,
      dataGE = dataFilt,
      colname.score = "ECTO_PCBC_stem_score"
    )

    data(MESO_PCBC_stemSig)
    MESO_score <- TCGAanalyze_Stemness(
      stemSig = MESO_PCBC_stemSig,
      dataGE = dataFilt,
      colname.score = "MESO_PCBC_stem_score"
    )

# Output

    head(Stemness_score)

    ##                                                    Sample stemness_score
    ## TCGA-A7-A13D-01A-13R-A12P-07 TCGA-A7-A13D-01A-13R-A12P-07     0.55151986
    ## TCGA-BH-A0DK-11A-13R-A089-07 TCGA-BH-A0DK-11A-13R-A089-07     0.25018005
    ## TCGA-BH-A1FC-11A-32R-A13Q-07 TCGA-BH-A1FC-11A-32R-A13Q-07     0.05950360
    ## TCGA-E9-A1RH-11A-34R-A169-07 TCGA-E9-A1RH-11A-34R-A169-07     0.04172582
    ## TCGA-A7-A13G-11A-51R-A13Q-07 TCGA-A7-A13G-11A-51R-A13Q-07     0.08833098
    ## TCGA-AQ-A0Y5-01A-11R-A14M-07 TCGA-AQ-A0Y5-01A-11R-A14M-07     0.28367958

    head(ECTO_score)

    ##                                                    Sample ECTO_PCBC_stem_score
    ## TCGA-A7-A13D-01A-13R-A12P-07 TCGA-A7-A13D-01A-13R-A12P-07            0.0000000
    ## TCGA-BH-A0DK-11A-13R-A089-07 TCGA-BH-A0DK-11A-13R-A089-07            0.7047814
    ## TCGA-BH-A1FC-11A-32R-A13Q-07 TCGA-BH-A1FC-11A-32R-A13Q-07            0.6716272
    ## TCGA-E9-A1RH-11A-34R-A169-07 TCGA-E9-A1RH-11A-34R-A169-07            0.8297745
    ## TCGA-A7-A13G-11A-51R-A13Q-07 TCGA-A7-A13G-11A-51R-A13Q-07            1.0000000
    ## TCGA-AQ-A0Y5-01A-11R-A14M-07 TCGA-AQ-A0Y5-01A-11R-A14M-07            0.5695667

    head(MESO_score)

    ##                                                    Sample MESO_PCBC_stem_score
    ## TCGA-A7-A13D-01A-13R-A12P-07 TCGA-A7-A13D-01A-13R-A12P-07            0.5126567
    ## TCGA-BH-A0DK-11A-13R-A089-07 TCGA-BH-A0DK-11A-13R-A089-07            0.8767232
    ## TCGA-BH-A1FC-11A-32R-A13Q-07 TCGA-BH-A1FC-11A-32R-A13Q-07            1.0000000
    ## TCGA-E9-A1RH-11A-34R-A169-07 TCGA-E9-A1RH-11A-34R-A169-07            0.8471883
    ## TCGA-A7-A13G-11A-51R-A13Q-07 TCGA-A7-A13G-11A-51R-A13Q-07            0.8389521
    ## TCGA-AQ-A0Y5-01A-11R-A14M-07 TCGA-AQ-A0Y5-01A-11R-A14M-07            0.7778527