Microarray DEG scatterplot
0
0
Entering edit mode
18 months ago

Hi,

I have found that my selected gene, probe I.D 201667_at is differentially expressed between WDLPS and DDLPS tumour tissue samples after performing microarray DEG analysis.

Instead of just a p value in a table format:

Probe I.D "201667_at" logFC 10.8205874181535 AveExpr 10.6925705768407 t 82.8808890739766 P.Value 3.10189446528995e-88 adj.P Val 3.10189446528995e-88 "B" 191.589248589131

I have decided to present the data as a scatter plot/plot MDS (with an error bar) using expression values of the specific gene between the two tumour types (40 vs 52 samples) to show that it is differentially expressed. So 92 dots/points in total.

The commands I used for microarray differential expression analysis are:

library("arrayQualityMetrics")
library(GEOquery)
library(oligo)
library(Biobase)
library(affy)
library("splitstackshape")
library("tidyr")
library("dplyr")

celFiles <- list.celfiles()
affyRaw <- oligo::rma(affyraw)
eset <- oligo::rma(affyRaw)
library(limma)
pData(eset)
Groups <- c("DDLPS", "DDLPS", "WDLPS", "WDLPS")
design <- model.matrix(~factor(Groups))
colnames(design) <- c("DDLPS", "DDLPSvsWDLPS")
fit <- lmFit(eset, design)
fit <- eBayes(fit)
option (digits =2)
res <- topTable (fit, number = Inf, adjust.method = "none", coef = 1)
write.table(res, "diff_exp.txt", sep= "\t)
require(hgu133a.db)
annotLookup <- select(hgu133a.db, keys = probes,
  columns = c('PROBEID', 'ENSEMBL', 'SYMBOL'))

content <- read_csv(path, col_names = TRUE)

path <- "/Users/mesalie/expressionvalues.csv"
content <- read_csv(path, col_names = TRUE)

ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(Epression value2, Expression value4))) + geom_point(aes(color= factor(gear)))

Error in factor(gear) : object 'gear' not found However I keep getting the following error message for the ggplot function.

the list content is below head (content)

# A tibble: 6 × 4
  DDLPS         `Expression value...2` WDLPS         `Expression value...4`
  <chr>                          <dbl> <chr>                          <dbl>
1 GSM766533.CEL                  10.0  GSM766621.CEL                  11.6 
2 GSM766534.CEL                   9.29 GSM766622.CEL                  10.1 
3 GSM766535.CEL                  10.8  GSM766623.CEL                   9.87
4 GSM766536.CEL                  10.5  GSM766624.CEL                  10.4 
5 GSM766537.CEL                  10.7  GSM766625.CEL                  10.5 
6 GSM766538.CEL                  10.1  GSM766626.CEL                  10.2 

Can anyone please advise me on how I can create the 'gear' object?

Thankyou

microarray scatterplot DEG • 941 views
ADD COMMENT
0
Entering edit mode

There is no gear variable in your content dataset. Replace it with the name of the variable you want as color on your plot.

ADD REPLY
0
Entering edit mode

I have done this and received the following error message:

ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(Epression value2, Expression value4))) + geom_point(aes(color= factor(WDLPS, DDLPS))))

Error: unexpected symbol in "ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(Epression value2"

Do you also know what the unexpected symbol in this command line is?

ADD REPLY
0
Entering edit mode

There are too many brackets in your code line. Please take the time to check the code you run and impregnate about R coding.

ADD REPLY
0
Entering edit mode

Ok thanks for your help! Do you know which brackets to remove?

ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(Epression value2, Expression value4) + geom_point(aes(color= factor(WDLPS, DDLPS))))
ADD REPLY
0
Entering edit mode
ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(`Expression value...2`, `Expression value...4`)) +
         geom_point(aes(color= factor(WDLPS, DDLPS)))

Please be careful with every single code you write, there were plenty of errors in your code, variables that were not called by their correct name, brackets placed at wrong position

ADD REPLY
0
Entering edit mode

Thankyou for your corrections.

I used this command:

ggplot(content, aes(x = log(DDLPS, WDLPS)), y = log(Expression value...2, Expression value...4)) + geom_point(aes(color= factor(WDLPS, DDLPS)))

and got the following error message.

Error in log(DDLPS, WDLPS) : non-numeric argument to mathematical function

Do you know what this means?

ADD REPLY
0
Entering edit mode

Do you think it is possible to take the log of a character variable? Because this is what you are trying to do here. I think you are completely lost in anything you are doing here, I suggest to get in touch with someone that can learn you R programming in your lab/school before attempting to do microarray analysis.

ADD REPLY

Login before adding your answer.

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