making limma design matrix with covariates, a strange labelling issue?
0
0
Entering edit mode
2.4 years ago
RNAseqer ▴ 180

Hello everyone,

I'm perplexed by something. I was looking at working on a model matrix and how to set it up for limma. I was using as a general guide a post from the bioconductor website https://support.bioconductor.org/p/86166/ whose design matrix which includes a continuous numeric value in Age, and they use the following command to setup their matrix:

design <- model.matrix(~0 + f + Sampling_location + as.numeric(Age) + Site + Gender, targets)

head(design)

> head(design)
  fC_1 fC_2 fCP_1 fCP_2 fN_1 fN_2 Sampling_locationS_2 Sampling_locationS_3 Age Sitebuttocks Siteleg Sitethigh GenderMale...

The model contains all the usual 1s 0s and numbers as you would expect. But whats curious to me is the labels of these columns. When I attempt the same command using my own data

> design <- model.matrix(~0 + f + as.numeric(Age),  sampleinfo.df)
> design
   fCNT fDIS fTE as.numeric(Age)
1     1     0   0              27
2     1     0   0              28
3     1     0   0              22
4     1     0   0              26

As you can see I too get an 'f' appended to some column headers, but 'as.numeric(Age)' is now the header for the Age column (which leads me to worry all I have done here is substitute a column header, rather than actually tell limma to treat that columns contents as a numeric covariate). Why would this be? Whats going wrong here?

limma design matrix labels columns • 892 views
ADD COMMENT

Login before adding your answer.

Traffic: 2017 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6