Skip to content

Add unit test to exercise duplicateCorrelation/block support in compare(ttest1, ttest2) #40

@lianos

Description

@lianos

Commit 0b241f1 added the ability to pass in a block parameter when comparing two ttest results, and we need to unit test that.

This came up when comparing sorted positive and negtive XXX cells from a mouse, and comparing their expression profiles back to WT mice.

The individual sorted cells compared to WT were done "normally", however when the results were compared against each other, duplicateCorrelation would be required to obtain the most correct version of the stats we could get.

For example, let's say we ran an experiment similar to the data from this paper, where we had lipid high and low microglia in aged mice vs unsorted microglia from young mice. Each of the aged mice provided two Microglia samples:

lipidhi <- flm_def(samples, "group", "aged_lipid_hi", "young") %>% fdge()
lipidlo <- flm_def(samples, "group", "aged_lipid_lo", "young") %>% fdge()

This would provide dge stats for aged lipd high microglia vs young microglia, and stats for the aged lipid low microglia vs young microglia.

No if we wanted to get stats for lipid hi vs low microglia in the aged mice, you could run that comparison directly, or use compare() to do the same, like:

hi.vs.lo <- flm_def(samples, "group", "aged_lipid_hi", "aged_lipid_lo", block = "subject_id") %>% fdge()
cmp <- compare(lipidhi, lipidlo, block = "subject_id")

Those two comparisons should generate the same statistics.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions