Limma for proteomic data! Please Help!
1
0
Entering edit mode
sa825 • 0
@sa825-23346
Last seen 4.0 years ago

Hi everyone,

My name is Shimon and I am a PhD student. I am currently trying to analyse proteomic data from a mass spec using Limma in R. The data contains the normalised abundance values of >1500 proteins across 81 patients. The 81 patients are be divided into 2 groups: Alive and Dead. I want to use limma to get the p values and fold change for each protein. I have log2 transformed the normalised abundance values and then tried to use the "lmfit" as described here http://kasperdanielhansen.github.io/genbioconductor/html/limma.html but it has not worked.

I keep thinking maybe its the way my data is structured as the type of data used in the example in that link is defined as "S4" then after adding another data to it, it's defined as "integer" but my data is being defined as "list" by R.

Attached is a picture of how i have structured my data: My Data Structure

I really hope you guys can help.

Thank you and best wishes,

Shimon

limma voom lmfit ebayesfit • 1.4k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

Dear Shimon,

Welcome to Bioconductor. When you ask a question here, you need to show the code you have used so far and the error message you got from it. Just telling us that you tried something and "it has not worked" doesn't give us any information to help you.

The screen shot doesn't tell us anything about how you have read the data into R. We need R code.

Have a look at the posting guide: http://www.bioconductor.org/help/support/posting-guide

Best wishes
Gordon

ADD COMMENT
0
Entering edit mode

Dear Gordon,

Thank you for taking the time to explain to me the correct procedure, I apologise for any inconvenience caused. Here is the code I have used:

> library(limma)

Attaching package: ‘limma’

The following object is masked from ‘package:BiocGenerics’:

    plotMA

> library(datasets)

> if (!require("pacman")) install.packages("pacman")
Loading required package: pacman

> pacman::p_load(pacman, rio) 

> LD5 <- import("~/Desktop/sa825/Using Limma/LD5.csv")

> typeof(LD5)
[1] "list"

> myData <- LD5[, LD5$Alive %in% c("Alive", "Dead")]
> myData$Alive <- factor(myData$Alive)
Error in `$<-.data.frame`(`*tmp*`, Alive, value = integer(0)) : 
  replacement has 0 rows, data has 1552

> myData <- LD5[, LD5$Alive$Deas %in% c("Alive", "Dead")]
Error in LD5$Alive$Deas : $ operator is invalid for atomic vectors

> myData <- LD5[, LD5$Alive$Dead %in% c("Alive", "Dead")]
Error in LD5$Alive$Dead : $ operator is invalid for atomic vectors

> myData <- LD5[, LD5$Alive %in% c("Alive", "Dead")]

> design <- model.matrix(~ myData$Alive)
Error in model.frame.default(object, data, xlev = xlev) : 
  invalid type (NULL) for variable 'myData$Alive'

> fit <- lmFit(myData, design)
Error in getEAWP(object) : 
  Data object doesn't contain numeric expression values

Thank you and best wishes,

Shimon

ADD REPLY
1
Entering edit mode

You are actually not close to using limma yet. You have four Error messages before you even get to the limma function and you need to solve those first. None of your code seems appropriate for your data as shown in the screen shot.

I strongly suggest you collaborate with a bioinformation or statistician at your own institute who will help you analyse your data. If you can't do that, then find an introduction to R that will each you the basics of the language.

You need to first learn how to read data into R. My suggestion would be to learn base R commands like read.csv instead of relying on add-on packages like pacman and rio, which don't really make things any easier in my opinion and which tend to hide things from you. See for example:

https://swcarpentry.github.io/r-novice-inflammation/11-supp-read-write-csv/

You need to learn how to look at your data and trouble-shoot basic problems, for example

head(LD5)

or

LD5[1:5,1:5]

or

names(LD5)

would all be useful commands.

Getting in the habit of reading R help pages (such as help("lmFit")) is also a useful skill.

ADD REPLY
0
Entering edit mode

Hi Gordon,

Thank you for your advice. I will definitely look into coming to better grips with the R language. I have watched some R introduction videos but these haven't really solved the errors I have been getting. I found this https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf which seems like a complete introduction to R. Would this be more appropriate?

Best Wishes, Shimon

ADD REPLY
0
Entering edit mode

Yes, that's a good introduction.

ADD REPLY

Login before adding your answer.

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