How do I grab the log2fc RNA-seq data from a defined list of genes?
1
0
Entering edit mode
4.6 years ago
persimmon ▴ 20

Hello, I'm new to RNA-seq and R and what I need to do seems easy enough but I can't find answers. I have a log2fc matrix of >60k gene rows and 9 columns for n=3 reps of conditions. This file is called "allnoig"

    > head(allnoig)
                          a.1           a.2          a.3           b.1
DDX11L1         -0.0009149667 -0.0003525518  0.007609285 -0.0006162814
WASH7P           0.0122970288 -0.0255903899  0.077002423  0.0658547244
MIR6859-1       -0.2469086552 -0.2163589684 -0.057892591  0.0041760959

This goes all the way to c.3. I have a list of ~70 genes that I would like to extract the row informations for. I have entered the 70 genes into a new .cvs and it's called "list"

head(list)
        Symbol
    1   ABTB2
    2 ANGPTL4
    3    ATF3
    4   BATF3

I've tried

subsetlist <- subset(allnoig, row.names %in% list)

and I get the error "Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments"

Please help!

RNA-Seq R • 677 views
ADD COMMENT
1
Entering edit mode

Hurray! Thank you so much.

ADD REPLY
1
Entering edit mode
4.6 years ago

Hey,

Either of these should work:

allnoig[which(rownames(allnoig) %in% list$Symbol),]

allnoig[which(rownames(allnoig) %in% list[,1]),]

If order is important, then use:

allnoig[match(list[,1], rownames(allnoig)),]

Kevin

ADD COMMENT

Login before adding your answer.

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