Bioinformatics and pairwise.comparison
0
0
Entering edit mode
7.0 years ago
onemore100iq ▴ 20

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 • 1.5k views
ADD COMMENT
1
Entering edit mode

My god! How would one make sense of your text bombing here?

Please read below post and re frame your question with proper background information

How To Ask Good Questions On Technical And Scientific Forums

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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