Question: I need to create a volcano plot from the result from RStudio using DESeq (which are the top 15 differentially expressed genes ranked by their
I need to create a volcano plot from the result from RStudio using DESeq (which are the top 15 differentially expressed genes ranked by their p-values), but it gives me errors. This is what I have. Thank you.
> y<-as.matrix(read.table("RNAseq_data_noreplicate.txt",header=TRUE,row.names = "Gene")) > groups=c("c","T") > d<-newCountDataSet(y,groups) > d<-estimateSizeFactors(d) > d<-estimateDispersions(d,method='blind',sharingMode="fit-only") > res<-nbinomTest(d,"c","T")
>d=calcNormFactors(d)
> ms<-exactTest(d,dispersion = 0.04) > result=topTags(ms,n=15,adjust.method = "fdr") > result Comparison of groups: Tr-Ctr logFC logCPM PValue FDR AT3G46280 4.709795 7.920172 1.227403e-21 1.567781e-17 AT5G48850 -5.036962 6.099570 2.188583e-21 1.567781e-17 AT2G19190 5.092119 6.222926 2.519500e-21 1.567781e-17 AT5G48430 5.698262 5.445170 2.937433e-21 1.567781e-17 AT2G39200 5.307080 5.515388 2.154720e-20 9.200225e-17 AT2G44370 6.001340 4.776407 1.789605e-19 6.367713e-16 AT1G02930 4.226041 7.522179 2.232250e-18 6.808043e-15 AT3G49570 -4.513474 5.740187 2.667558e-18 7.118711e-15 AT2G17740 4.641741 5.574509 5.768119e-18 1.307516e-14 AT2G14610 4.642894 5.651985 6.643867e-18 1.307516e-14 AT3G49580 -4.197335 6.768107 6.736930e-18 1.307516e-14 AT1G51800 4.226812 6.717490 1.217759e-17 2.106991e-14 AT2G44460 -4.500349 5.418044 1.283005e-17 2.106991e-14 AT1G51820 5.866348 4.256944 1.062058e-16 1.619563e-13 AT1G51850 4.443713 5.463830 1.255678e-16 1.787164e-13 > logfc=result[,2] > logpvalue=-log2(result[,3]) Error in log(list(table = list(PValue = c(1.22740258484106e-21, 2.18858338479257e-21, : unused argument (2) > logpvalue=log2(results[,3]) Error: object 'results' not found > logpvalue=-log2(results[,3]) Error: object 'results' not found > ms<-exactTest(d,dispersion = 0.04) > logfc=ms$table$logFC > logpvalue=-log2(ms$table$PValue) > plot(logfc,logpvalue) Error in plot.new() : figure margins too large > ms<-exactTest(d,dispersion = 0.04) > result=topTags(ms,n=15,adjust.method = "fdr") > logfc=result[,2] > logpvalue=-log(result[,3]) Error in log(result[, 3]) : non-numeric argument to mathematical function > logpvalue=-log,2(result[,3]) Error: unexpected ',' in "logpvalue=-log," > logpvalue=-log1(result[,3]) Error in log1(result[, 3]) : could not find function "log1" > logpvalue=-log2(result[,3]) Error in log(list(table = list(PValue = c(1.22740258484106e-21, 2.18858338479257e-21, : unused argument (2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
