Skip to content

Commit

Permalink
making it more robust in cases of not perfectly overlapping samples
Browse files Browse the repository at this point in the history
  • Loading branch information
vladpetyuk committed May 11, 2024
1 parent 3a51d2a commit e1a324c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/ptm_adjustment_by_global.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@

adjust_for_parent_protein_profiles <- function(m_ptm, m_global){

# sample alignment
common_samples <- intersect(sampleNames(m_ptm), sampleNames(m_global))
stopifnot(length(common_saples) < 2)
m_ptm <- m_ptm[,common_samples]
m_global <- m_global[,common_samples]

# gene matching
stopifnot("Gene" %in% fvarLabels(m_ptm))

gene_overlap <- intersect(fData(m_ptm)$Gene, featureNames(m_global))
Expand Down

0 comments on commit e1a324c

Please sign in to comment.