This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bioinformatics and pairwise.comparison

I keep getting an error when I run covdesc = read.table("covdesc.txt",sep ="\t") the error is error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 2 element)

and when I remove the (sep="\t") i got another error when I run:

pair<-pairwise.comparison(data.mas5,"sample",
                          c("Melanocytes,control,0h","MelJuSo,control,0h", "UACC903,control,0h", "C8161,control,0h",
                            "Neo6,control,0h","Neo6,control,0h","WM1205,control,0h","WM35,control,0h",
                            "Melanocytes,5AzadC,48h","MelJuSo,5AzadC,48h ", "UACC903,5AzadC,48h", "C8161,5AzadC,48h", 
                            "Neo6,5AzadC,48h",  "WM1205,5AzadC,48h", "WM35,5AzadC,48h"),
                            data.raw)

the error is

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line 1 did not have 2 elements)

I wrote covdesc as follow and it is tab deliminated

sample  cellline  dose  time
GSM230899.CEL.gz    Melanocytes control 0h
GSM230901.CEL.gz    MelJuSo control 0h
GSM230903.CEL.gz    UACC903 control 0h
GSM230905.CEL.gz    C8161 control 0h
GSM230907.CEL.gz    Neo6  control 0h
GSM230909.CEL.gz    WM1205 control 0h
GSM230911.CEL.gz    WM35 control 0h
GSM230900.CEL.gz    Melanocytes 5AzadC 48h 
GSM230902.CEL.gz    MelJuSo 5AzadC 48h 
GSM230904.CEL.gz    UACC903 5AzadC 48h 
GSM230906.CEL.gz    C8161 5AzadC 48h
GSM230908.CEL.gz    Neo6 5AzadC 48h
GSM230910.CEL.gz    WM1205 5AzadC 48h
GSM230912.CEL.gz    WM35 5AzadC 48h

So, what to do to read pairwise.comparison???????

Please I need help desparatly

r

sorry , this is the correct line that gives me error: (pair<-pairwise.comparison(data.mas5.expers,) not pair<-pairwise.comparison(data.mas5."sample")

Try:

 > read.csv("covdesc.txt", sep="\t", header=T, stringsAsFactors = F)

I create a dataframe with dummy expression values and phenodata is taken from OP:

fnames=read.csv("covdesc.txt", sep="\t", header=T, stringsAsFactors = F, row.names=1)
data=sapply(seq(1:14), function(x) x=rnorm(20,10,3))
genes=paste("gene",seq(1:20), sep="")
row.names(data)=genes
colnames(data)=rownames(fnames)

library(simpleaffy)

pdata=AnnotatedDataFrame (data=fnames)
edata=ExpressionSet(assayData=data, phenoData = pdata)
pc=pairwise.comparison(edata, "dose", c("control","5AzadC"))

pc@means should give you the group mean and pc@fc should give you fold change values.

0 answers

No answers yet.

Log in to answer this question.