# Script for looking at ProMex output
# Metadata for Lewy study added for customization
# And finally make MSnSet object
fn <- "../notinst/extdata/ProMex/SYUA_HUMAN/Lewy_Intact_ProMex_result_SYUA_HUMAN.txt.xz"
dat <- read.delim(fn, check.names=F, as.is=T)
# need to come up with a feature name convention
# let's just keep it simple XYZ_i, where
# XYZ is part of UniProt entry name XYZ_HUMAN
# i is the consecutive number of the proteoform
# within a given protein
prot <- paste("SYUA",sub(".*HUMAN(.*)","\\1",dat$ProteinName),sep='')
protForm <- c(unique(prot),prot)
protForm <- make.unique(protForm)
protForm <- protForm[-seq_along(unique(prot))]
fcol <- c("MonoMass", "MinNet", "MaxNet", "ProteinName", "Composition")
ecol <- grep("rep",colnames(dat),value=T)
d.feat <- dat[,fcol]
rownames(d.feat) <- protForm
d.exprs <- as.matrix(dat[,ecol])
rownames(d.exprs) <- protForm
metaData <- read.delim("../notinst/extdata/lewy_intact_meta.txt", header = T, as.is=T)
rownames(metaData) <- sprintf("rep%s",as.numeric(sub(".*(\\d{2})","\\1",metaData$file)))
library("MSnbase")
m <- MSnSet(exprs = d.exprs, fData = d.feat, pData = metaData)
stopifnot(validObject(m))
sampleNames(m) <- pData(m)$sample.id
# tweak pData
pData(m)$subject.type <- factor(pData(m)$subject.type,
levels=c("control.2", "control.1", "case"))
pData(m)$match.group <- as.factor(sprintf("%02d", pData(m)$match.group))
pData(m)$Projid <- as.character(pData(m)$Projid)
pData(m)$homogenizationBatch <- as.factor(pData(m)$homogenizationBatch)
pData(m)$prepBatch <- as.factor(pData(m)$prepBatch)
#
save(m, file="../data/promex_alpha_synuclein.RData")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.