DESeq2 - Changing the order of counts / metadata
0
0
Entering edit mode
19 days ago

Dear team,

Sorry to ask a basic questions but i m getting an error in RStudio:

Error in DESeqDataSetFromMatrix(countData = counts, colData = metadata,  : 
  rownames of the colData:
   SRR1979370,SRR1979371,SRR1979372,SRR1979373,SRR1979374,SRR1979375 
  are not in the same order as the colnames of the countData:
   SRR1979370,SRR1979372,SRR1979375,SRR1979374,SRR1979373,SRR1979371

Please may i know code to change the order so that i can then run this using:

dds <- DESeqDataSetFromMatrix(countData=counts, colData=metadata, design=~genotype)

Thank you,

Himan

counts metadata DESeq2 • 1.3k views
ADD COMMENT
0
Entering edit mode

What is unclear about these two lines not being in the same order?

SRR1979370,SRR1979371,SRR1979372,SRR1979373,SRR1979374,SRR1979375

SRR1979370,SRR1979372,SRR1979375,SRR1979374,SRR1979373,SRR1979371

It appears that you need to match counts and metadata.

ADD REPLY
0
Entering edit mode

You can do something like

colData <- colData[colnames(countData), ]

to bring those two in the same order.

ADD REPLY
0
Entering edit mode

Thank you..

ADD REPLY

Login before adding your answer.

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