colData and design problem
1
0
Entering edit mode
@soheilazareie-15508
Last seen 6.0 years ago
Canada, Vancouver, University of Britis…

Hello,

I would really appreciate if someone helps me understand my code better,

I need help with writing design formulas/matrix

is my coldata correct?...

 I have 35 samples. Two different type of cell lines (which 2 or 3 of them have technical replicates as well) + control. 

ac=15, dc=16, control=5

I would like to know what are the genes differentially expressed across two cell lines as well as comparing them with control. 

my question is how should I make my formula for design to be able to comapre all samples against each other, like acianr versus control, ductal versuse acianr and ductal versus control,

here is my codes (DESeq.ds doesnt work),

read.counts<-read.csv("Data/ReadcountsC.csv", header = TRUE)
read_counts <- read.counts[,-1]
row.names(read_counts) <- read.counts[,1]
rownames(read_counts)
colnames(read_counts)
coldata<-read.csv("Data/phynotypeC.csv")
coldata=factor(coldata)
coldata = factor(coldata$treatment,levels = c("control", "Aci", "Duc"))
coldata
DESeq.ds <- DESeqDataSetFromMatrix ( countData = read_counts ,
                                          colData = coldata_q,
                                          design = ~ condition )

Note:

here is my excel file for coldata

condition treatment
Aci AC1
Aci AC2
Aci AC3
Aci AC4
Aci AC5
Aci AC6
Aci AC7
Aci AC8
Aci AC9
Aci AC10
Aci AC11
Aci AC12
Aci AC13
Aci AC14
Aci AC15
Duc DC1
uninjected ctrl1
Duc DC3
uninjected ctrl2
Duc DC5
Duc DC6
Duc DC7
uninjected ctrl3
Duc DC9
Duc DC10
Duc DC11
Duc DC12
Duc DC13
Duc DC14
Duc DC15
Duc DC16
uninjected ctrl4
Duc DC18
Duc DC19
Duc DC20
uninjected ctrl5
deseq2 • 1.4k views
ADD COMMENT
0
Entering edit mode

Please post the error message if you had one.

ADD REPLY
0
Entering edit mode

Thanks for the reply.

here is one of the errors,

Error in `rownames<-`(`*tmp*`, value = colnames(countData)) : 
  attempt to set 'rownames' on an object with no dimensions

However, it looks like the above code now is working,

but the other problem that I have had is this code: plotMA (DGE.resultsa , alpha = 0.05 , main = "control vs. Ductal ", 
        ylim = c( -4 ,4))

Warning messages:
1: In plot.window(...) : "alpha" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "alpha" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
  "alpha" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
  "alpha" is not a graphical parameter
5: In box(...) : "alpha" is not a graphical parameter
6: In title(...) : "alpha" is not a graphical parameter

 

NOTE: we are interested in seeing which genes are differentially expressed in our Ac versus DC samples compared to control(uninjected ones) and the same thing for control Vs Acinar and Ductal, so I am trying to use this code: res <- DGE.resultsa( coldata, contrast = c("condition", "Acinar", "Ductal") ), but again gives me this error:   could not find function "DGE.resultsa", and not sure if the code is correct.

Thanks,

ADD REPLY
0
Entering edit mode

You can only use functions that are defined in the package. So results() is a function exported by DESeq2, and you can use that function, but there is no such function "DGE.resultsa". That's why R is telling you it can't find this function. 

ADD REPLY
0
Entering edit mode
swbarnes2 ★ 1.4k
@swbarnes2-14086
Last seen 4 hours ago
San Diego

That treatment column is not helping.  Get rid of it.  If your control really is different form the uninjected, having only one isn't going to be very useful.

ADD COMMENT

Login before adding your answer.

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