Skip to contents

This function computes the entropy of a counts matrix from a MoleculeExperiment object based on the given assay type.

Usage

EntropyMatrix(me, featureTypes, nCores = 1, ...)

Arguments

me

A MoleculeExperiment object.

featureTypes

A character string specifying the feature type. Supported values include "subsector", "subconcentric", "supersector", and "superconcentric".

nCores

Number of cores

...

arguments passing to CountsMatrix

Value

A matrix representing the entropy values corresponding to the given assay type.

Examples

data(example_me)
me <- loadBoundaries(me)
ent <- EntropyMatrix(me, c("subsector", "subconcentric",
"supersector", "superconcentric"), nCores = 1)
lapply(ent, head, n = 4)
#> $subsector
#>               sample1.67500 sample1.67512 sample1.67515 sample1.67521
#> 2010300C02Rik     0.5623351     0.6931472     0.6365142     0.6931472
#> Acsbg1            0.6931472     0.6931472     0.6931472     0.0000000
#> Adamts2           0.0000000     0.0000000     0.0000000     0.0000000
#> Adamtsl1          0.0000000     0.0000000     0.0000000     0.0000000
#>               sample1.67527 sample2.65043 sample2.65044 sample2.65051
#> 2010300C02Rik             0             0             0     0.0000000
#> Acsbg1                    0             0             0     0.6931472
#> Adamts2                   0             0             0     0.0000000
#> Adamtsl1                  0             0             0     0.0000000
#>               sample2.65055 sample2.65063 sample2.65064 sample2.65067
#> 2010300C02Rik     1.5498260             0     0.6931472             0
#> Acsbg1            0.6931472             0     0.0000000             0
#> Adamts2           0.0000000             0     0.0000000             0
#> Adamtsl1          0.0000000             0     0.0000000             0
#>               sample2.65070 sample2.65071
#> 2010300C02Rik             0     0.0000000
#> Acsbg1                    0     0.6931472
#> Adamts2                   0     0.0000000
#> Adamtsl1                  0     0.0000000
#> 
#> $subconcentric
#>               sample1.67500 sample1.67512 sample1.67515 sample1.67521
#> 2010300C02Rik     0.5623351     0.6931472     0.6365142             0
#> Acsbg1            0.6931472     0.0000000     0.6931472             0
#> Adamts2           0.0000000     0.0000000     0.0000000             0
#> Adamtsl1          0.0000000     0.0000000     0.0000000             0
#>               sample1.67527 sample2.65043 sample2.65044 sample2.65051
#> 2010300C02Rik             0             0             0             0
#> Acsbg1                    0             0             0             0
#> Adamts2                   0             0             0             0
#> Adamtsl1                  0             0             0             0
#>               sample2.65055 sample2.65063 sample2.65064 sample2.65067
#> 2010300C02Rik     1.2770343             0     0.6931472             0
#> Acsbg1            0.6931472             0     0.0000000             0
#> Adamts2           0.0000000             0     0.0000000             0
#> Adamtsl1          0.0000000             0     0.0000000             0
#>               sample2.65070 sample2.65071
#> 2010300C02Rik             0             0
#> Acsbg1                    0             0
#> Adamts2                   0             0
#> Adamtsl1                  0             0
#> 
#> $supersector
#>               sample1.67500 sample1.67512 sample1.67515 sample1.67521
#> 2010300C02Rik             0      1.332179     0.6931472     0.6931472
#> Acsbg1                    0      0.000000     0.6931472     0.6931472
#> Adamts2                   0      0.000000     0.0000000     0.0000000
#> Adamtsl1                  0      0.000000     0.0000000     0.0000000
#>               sample1.67527 sample2.65043 sample2.65044 sample2.65051
#> 2010300C02Rik             0     0.5623351      1.039721     0.5982696
#> Acsbg1                    0     0.0000000      0.000000     0.9502705
#> Adamts2                   0     0.0000000      0.000000     0.0000000
#> Adamtsl1                  0     0.0000000      0.000000     0.0000000
#>               sample2.65055 sample2.65063 sample2.65064 sample2.65067
#> 2010300C02Rik      0.000000     0.6931472             0     0.0000000
#> Acsbg1             1.559581     1.0114043             0     0.6931472
#> Adamts2            0.000000     0.0000000             0     0.0000000
#> Adamtsl1           0.000000     0.0000000             0     0.0000000
#>               sample2.65070 sample2.65071
#> 2010300C02Rik     0.0000000     0.0000000
#> Acsbg1            0.5623351     0.6365142
#> Adamts2           0.0000000     0.0000000
#> Adamtsl1          0.0000000     0.0000000
#> 
#> $superconcentric
#>               sample1.67500 sample1.67512 sample1.67515 sample1.67521
#> 2010300C02Rik     1.5607104       1.05492     0.6931472     0.0000000
#> Acsbg1            0.6931472       0.00000     0.6931472     0.6931472
#> Adamts2           0.0000000       0.00000     0.0000000     0.0000000
#> Adamtsl1          0.0000000       0.00000     0.0000000     0.0000000
#>               sample1.67527 sample2.65043 sample2.65044 sample2.65051
#> 2010300C02Rik     0.0000000      1.039721      1.386294      1.549826
#> Acsbg1            0.6931472      0.000000      0.000000      1.054920
#> Adamts2           0.0000000      0.000000      0.000000      0.000000
#> Adamtsl1          0.0000000      0.000000      0.000000      0.000000
#>               sample2.65055 sample2.65063 sample2.65064 sample2.65067
#> 2010300C02Rik     0.6931472     0.6931472      1.386294     0.0000000
#> Acsbg1            1.3208883     1.3296613      0.000000     0.6931472
#> Adamts2           0.0000000     0.0000000      0.000000     0.0000000
#> Adamtsl1          0.0000000     0.0000000      0.000000     0.0000000
#>               sample2.65070 sample2.65071
#> 2010300C02Rik     0.6931472     0.0000000
#> Acsbg1            0.6931472     0.6365142
#> Adamts2           0.0000000     0.0000000
#> Adamtsl1          0.0000000     0.0000000
#>