This is a test version of Biostars. For the public version, visit https://www.biostars.org.
txt normalized in r

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

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

Define "it does not work".

  > 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 ...

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

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

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)

Thank you very much!!!

Your help was of extreme importance to me.

1 answer

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.

Log in to answer this question.