This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Analysis of proteomic data using QuantifyR

I have been working with proteomics data from Progenesis IQ,

This program provides me a proteins list found in two different conditions (patients = 10 and healthy controls = 5). These data are already normalized.

I tried to use the QuantifyR (https://github.com/hickslab/QuantifyR)

Everything worked out to the point that I needed to filter the data with values = 0. This would work if it had the same value for both groups, as I have different values I cannot use the same cutoff point.

clean_min <- function(data, group = group, nonzero = 3)

I would like to know if someone can help me, my idea would be to put a percentage instead of a fixed amount, something like nonzero> 60%.

This is the function of QuantifyR (https://github.com/hickslab/QuantifyR/blob/master/R/Analyze.R)

clean_min <- function(data, group = group, nonzero = 3){
  # Create vector to store index
  idx <- c()
  i <- 1

  # Iterate by row
  for (x in 1:nrow(data)){
    row <- data[x,]

    # Initiate condition
    keep <- FALSE

    # Iterate by replicates for each sample
    for (y in group){
      row2 <- row[, y]

      # Threshold how many columns can be not equal to 0
      if (sum(row2 != 0) >= nonzero){
        keep <- TRUE

      }
    }
    # Check on condition state
    if(keep == TRUE){
      idx[i] <- rownames(row)

    }
    i <- i + 1

  }
  return(data[which(rownames(data) %in% idx), ])

}

Best regards,

Leite

quantifyr r proteomics progenesis

1 answer

Perhaps you can try as below:

clean_min2 <- function(data, group = group, nonzeroratio = 0.6){ # Create vector to store index idx <- c() i <- 1

# Iterate by row for (x in 1:nrow(data)){ row <- data[x,]

# Initiate condition
keep <- FALSE

# Iterate by replicates for each sample
for (y in group){
  row2 <- row[, y]

  # Threshold how many columns can be not equal to 0
  if (sum(row2 != 0)/length(as.numeric(row2)) >= nonzeroratio){
    keep <- TRUE

  }
}
# Check on condition state
if(keep == TRUE){
  idx[i] <- rownames(row)

}
i <- i + 1

} return(data[which(rownames(data) %in% idx), ])

}

Log in to answer this question.