![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DESeq2: struggle to add multiple variables to DESeqDataSet | JonB | Bioinformatics | 4 | 06-09-2014 02:00 PM |
DESeq2 multiple levels | id0 | Bioinformatics | 3 | 05-30-2014 12:31 PM |
Are Cuffdiff q-values and p-values reliable when multiple treatments are analyzed? | gwilymh | Bioinformatics | 1 | 03-16-2014 12:32 PM |
Creating a data.frame for DESeq2 | KHubbard | Bioinformatics | 3 | 10-12-2013 12:16 AM |
cummeRbund andplotting for selected treatments among multiple treatments | ataheri | RNA Sequencing | 1 | 04-10-2013 07:41 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: Toronto Join Date: May 2012
Posts: 18
|
![]()
I have a text file, containing read counts per gene for each treatments and control, with the following column
[Gene Symbol] [C1] [C2] [C3] [A1] [A2] [A3] [B1] [B2] [B3]
When I do data.frame it generates an error Code:
library( "DESeq2" ) library("Biobase") mydata = read.table("matrix.txt", header=TRUE) col1 <- mydata[,1] ## Error message ExpDesign = data.frame(row.names=col1, condition=c("C", "C", "C", "A", "A", "A", "B", "B", "B") Error in data.frame(row.names = col1, condition = c("C", "C", "C", "A", : row names supplied are of the wrong length Code:
countdata <- assay( mydata ) head( countdata ) coldata <- colData( mydata ) rownames( coldata ) <- coldata$run colnames( countdata ) <- coldata$run head( coldata[ , c("C", "C", "C", "A", "A", "A", "B", "B", "B") ] ) I think the problem comes from the fact that I should subset my data, though I have no clue how to do to that. Any suggestions on where is the error message coming from and how to subset data? (If I should ever subset that.. ![]() Last edited by KYR; 07-15-2014 at 11:57 PM. Reason: typo |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: Boston Join Date: Jul 2013
Posts: 333
|
![]()
This is your countData, which has as many rows as genes:
Code:
mydata = read.table("matrix.txt", header=TRUE) col1 <- mydata[,1] Code:
ExpDesign = data.frame(row.names=col1, condition=c("C", "C", "C", "A", "A", "A", "B", "B", "B") So the error comes when you try to name the rows of your colData using the gene names in col1. You will also get an error later when you try to run Code:
assay( mydata ) Code:
as.matrix( mydata ) |
![]() |
![]() |
![]() |
#3 | ||
Junior Member
Location: USA Join Date: Mar 2019
Posts: 4
|
![]()
Hi,
I followed your advice and tried to import as a matrix. But when I try to set up col.data I still get an error This is my code Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#4 | |||
Junior Member
Location: USA Join Date: Mar 2019
Posts: 4
|
![]() Quote:
I followed your advice and tried to import as a matrix. But when I try to set up col.data I still get an error This is my code Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
Tags |
deseq2 |
Thread Tools | |
|
|