Question: Designing a matrix for multivariate analysis in R
1
gravatar for Camilo
15 days ago by
Camilo10
Chile
Camilo10 wrote:

Hello everyone!

I'm a basic R user and I have to design a matrix to get DEGs from a library that has approximately 33000 genes. This library has 3 different factors: genotype (2 levels), treatment (2 levels) and tissue (2 levels, which are roots and stems).

I'm interested in obtaining the differentially expressed genes between, let's say "treatment vs control", for each tissue.

I've been using the model.matrix function like this:

# To evaluate each factor separately:

design.matrix.roots <- model.matrix(~ genotype+treatment, data = mydf_roots$metadata)
design.matrix.stems <- model.matrix(~ genotype+treatment, data = mydf_stems$metadata)

# To evaluate the interaction between factors:

design.matrix.roots <- model.matrix(~ genotype*treatment, data = mydf_roots$metadata)
design.matrix.stems <- model.matrix(~ genotype*treatment, data = mydf_stems$metadata)

The problem is that, to be honest, I am not entirely sure if what I'm doing is correct or wrong, as I sometimes get NULL when trying to get DEGs between roots and treatment, for example. Also, the number of DEGs I get from the interaction is very very low; no more than 5.

Is there another way I can do this? Or am I doing the coding wrong?

Thanks!

P.S. Sorry for my writing, my main language is actually spanish :)

rna-seq R gene • 106 views
ADD COMMENTlink modified 15 days ago • written 15 days ago by Camilo10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2180 users visited in the last hour