Entering edit mode
Hi,
I am new to R and DESeq2 package for RNAseq analysis. I am trying to analyze the read counts of 2 samples (M1, M2) as 3 biological triplicates (M11, M12, M13 and M21, M22, M23). I read the files into R as .csv but when I try to create a dds I get the following error. Could you please help me? Is something wrong with my data format?
> Read_Counts <- read.csv("Read Counts.csv", header = TRUE)
> head(Read_Counts)
ï..Gene_ID SP_18 SP_23 SP_28 SP_20 SP_25 SP_30
1 ENSG00000000003 88 45 30 70 100 151
2 ENSG00000000419 604 920 828 905 596 1047
3 ENSG00000000457 258 242 153 252 119 135
4 ENSG00000000460 77 70 51 152 76 75
5 ENSG00000000938 3074 3672 2948 5560 5434 7641
6 ENSG00000000971 4521 115 55 42 1 0
> Meta_Data <- read.csv("Meta Data.csv", header = TRUE)
> head(Meta_Data)
ï..Sample_ID Condition CellType
1 SP_18 M1_1 M1
2 SP_23 M1_2 M1
3 SP_28 M1_3 M1
4 SP_20 M2_1 M2
5 SP_25 M2_2 M2
6 SP_30 M2_3 M2
> dds <- DESeqDataSetFromMatrix(countData = Read_Counts, colData = Meta_Data, design = ~ CellType)
Error in DESeqDataSetFromMatrix(countData = Read_Counts, colData = Meta_Data, :
ncol(countData) == nrow(colData) is not TRUE.
Hi. Thank you so much. I did as you suggested and it worked.