txt normalized in r
1
0
Entering edit mode
6.2 years ago
Joe Kherery ▴ 120

Hello everyone,

I have a dataset, which I was provided for analysis, came only in a txt file with values and genes I only have the values of expression of this data, for a control group and a group treated with a drug:

 Gene Name  Drug    Drug    Drug    Drug    Drug    Control Control Control Control Control
  A1BG  7.7259  5.2561  4.1799  5.3219  5.3121  7.7179  5.2861  4.1674  5.3487  5.3041
  A1CF  5.5803  5.1242  4.3434  3.6914  5.8986  5.5723  5.1542  4.3304  3.7100  5.8906
  A2LD1 6.0333  4.4532  6.6010  6.7946  8.0393  6.0253  4.4832  6.5812  6.8287  8.0313
  A2ML1 3.6149  3.2261  3.6596  3.4494  4.7199  3.6139  3.2321  3.6487  3.4667  4.7119

Could someone give me a light as I can analyze this data in R?

Regards, Kherery

txt normalized in r R array • 1.3k views
ADD COMMENT
0
Entering edit mode

Hey Devon, thank you so much!

I tried mydata = read.table("mydata.txt") but it does not work, and then I tried data <- readTargets("data.txt") and this worked to import the file into the R.

But I do not know how to go from here, I'm used to working with the raw data.

I apologize for this beginners question and hope you can help me.

Kind regards

ADD REPLY
0
Entering edit mode

Define "it does not work".

ADD REPLY
0
Entering edit mode
  > mydata = read.table("data.txt")

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

I have a small, but solid, experience with the raw Affymetrix and illumina files, however it is the first time that I come across a list with just the values like that ...

ADD REPLY
1
Entering edit mode

You presumably want read.delim() rather than read.table(), since the first column label has a space in it.

ADD REPLY
0
Entering edit mode

Hey Devon, now its ok. Thank you so much.

Do you know any tutorial I can follow where explain how to do model.matrix () and find the DEGs from a dataset like that?

Kind regards

ADD REPLY
1
Entering edit mode

If you end up using limma then look at its user guide. Your model matrix will be something like:

d = data.frame(group=factor(c(rep("Drug", 5), rep("Control", 5))))
m = model.matrix(~group, d)
ADD REPLY
0
Entering edit mode

Thank you very much!!!

Your help was of extreme importance to me.

ADD REPLY
2
Entering edit mode
6.2 years ago

The obvious method would be a T test (t.test() in R) on the rows. If you have a bunch of rows, then you should have a look at the limma package.

ADD COMMENT

Login before adding your answer.

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