sorting columns by same values to do DEG analysis
1
0
Entering edit mode
6.0 years ago
dllopezr ▴ 130

Hi community!

I am working with metagenomic output from MG-RAST, but the columns don't match and I need to solve this before doing my DeSEQ analysis. The table is something like this

GeneName Count GeneName Count GeneName Count GeneName Count
GeneA       x  GeneB      x   GeneA    x     GeneA     x

The Genes could be present for all, three, two or only one treatment. I need a way to sorting the columms to match by gene name.

Do you know any way to do this in r or excel?

Thank you so much!

sorting columns differential expression • 1.3k views
ADD COMMENT
0
Entering edit mode

All genes present in all samples ? means the number of genes is same in all samples? If yes, then go for an A-Z or Z-A sorting.

ADD REPLY
0
Entering edit mode

Hello,

I don't understand the criteria for your sorting. But the standard tool for sorting text file is sort

fin swimmer

ADD REPLY
0
Entering edit mode
6.0 years ago
Fabio Marroni ★ 3.0k

Looks like you have a file that derives from merging the genes observed in 4 samples.

In R: split the four sets (column 1-2, column 3-4, column 5-6, column 7-8) and then use the merge command to merge by gene name.

In Excel: merge the 4 lists carrying the genes and remove duplicates (so that you have all the genes observed, and only once), and then you can either use the vlookup function or build a pivot table.

ADD COMMENT

Login before adding your answer.

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