![]() |
How to extract Common Genes from 2 spreadsheets
Now I have two Excel spreadsheets, parts of them are as below:
Spreadsheet1 Gene Change Padj 1 212 0.0006 2 99 0.09 3 15 0.7 4 59 0.456 5 418 0.00001 6 566 0 Spreadsheet2 Gene Statistic FDR 1 28 0.0005 2 17 0.007 3 3 0.81 4 8 0.28 5 48 0.002 6 111 0 Using Excel, how can I create one new spreadsheet that only includes the Genes with both Padj and FDR are less than 0.05? And how can I do this in any other statsitical software, Like R, SPSS? Thanks very much for any idea for any question! |
This is cake in R...
Depending on how large the datasets are, read them into R. The example below (using read.table) is just for using the clipboard in MacOSX (highlight in excel, copy, then run that line). The equiv in windows is read.table("clipboard",sep='\t',header=TRUE). Code:
> df1 <- read.table(pipe("pbpaste"),header=TRUE) |
Thanks ECO, I run the similar codes in R, too. And I can get the result like yours Just based on the Spreadsheets showed in this thread. Sorry for not telling more info about my data:But I have more Genes(37970) in Spreadsheet2 than Spreadsheet1 (17980). It supposed to have 17980 Genes left after merging [the 19990(37970-17980) Genes which only in Spreadsheet2 will not appear in the merged sheets]. Unfortunately, it messed up after merging. Any idea will be greatly appreciated.
Quote:
|
Just need to tell merge what to do...(note I added two extra genes into df1)
Code:
> df1 |
Thanks again ECO. Yes, I like using R too and I have figured it out.
Quote:
|
All times are GMT -8. The time now is 05:19 PM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.