# deconvR : Simulation and Deconvolution of Omic Profiles

Irem B. Gunduz, Veronika Ebenal, Altuna Akalin

#### 2022-12-05

#### Package

deconvR 1.4.3

# 1 Introduction

Recent studies associated the differences of cell-type proportions may be correlated to certain phenotypes, such as cancer. Therefore, the demand for the development of computational methods to predict cell type proportions increased. Hereby, we developed `deconvR`, a collection of functions designed for analyzing deconvolution of the bulk sample(s) using an atlas of reference omic signature profiles and a user-selected model. We wanted to give users an option to extend their reference atlas. Users can create new reference atlases using `findSignatures` or extend their atlas by adding more cell types. Additionally, we included `BSMeth2Probe` to make mapping whole-genome bisulfite sequencing data to their probe IDs easier. So users can map WGBS methylation data (as in methylKit or GRanges object format) to probe IDs, and the results of this mapping can be used as the bulk samples in the deconvolution. We also included a comprehensive DNA methylation atlas of 25 different cell types to use in the main function `deconvolute`. `deconvolute` allows the user to specify their desired deconvolution model (non-negative least squares regression, support vector regression, quadratic programming, or robust linear regression), and returns a dataframe which contains predicted cell-type proportions of bulk methylation profiles, as well as partial R-squared values for each sample.

As an another option, users can generate a simulated table of a desired number of samples, with either user-specified or random origin proportions using `simulateCellMix`. `simulateCellMix` returns a second data frame called `proportions`, which contains the actual cell-type proportions of the simulated sample. It can be used for testing the accuracy of the deconvolution by comparing these actual proportions to the proportions predicted by `deconvolute`.

`deconvolute` returns partial R-squares, to check if deconvolution brings advantages on top of the basic bimodal profiles. The reference matrix usually follows a bimodal distribution in the case of methylation, and taking the average of the rows of methylation matrix might give a pretty similar profile to the bulk methylation profile you are trying to deconvolute. If the deconvolution is advantageous, partial R-squared is expect to be high.

# 2 Installation

The deconvR package can be installed from Bioconductor with:

    if (!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")

    BiocManager::install("deconvR")

# 3 Data

## 3.1 Comprehensive Human Methylome Reference Atlas

The comprehensive human methylome reference atlas created by Moss et al. 1 1 1 Moss, J. et al. (2018). Comprehensive human cell-type methylation atlas reveals origins of circulating cell-free DNA in health and disease. Nature communications, 9(1), 1-12. https://doi.org/10.1038/s41467-018-07466-6 can be used as the reference atlas parameter for several functions in this package. This atlas was modified to remove duplicate CpG loci before being included in the package as the dataframe. The dataframe is composed of 25 human cell types and roughly 6000 CpG loci, identified by their Illumina Probe ID. For each cell type and CpG locus, a methylation value between 0 and 1 is provided. This value represents the fraction of methylated bases of the CpG locus. The atlas therefore provides a unique methylation pattern for each cell type and can be directly used as `reference` in `deconvolute` and `simulateCellMix`, and `atlas` in `findSignatures`. Below is an example dataframe to illustrate the `atlas` format.

    library(deconvR)

    data("HumanCellTypeMethAtlas")
    head(HumanCellTypeMethAtlas[,1:5])

    ##          IDs Monocytes_EPIC B.cells_EPIC CD4T.cells_EPIC NK.cells_EPIC
    ## 1 cg08169020         0.8866       0.2615          0.0149        0.0777
    ## 2 cg25913761         0.8363       0.2210          0.2816        0.4705
    ## 3 cg26955540         0.7658       0.0222          0.1492        0.4005
    ## 4 cg25170017         0.8861       0.5116          0.1021        0.4363
    ## 5 cg12827637         0.5212       0.3614          0.0227        0.2120
    ## 6 cg19442545         0.2013       0.1137          0.0608        0.0410

## 3.2 Illumina Infinium MethylationEPIC v1.0 B5 Manifest Probes (hg38)

The GRanges object `IlluminaMethEpicB5ProbeIDs` contains the Illumina probe IDs of 400000 genomic loci (identified using the “seqnames”, “ranges”, and “strand” values). This object is based off of the Infinium MethylationEPIC v1.0 B5 Manifest data. Unnecessary columns were removed and rows were truncated to reduce file size before converting the file to a GRanges object. It can be used directly as `probe_id_locations` in `BSmeth2Probe`.

    data("IlluminaMethEpicB5ProbeIDs")
    head(IlluminaMethEpicB5ProbeIDs)

    ## GRanges object with 6 ranges and 1 metadata column:
    ##       seqnames              ranges strand |          ID
    ##          <Rle>           <IRanges>  <Rle> | <character>
    ##   [1]    chr19     5236005-5236006      + |  cg07881041
    ##   [2]    chr20   63216298-63216299      + |  cg18478105
    ##   [3]     chr1     6781065-6781066      + |  cg23229610
    ##   [4]     chr2 197438742-197438743      - |  cg03513874
    ##   [5]     chrX   24054523-24054524      + |  cg09835024
    ##   [6]    chr14   93114794-93114795      - |  cg05451842
    ##   -------
    ##   seqinfo: 25 sequences from an unspecified genome; no seqlengths

# 4 Example Workflow For Whole Genome Bisulfate Sequencing Data

## 4.1 Expanding Reference Atlas

As mentioned in the introduction section, users can extend their reference atlas to incorporate new data. Or may combine different reference atlases to construct a more comprehensive one. This can be done using the `findSignatures` function. In this example, since we don’t have any additional reference atlas, we will add simulated data as a new cell type to reference atlas for example purposes. First, ensure that `atlas` (the signature matrix to be extended) and `samples` (the new data to be added to the signature matrix) are compliant with the function requirements. Below illustrates the `samples` format.

    samples <- simulateCellMix(3,reference = HumanCellTypeMethAtlas)$simulated
    head(samples)

    ##          IDs   Sample 1   Sample 2   Sample 3
    ## 1 cg08169020 0.19105733 0.25086532 0.19792456
    ## 2 cg25913761 0.34852108 0.41115424 0.34544241
    ## 3 cg26955540 0.22891189 0.30593200 0.24220908
    ## 4 cg25170017 0.22844454 0.25847076 0.24730230
    ## 5 cg12827637 0.15071902 0.17034467 0.15223798
    ## 6 cg19442545 0.06049606 0.07606899 0.07723719

`sampleMeta` should include all sample names in `samples`, and specify the origins they should be mapped to when added to `atlas`.

    sampleMeta <- data.table("Experiment_accession" = colnames(samples)[-1],
                             "Biosample_term_name" = "new cell type")
    head(sampleMeta)

    ##    Experiment_accession Biosample_term_name
    ## 1:             Sample 1       new cell type
    ## 2:             Sample 2       new cell type
    ## 3:             Sample 3       new cell type

Use `findSignatures` to extend the matrix.

    extended_matrix <- findSignatures(samples = samples,
                                     sampleMeta = sampleMeta,
                                     atlas = HumanCellTypeMethAtlas,
                                     IDs = "IDs")

    ## CELL TYPES IN EXTENDED ATLAS:
    ## new cell type
    ## Monocytes_EPIC
    ## B.cells_EPIC
    ## CD4T.cells_EPIC
    ## NK.cells_EPIC
    ## CD8T.cells_EPIC
    ## Neutrophils_EPIC
    ## Erythrocyte_progenitors
    ## Adipocytes
    ## Cortical_neurons
    ## Hepatocytes
    ## Lung_cells
    ## Pancreatic_beta_cells
    ## Pancreatic_acinar_cells
    ## Pancreatic_duct_cells
    ## Vascular_endothelial_cells
    ## Colon_epithelial_cells
    ## Left_atrium
    ## Bladder
    ## Breast
    ## Head_and_neck_larynx
    ## Kidney
    ## Prostate
    ## Thyroid
    ## Upper_GI
    ## Uterus_cervix

    head(extended_matrix)

    ##          IDs new_cell_type Monocytes_EPIC B.cells_EPIC CD4T.cells_EPIC
    ## 1 cg08169020    0.21328241         0.8866       0.2615          0.0149
    ## 2 cg25913761    0.36837258         0.8363       0.2210          0.2816
    ## 3 cg26955540    0.25901766         0.7658       0.0222          0.1492
    ## 4 cg25170017    0.24473920         0.8861       0.5116          0.1021
    ## 5 cg12827637    0.15776722         0.5212       0.3614          0.0227
    ## 6 cg19442545    0.07126741         0.2013       0.1137          0.0608
    ##   NK.cells_EPIC CD8T.cells_EPIC Neutrophils_EPIC Erythrocyte_progenitors
    ## 1        0.0777          0.0164           0.8680                  0.9509
    ## 2        0.4705          0.3961           0.8293                  0.2385
    ## 3        0.4005          0.3474           0.7915                  0.1374
    ## 4        0.4363          0.0875           0.7042                  0.9447
    ## 5        0.2120          0.0225           0.5368                  0.4667
    ## 6        0.0410          0.0668           0.1952                  0.1601
    ##   Adipocytes Cortical_neurons Hepatocytes Lung_cells Pancreatic_beta_cells
    ## 1     0.0336           0.0168      0.0340     0.0416              0.038875
    ## 2     0.3578           0.3104      0.2389     0.2250              0.132000
    ## 3     0.1965           0.0978      0.0338     0.0768              0.041725
    ## 4     0.0842           0.2832      0.2259     0.0544              0.111750
    ## 5     0.0287           0.1368      0.0307     0.1607              0.065975
    ## 6     0.0364           0.0222      0.1574     0.0122              0.003825
    ##   Pancreatic_acinar_cells Pancreatic_duct_cells Vascular_endothelial_cells
    ## 1                  0.0209                0.0130                     0.0323
    ## 2                  0.2249                0.1996                     0.3654
    ## 3                  0.0314                0.0139                     0.2382
    ## 4                  0.0309                0.0217                     0.0972
    ## 5                  0.0370                0.0230                     0.0798
    ## 6                  0.0378                0.0347                     0.0470
    ##   Colon_epithelial_cells Left_atrium Bladder Breast Head_and_neck_larynx Kidney
    ## 1                 0.0163      0.0386  0.0462 0.0264               0.0470 0.0269
    ## 2                 0.2037      0.2446  0.2054 0.1922               0.2045 0.1596
    ## 3                 0.0193      0.1134  0.1269 0.1651               0.1523 0.1034
    ## 4                 0.0187      0.0674  0.0769 0.0691               0.0704 0.0604
    ## 5                 0.0193      0.0432  0.0459 0.0228               0.0687 0.0234
    ## 6                 0.0193      0.0287  0.0246 0.0081               0.0098 0.0309
    ##   Prostate Thyroid Upper_GI Uterus_cervix
    ## 1   0.0353  0.0553   0.0701        0.0344
    ## 2   0.1557  0.1848   0.1680        0.2026
    ## 3   0.0686  0.0943   0.1298        0.1075
    ## 4   0.0369  0.0412   0.0924        0.0697
    ## 5   0.0508  0.0726   0.0759        0.0196
    ## 6   0.0055  0.0188   0.0090        0.0166

WGBS methylation data first needs to be mapped to probes using `BSmeth2Probe` before being deconvoluted. The methylation data `WGBS_data` in `BSmeth2Probe` may be either a GRanges object or a methylKit object.

Format of `WGBS_data` as GRanges object:

    load(system.file("extdata", "WGBS_GRanges.rda",
                                         package = "deconvR"))
    head(WGBS_GRanges)

    ## GRanges object with 6 ranges and 1 metadata column:
    ##       seqnames    ranges strand |   sample1
    ##          <Rle> <IRanges>  <Rle> | <numeric>
    ##   [1]     chr1     47176      + |  0.833333
    ##   [2]     chr1     47177      - |  0.818182
    ##   [3]     chr1     47205      + |  0.681818
    ##   [4]     chr1     47206      - |  0.583333
    ##   [5]     chr1     47362      + |  0.416667
    ##   [6]     chr1     49271      + |  0.733333
    ##   -------
    ##   seqinfo: 1 sequence from an unspecified genome; no seqlengths

or as methylKit object:

    head(methylKit::methRead(system.file("extdata", "test1.myCpG.txt",
                                         package = "methylKit"),
                             sample.id="test", assembly="hg18",
                             treatment=1, context="CpG", mincov = 0))

    ##     chr   start     end strand coverage numCs numTs
    ## 1 chr21 9764513 9764513      -       12     0    12
    ## 2 chr21 9764539 9764539      -       12     3     9
    ## 3 chr21 9820622 9820622      +       13     0    13
    ## 4 chr21 9837545 9837545      +       11     0    11
    ## 5 chr21 9849022 9849022      +      124    90    34
    ## 6 chr21 9853296 9853296      +       17    10     7

`probe_id_locations` contains information needed to map cellular loci to probe IDs

    data("IlluminaMethEpicB5ProbeIDs")
    head(IlluminaMethEpicB5ProbeIDs)

    ## GRanges object with 6 ranges and 1 metadata column:
    ##       seqnames              ranges strand |          ID
    ##          <Rle>           <IRanges>  <Rle> | <character>
    ##   [1]    chr19     5236005-5236006      + |  cg07881041
    ##   [2]    chr20   63216298-63216299      + |  cg18478105
    ##   [3]     chr1     6781065-6781066      + |  cg23229610
    ##   [4]     chr2 197438742-197438743      - |  cg03513874
    ##   [5]     chrX   24054523-24054524      + |  cg09835024
    ##   [6]    chr14   93114794-93114795      - |  cg05451842
    ##   -------
    ##   seqinfo: 25 sequences from an unspecified genome; no seqlengths

Use `BSmeth2Probe` to map WGBS data to probe IDs.

    mapped_WGBS_data <- BSmeth2Probe(probe_id_locations = IlluminaMethEpicB5ProbeIDs,
                                     WGBS_data = WGBS_GRanges,
                                     multipleMapping = TRUE,
                                     cutoff = 10)
    head(mapped_WGBS_data)

    ##          IDs   sample1
    ## 1 cg00305774 1.0000000
    ## 2 cg00546078 0.8181818
    ## 3 cg00546307 0.5454545
    ## 4 cg00546971 0.5000000
    ## 5 cg00774867 0.8461538
    ## 6 cg00830435 0.9166667

This mapped data can now be used in `deconvolute`. Here we will deconvolute it using the previously extended signature matrix as the reference atlas.

    deconvolution <- deconvolute(reference = HumanCellTypeMethAtlas,
                                 bulk = mapped_WGBS_data)

    ##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
    ##  0.9963  0.9963  0.9963  0.9963  0.9963  0.9963

    deconvolution$proportions

    ##         Monocytes_EPIC B.cells_EPIC CD4T.cells_EPIC NK.cells_EPIC
    ## sample1              0            0               0             0
    ##         CD8T.cells_EPIC Neutrophils_EPIC Erythrocyte_progenitors Adipocytes
    ## sample1               0                0                       0  0.5011789
    ##         Cortical_neurons Hepatocytes Lung_cells Pancreatic_beta_cells
    ## sample1        0.2917357           0          0                     0
    ##         Pancreatic_acinar_cells Pancreatic_duct_cells
    ## sample1                       0                     0
    ##         Vascular_endothelial_cells Colon_epithelial_cells Left_atrium Bladder
    ## sample1                          0            0.001012524           0       0
    ##         Breast Head_and_neck_larynx Kidney Prostate Thyroid Upper_GI
    ## sample1      0            0.2060729      0        0       0        0
    ##         Uterus_cervix
    ## sample1             0

## 4.2 Constructing tissue specific CpG signature matrix

Alternatively, users can set tissueSpecCpGs as TRUE to construct tissue based methylation signature matrix by using the reference atlas. Here, we used simulated samples to construct tissue specific signature matrix since we don’t have tissue specific samples.

    data("HumanCellTypeMethAtlas")
    exampleSamples <- simulateCellMix(1,reference = HumanCellTypeMethAtlas)$simulated
    exampleMeta <- data.table("Experiment_accession" = "example_sample",
                              "Biosample_term_name" = "example_cell_type")
    colnames(exampleSamples) <- c("CpGs", "example_sample")
    colnames(HumanCellTypeMethAtlas)[1] <- c("CpGs")

    signatures <- findSignatures(
      samples = exampleSamples,
      sampleMeta = exampleMeta,
      atlas = HumanCellTypeMethAtlas,
      IDs = "CpGs", K = 100, tissueSpecCpGs = TRUE)

    ## CELL TYPES IN EXTENDED ATLAS:
    ## example_cell_type
    ## Monocytes_EPIC
    ## B.cells_EPIC
    ## CD4T.cells_EPIC
    ## NK.cells_EPIC
    ## CD8T.cells_EPIC
    ## Neutrophils_EPIC
    ## Erythrocyte_progenitors
    ## Adipocytes
    ## Cortical_neurons
    ## Hepatocytes
    ## Lung_cells
    ## Pancreatic_beta_cells
    ## Pancreatic_acinar_cells
    ## Pancreatic_duct_cells
    ## Vascular_endothelial_cells
    ## Colon_epithelial_cells
    ## Left_atrium
    ## Bladder
    ## Breast
    ## Head_and_neck_larynx
    ## Kidney
    ## Prostate
    ## Thyroid
    ## Upper_GI
    ## Uterus_cervix

    print(head(signatures[[2]]))

    ## $hyper
    ## cg26955540 cg15838173 cg19442545 cg10560079 cg26460530 cg22017733 cg13677741
    ## 0.16511411 0.14398585 0.14019290 0.13613852 0.12622580 0.12568460 0.12199749
    ## cg14789659 cg19300307 cg06340704 cg14785464 cg11895835 cg12474798 cg27189395
    ## 0.11446105 0.11318505 0.11299718 0.11283022 0.11281844 0.11243644 0.11236841
    ## cg05507654 cg26033520 cg05056497 cg25913761 cg00936790 cg24275356 cg20684110
    ## 0.11212279 0.11210060 0.11065567 0.11054387 0.10993726 0.10973730 0.10971661
    ## cg08857351 cg05258935 cg08474651 cg23220823 cg27395200 cg10509607 cg22897141
    ## 0.10967633 0.10935440 0.10922089 0.10909262 0.10849194 0.10824716 0.10800167
    ## cg14855367 cg03254916 cg22879098 cg26757820 cg08063160 cg09267773 cg14057303
    ## 0.10772810 0.10759226 0.10720279 0.10713194 0.10675950 0.10636835 0.10630736
    ## cg08425810 cg10361922 cg04913246 cg02962602 cg16416715 cg26953232 cg03711944
    ## 0.10630677 0.10619140 0.10606752 0.10596400 0.10592847 0.10573359 0.10570583
    ## cg08257293 cg26047334 cg25158622 cg11975790 cg14845962 cg16278496 cg05043794
    ## 0.10569597 0.10566831 0.10471635 0.10420206 0.10336117 0.10322076 0.10321559
    ## cg16127573 cg27312961 cg22138735 cg15014975 cg04055490 cg18675610 cg19331221
    ## 0.10293696 0.10245076 0.10212205 0.10209543 0.10183873 0.10172358 0.10156831
    ## cg08846870 cg17847861 cg03063309 cg07865091 cg24591770 cg16402452 cg02297709
    ## 0.10124518 0.10101465 0.10083998 0.10060221 0.10032626 0.10030652 0.10028193
    ## cg11532431 cg00769843 cg10661769 cg04462378 cg06398251 cg06889535 cg07218880
    ## 0.10010457 0.10000112 0.09996013 0.09970053 0.09965249 0.09962252 0.09933214
    ## cg01377358 cg21181453 cg13638257 cg11025609 cg16988611 cg15185986 cg16829306
    ## 0.09930390 0.09924918 0.09905663 0.09898667 0.09870785 0.09856438 0.09841000
    ## cg07438103 cg20074395 cg15575375 cg16306706 cg16017089 cg08659179 cg19692929
    ## 0.09833326 0.09820756 0.09818598 0.09809655 0.09803389 0.09787800 0.09771692
    ## cg15059065 cg20809067 cg13852284 cg06375761 cg16389209 cg12946660 cg23896514
    ## 0.09747847 0.09711547 0.09696524 0.09641922 0.09630247 0.09586572 0.09570340
    ## cg27016579 cg26401541 cg20227056 cg22109530 cg06493154 cg10576280 cg13506158
    ## 0.09566770 0.09564258 0.09520828 0.09504933 0.09477931 0.09469729 0.09447056
    ## cg07275218 cg18071071
    ## 0.09419863 0.09396148
    ##
    ## $hypo
    ## cg03126713 cg00828556 cg13931640 cg22528270 cg11231069 cg03549146 cg12458039
    ##  0.2608678  0.2590858  0.2542455  0.2534468  0.2396956  0.2312387  0.2301228
    ## cg07737292 cg10456459 cg03313271 cg06988336 cg16636767 cg06517984 cg23952578
    ##  0.2254906  0.2214120  0.2170091  0.2148771  0.2081723  0.2076964  0.2053736
    ## cg27334271 cg14976569 cg11327657 cg11597902 cg22259797 cg08425796 cg13403369
    ##  0.2053648  0.2051115  0.2045152  0.2041546  0.2021637  0.1992477  0.1989723
    ## cg06373940 cg04354689 cg22185977 cg09322573 cg20107506 cg06125903 cg07033722
    ##  0.1979397  0.1977199  0.1964235  0.1961676  0.1960185  0.1955441  0.1952490
    ## cg10718056 cg25517015 cg12866960 cg26538782 cg01879591 cg27366072 cg03310874
    ##  0.1952056  0.1940035  0.1936546  0.1932444  0.1930874  0.1926088  0.1923123
    ## cg02796279 cg13093111 cg19502671 cg06978145 cg08538581 cg10967114 cg20429104
    ##  0.1905119  0.1899892  0.1896189  0.1889408  0.1889095  0.1877812  0.1877720
    ## cg23403750 cg26783127 cg19380303 cg06721411 cg11153071 cg01024962 cg26923863
    ##  0.1876203  0.1873470  0.1872246  0.1869937  0.1865574  0.1864148  0.1861094
    ## cg20966357 cg06585734 cg23755933 cg26305504 cg12555086 cg04217515 cg04664897
    ##  0.1859776  0.1854972  0.1854719  0.1854248  0.1850612  0.1845401  0.1844611
    ## cg05445326 cg07918933 cg27340480 cg18835472 cg04836151 cg25596405 cg23334433
    ##  0.1841796  0.1841423  0.1840534  0.1833588  0.1833147  0.1831378  0.1831222
    ## cg02244028 cg26298914 cg26889953 cg24250902 cg04586126 cg14189391 cg00009088
    ##  0.1829430  0.1829390  0.1823787  0.1822022  0.1816852  0.1814691  0.1814626
    ## cg17117981 cg08400494 cg13980609 cg17086773 cg08428868 cg15288326 cg22875823
    ##  0.1814579  0.1812952  0.1812255  0.1810286  0.1808400  0.1805651  0.1803076
    ## cg22662844 cg07417146 cg00235484 cg22666015 cg16429499 cg01622606 cg15878616
    ##  0.1794541  0.1785750  0.1783436  0.1782869  0.1773024  0.1770105  0.1764739
    ## cg18066690 cg14516183 cg26709988 cg19849557 cg23514375 cg17976229 cg12019801
    ##  0.1726056  0.1710685  0.1699093  0.1655033  0.1654280  0.1652728  0.1632728
    ## cg11222173 cg10826999 cg13414750 cg15982099 cg09856274 cg13618516 cg13984928
    ##  0.1619258  0.1608203  0.1602542  0.1593861  0.1586826  0.1578841  0.1559277
    ## cg22160073 cg13466002
    ##  0.1554980  0.1548606

## 4.3 Constructing tissue specific DMPs

Alternatively, users can set tissueSpecDMPs as TRUE to obtain tissue based DMPs by using the reference atlas. Here, we used simulated samples since we don’t have tissue specific samples. Note that both tissueSpecCpGs and tissueSpecDMPs can’t be TRUE at the same time.

    data("HumanCellTypeMethAtlas")
    exampleSamples <- simulateCellMix(1,reference = HumanCellTypeMethAtlas)$simulated
    exampleMeta <- data.table("Experiment_accession" = "example_sample",
                              "Biosample_term_name" = "example_cell_type")
    colnames(exampleSamples) <- c("CpGs", "example_sample")
    colnames(HumanCellTypeMethAtlas)[1] <- c("CpGs")

    signatures <- findSignatures(
      samples = exampleSamples,
      sampleMeta = exampleMeta,
      atlas = HumanCellTypeMethAtlas,
      IDs = "CpGs", tissueSpecDMPs = TRUE)

    ## CELL TYPES IN EXTENDED ATLAS:
    ## example_cell_type
    ## Monocytes_EPIC
    ## B.cells_EPIC
    ## CD4T.cells_EPIC
    ## NK.cells_EPIC
    ## CD8T.cells_EPIC
    ## Neutrophils_EPIC
    ## Erythrocyte_progenitors
    ## Adipocytes
    ## Cortical_neurons
    ## Hepatocytes
    ## Lung_cells
    ## Pancreatic_beta_cells
    ## Pancreatic_acinar_cells
    ## Pancreatic_duct_cells
    ## Vascular_endothelial_cells
    ## Colon_epithelial_cells
    ## Left_atrium
    ## Bladder
    ## Breast
    ## Head_and_neck_larynx
    ## Kidney
    ## Prostate
    ## Thyroid
    ## Upper_GI
    ## Uterus_cervix

    print(head(signatures[[2]]))

    ##            intercept        f         pval         qval
    ## cg10480329 -3.287511 210.9025 2.191372e-13 1.320959e-09
    ## cg06297318 -3.496336 176.6334 1.467002e-12 4.421545e-09
    ## cg18835472 -3.350244 152.7434 6.773760e-12 1.361074e-08
    ## cg05923857 -3.515739 147.1751 9.969597e-12 1.502418e-08
    ## cg15633603 -1.496293 141.9060 1.454281e-11 1.526119e-08
    ## cg27366072 -2.858145 141.3087 1.519031e-11 1.526119e-08

# 5 Example Workflow For RNA Sequencing Data

It is possible to use RNA-seq data for deconvolution via deconvR package. Beware that you have to set `IDs` column that contains `Gene names` to run deconvR functions. Therefore you can simulate bulk RNA-seq data via `simulateCellMix` and, extend RNA-seq reference atlas via `findSignatures`.

# 6 sessionInfo

    sessionInfo()

    ## R version 4.2.2 (2022-10-31 ucrt)
    ## Platform: x86_64-w64-mingw32/x64 (64-bit)
    ## Running under: Windows Server x64 (build 20348)
    ##
    ## Matrix products: default
    ##
    ## locale:
    ## [1] LC_COLLATE=C
    ## [2] LC_CTYPE=English_United States.utf8
    ## [3] LC_MONETARY=English_United States.utf8
    ## [4] LC_NUMERIC=C
    ## [5] LC_TIME=English_United States.utf8
    ##
    ## attached base packages:
    ## [1] parallel  stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ## [1] dplyr_1.0.10      doParallel_1.0.17 iterators_1.0.14  foreach_1.5.2
    ## [5] deconvR_1.4.3     data.table_1.14.6 knitr_1.41        BiocStyle_2.26.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] rsq_2.5                     BiocFileCache_2.6.0
    ##   [3] plyr_1.8.8                  methylKit_1.24.0
    ##   [5] splines_4.2.2               BiocParallel_1.32.4
    ##   [7] GenomeInfoDb_1.34.4         ggplot2_3.4.0
    ##   [9] digest_0.6.30               htmltools_0.5.3
    ##  [11] fansi_1.0.3                 magrittr_2.0.3
    ##  [13] memoise_2.0.1               tzdb_0.3.0
    ##  [15] limma_3.54.0                readr_2.1.3
    ##  [17] Biostrings_2.66.0           annotate_1.76.0
    ##  [19] matrixStats_0.63.0          R.utils_2.12.2
    ##  [21] askpass_1.1                 bdsmatrix_1.3-6
    ##  [23] siggenes_1.72.0             prettyunits_1.1.1
    ##  [25] colorspace_2.0-3            rappdirs_0.3.3
    ##  [27] blob_1.2.3                  xfun_0.35
    ##  [29] crayon_1.5.2                RCurl_1.98-1.9
    ##  [31] jsonlite_1.8.3              lme4_1.1-31
    ##  [33] genefilter_1.80.1           GEOquery_2.66.0
    ##  [35] survival_3.4-0              glue_1.6.2
    ##  [37] gtable_0.3.1                nnls_1.4
    ##  [39] zlibbioc_1.44.0             XVector_0.38.0
    ##  [41] DelayedArray_0.24.0         Rhdf5lib_1.20.0
    ##  [43] BiocGenerics_0.44.0         HDF5Array_1.26.0
    ##  [45] scales_1.2.1                mvtnorm_1.1-3
    ##  [47] DBI_1.1.3                   rngtools_1.5.2
    ##  [49] Rcpp_1.0.9                  progress_1.2.2
    ##  [51] xtable_1.8-4                emdbook_1.3.12
    ##  [53] bumphunter_1.40.0           bit_4.0.5
    ##  [55] proxy_0.4-27                mclust_6.0.0
    ##  [57] preprocessCore_1.60.0       stats4_4.2.2
    ##  [59] httr_1.4.4                  RColorBrewer_1.1-3
    ##  [61] ellipsis_0.3.2              pkgconfig_2.0.3
    ##  [63] reshape_0.8.9               XML_3.99-0.13
    ##  [65] R.methodsS3_1.8.2           dbplyr_2.2.1
    ##  [67] sass_0.4.4                  locfit_1.5-9.6
    ##  [69] utf8_1.2.2                  tidyselect_1.2.0
    ##  [71] rlang_1.0.6                 reshape2_1.4.4
    ##  [73] AnnotationDbi_1.60.0        munsell_0.5.0
    ##  [75] tools_4.2.2                 cachem_1.0.6
    ##  [77] cli_3.4.1                   generics_0.1.3
    ##  [79] RSQLite_2.2.19              fastseg_1.44.0
    ##  [81] evaluate_0.18               stringr_1.5.0
    ##  [83] fastmap_1.1.0               yaml_2.3.6
    ##  [85] bit64_4.0.5                 beanplot_1.3.1
    ##  [87] scrime_1.3.5                purrr_0.3.5
    ##  [89] KEGGREST_1.38.0             nlme_3.1-160
    ##  [91] doRNG_1.8.2                 sparseMatrixStats_1.10.0
    ##  [93] nor1mix_1.3-0               R.oo_1.25.0
    ##  [95] xml2_1.3.3                  biomaRt_2.54.0
    ##  [97] compiler_4.2.2              filelock_1.0.2
    ##  [99] curl_4.3.3                  png_0.1-8
    ## [101] e1071_1.7-12                tibble_3.1.8
    ## [103] bslib_0.4.1                 stringi_1.7.8
    ## [105] GenomicFeatures_1.50.2      minfi_1.44.0
    ## [107] lattice_0.20-45             Matrix_1.5-3
    ## [109] nloptr_2.0.3                multtest_2.54.0
    ## [111] vctrs_0.5.1                 pillar_1.8.1
    ## [113] lifecycle_1.0.3             rhdf5filters_1.10.0
    ## [115] BiocManager_1.30.19         jquerylib_0.1.4
    ## [117] bitops_1.0-7                rtracklayer_1.58.0
    ## [119] GenomicRanges_1.50.1        qvalue_2.30.0
    ## [121] R6_2.5.1                    BiocIO_1.8.0
    ## [123] bookdown_0.30               IRanges_2.32.0
    ## [125] codetools_0.2-18            boot_1.3-28.1
    ## [127] MASS_7.3-58.1               gtools_3.9.4
    ## [129] assertthat_0.2.1            rhdf5_2.42.0
    ## [131] SummarizedExperiment_1.28.0 openssl_2.0.4
    ## [133] rjson_0.2.21                Deriv_4.1.3
    ## [135] GenomicAlignments_1.34.0    Rsamtools_2.14.0
    ## [137] S4Vectors_0.36.1            GenomeInfoDbData_1.2.9
    ## [139] hms_1.1.2                   quadprog_1.5-8
    ## [141] grid_4.2.2                  minqa_1.2.5
    ## [143] tidyr_1.2.1                 coda_0.19-4
    ## [145] base64_2.0.1                class_7.3-20
    ## [147] rmarkdown_2.18              DelayedMatrixStats_1.20.0
    ## [149] illuminaio_0.40.0           MatrixGenerics_1.10.0
    ## [151] bbmle_1.0.25                numDeriv_2016.8-1.1
    ## [153] Biobase_2.58.0              restfulr_0.0.15

    stopCluster(cl)