Skip to contents

Normalise barcode counts within a DGEList object

Usage

normaliseCounts(dgeObject, method = "CPM", threshold = 0)

Arguments

dgeObject

DGEList object with barcode counts.

method

method of normalization. One of `CPM`, `TMM`, `TMMwsp`, `upperquartile` or `RLE` (string). See `edgeR::calcNormFactors()`.

threshold

Threshold to apply to counts before normalisation (integer). Default = `0`.

Value

Returns a DGEList object containing normalised barcode counts

Examples

data(test.dge)
normaliseCounts(test.dge, method = "CPM", threshold = 0)
#> An object of class "DGEList"
#> $samples
#>       Sample Experiment        Group PCR_Replicate Treatment        group
#> T0-1    T0-1    test_01           T0             1        T0           T0
#> T0-2    T0-2    test_01           T0             2        T0           T0
#> S10-1  S10-1    test_01 10_High_dose             1 High_dose 10_High_dose
#> S10-2  S10-2    test_01 10_High_dose             2 High_dose 10_High_dose
#> S11-1  S11-1    test_01   11_Vehicle             1   Vehicle   11_Vehicle
#>       lib.size norm.factors
#> T0-1   3584606            1
#> T0-2   3349340            1
#> S10-1  4114186            1
#> S10-2  4196458            1
#> S11-1  2907500            1
#> 33 more rows ...
#> 
#> $counts
#>         Samples
#> Tags          T0-1      T0-2 S10-1 S10-2 S11-1 S11-2 S12-1 S12-2 S13-1 S13-2
#>   BC_1    48.81987  23.58674     0     0     0     0     0     0     0     0
#>   BC_13  406.73926 249.00428     0     0     0     0     0     0     0     0
#>   BC_99  322.21114 463.97201     0     0     0     0     0     0     0     0
#>   BC_120  79.50665  54.93620     0     0     0     0     0     0     0     0
#>   BC_351   0.00000   0.00000     0     0     0     0     0     0     0     0
#>         Samples
#> Tags     S14-1 S14-2 S15-1 S15-2 S16-1 S16-2 S17-1 S17-2 S18-1 S18-2     S1-1
#>   BC_1       0     0     0     0     0     0     0     0     0     0  0.00000
#>   BC_13      0     0     0     0     0     0     0     0     0     0  0.00000
#>   BC_99      0     0     0     0     0     0     0     0     0     0 30.45571
#>   BC_120     0     0     0     0     0     0     0     0     0     0  0.00000
#>   BC_351     0     0     0     0     0     0     0     0     0     0  0.00000
#>         Samples
#> Tags         S1-2 S2-1 S2-2 S3-1 S3-2 S4-1 S4-2 S5-1 S5-2 S6-1 S6-2 S7-1 S7-2
#>   BC_1    0.00000    0    0    0    0    0    0    0    0    0    0    0    0
#>   BC_13   0.00000    0    0    0    0    0    0    0    0    0    0    0    0
#>   BC_99  50.22587    0    0    0    0    0    0    0    0    0    0    0    0
#>   BC_120  0.00000    0    0    0    0    0    0    0    0    0    0    0    0
#>   BC_351  0.00000    0    0    0    0    0    0    0    0    0    0    0    0
#>         Samples
#> Tags     S8-1 S8-2 S9-1 S9-2
#>   BC_1      0    0    0    0
#>   BC_13     0    0    0    0
#>   BC_99     0    0    0    0
#>   BC_120    0    0    0    0
#>   BC_351    0    0    0    0
#> 1634 more rows ...
#>