Up/Down Regulated GeneList from edgeR and R
1
0
Entering edit mode
drskm7 • 0
@drskm7-15975
Last seen 6.4 years ago

Hi Guys,

I have used edger and R to get the top gene-list that are up regulated and down, and I am able to export the list of genes significantly differentially expressed.

But I am not able to separate the gene list that is up regulated (+ve LogFC - log Fold change) and down regulated  (-ve LogFC - log Fold change) from the significantly differentially expressed using the below syntax.

Using this

>  geneList  <-  which(de[,1] == 1) and  geneList <- which(de[,1] == -1) 

but I am not able to export the Up/Down regulated gene list file out (write.csv(genelist,file="UP/Down Significant_genes_pvals.csv").

Could any one suggest me anything on this how to export directly ? Two file set with UP and Down regulated gene list.

Could you anyone help me on this how to separate each file with a list of up and down regulated genes using Edger and R.

Thanks a million

San

 

 

edger R Up reg genelist • 6.5k views
ADD COMMENT
0
Entering edit mode

Please read the posting guide and edit your question to be more informative. In particular:

  • What is the "above information"? If you're going to make a reference to an existing post, add the link explicitly.
  • What is de? I can probably guess that it is the output of decideTests, but a good question should not require me to guess your circumstances.
  • What do you want when you export the file? The gene names? Or the gene names and the DE statistics? Your proposed usage of write.csv just saves a set of row indices.
  • What does "make the file in high p-value sorting" mean? Do you want the most significant p-values at the top? Or the largest p-values at the top?
ADD REPLY
0
Entering edit mode

Thanks Aaron

ADD REPLY
0
Entering edit mode

Still not enough information. Again... what is de? How did you generate de? Please - give us some code to look at. I could also repeat my last two questions above, given that you didn't answer them either.

ADD REPLY
4
Entering edit mode
@gordon-smyth
Last seen 6 hours ago
WEHI, Melbourne, Australia

Well, there are a million ways to separate up from down genes in R. Let's assume your DE test results are stored in res. For example, if you are following the edgeR workflow, then you would have run:

res <- glmQLFTest(fit, contrast=B.LvsP)

Just using topTags

Now you can get a table of the top DE genes:

tab <- topTags(res, n=Inf, p=0.05)$table

Then you can split it into up and down if you want:

UpGenes <- tab[ tab$logFC > 0, ]
DownGenes <- tab[ tab$logFC < 0,]

Using decideTests

As I say, there are lots of ways to do this. You could alternatively get tables of up and down genes using decideTests:

de <- decideTests(res)
tab <- topTags(res, n=Inf, sort="none")$table
UpGenes <- tab[de == 1,]
DownGenes <- tab[de == -1,]

This way, however, the UpGenes and DownGenes are not sorted by p-value.

ADD COMMENT
0
Entering edit mode

Fantastic, It work out finally, I checked my list of up regulated and down regulated genes are same as the file I sorted out using your syntax. Great points Gordon Smyth. Thanks a million

ADD REPLY

Login before adding your answer.

Traffic: 577 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