View Single Post
Old 03-11-2019, 11:51 AM   #14
rookie_genomics
Junior Member
 
Location: USA

Join Date: Mar 2019
Posts: 4
Default

Hi

I just started using deseq2 for DE analysis
I have an excel sheet input with gene names followed by 16 columns with reads.
I tried to generate a matrix using this file and I keep getting an error similar to that is mentioned here
So this is what is happening

Quote:
analysis2 <- as.matrix(deseq2_analysis2)
(condition <- factor(c(rep("group1", 4), rep("group2", 4), rep("group3", 4), rep("group4", 4))))
group1 group1 group1 group1 group2 group2 group2 group2 group3 group3 group3 group3 group4
group4 group4 group4
Levels: group1 group2 group3 group4
(coldata <- data.frame(row.names=colnames(analysis2), condition))
Error in data.frame(row.names = colnames(analysis2), condition) :
row names supplied are of the wrong length
What am I doing wrong? I want an output that is sorted by gene names

This is the output of the head command

Quote:
head(analysis2)
gene.name Sample1_group1 Sample2_group1 Sample3_group1 Sample4_group1 Sample1_group2
[1,] "YAL068C" " 0" " 0" " 0" " 0" " 2"
[2,] "YAL067W-A" " 0" " 0" " 0" " 0" " 0"
[3,] "YAL067C" " 243" " 242" " 109" " 130" " 271"
[4,] "YAL065C" " 16" " 7" " 52" " 30" " 23"
[5,] "YAL064W-B" " 23" " 21" " 21" " 33" " 11"
[6,] "YAL064C-A" " 38" " 42" " 76" " 88" " 47"
Sample2_group2 Sample3_group2 Sample4_group2 Sample1_group3 Sample2_group3 Sample3_group3
[1,] " 0" " 2" " 0" " 0" " 1" " 6"
[2,] " 0" " 2" " 0" " 0" " 0" " 0"
[3,] " 233" " 132" " 150" " 228" " 212" " 174"
[4,] " 10" " 22" " 46" " 15" " 17" " 46"
[5,] " 28" " 56" " 19" " 19" " 22" " 40"
[6,] " 40" " 44" " 65" " 42" " 35" " 74"
Sample4_group3 Sample1_group4 Sample2_group4 Sample3_group4 Sample4_group4
[1,] " 2" " 0" " 1" " 0" " 0"
[2,] " 0" " 0" " 0" " 0" " 0"
[3,] " 176" " 96" " 73" " 132" " 77"
[4,] " 39" " 18" " 11" " 39" " 27"
[5,] " 27" " 20" " 16" " 26" " 18"
[6,] " 83" " 49" " 23" " 55" " 52"
I am new to R and DE analysis and any help will be appreciated

Last edited by rookie_genomics; 03-11-2019 at 11:58 AM.
rookie_genomics is offline   Reply With Quote