I'm currently doing differential gene expression analysis on Nanostring data.
For this I'm using the package NanostringDiff.
I try to detect the effect of a treatment vs the absence of treatment on a set of ex vivo biopsies samples.
Due to strong heterogeneity between individuals, the "sample" effect is much stronger than the "treatment" effect (gene response is close between treated and non treated for the same sample, and very different from the response of treated and non treated of other samples).
To take that into account I think I need to put the "sample" variable as a confounding factor.
With my small statistical background, I haven't been able to implement this kind of analysis with NanoStringDiff, even after reading the vignette.
If I understand correctly maybe the design would be like this :
pheno=pData(nanostring_data) treatment=pheno$treatment sample_ID=pheno$sample_ID design.full=model.matrix(~sample_ID+treatment) design.full (Intercept) sample_1 sample_2 sample_3 Treatment 1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 1 0 0 1 1
But I'm not sure which "contrast" and "Beta" parameters I should give to the glm.LRT() function that come after that to do the differential expression analysis.
If anyone knows how to use NanoStringDiff with a confounding factor, or have an alternative solution for doing that I would be very grateful to hear from you.