GNPS TRINITY - Combine Optimus (feature detection), Sirius (in silico annotation), with GNPS (molecular networking)

This workflow was conceived by Louis-Felix, Ivan Protsiuc, and Kai Durkhop. It has been implemented in Jupyter by Madeleine and Ricardo. Documentation for the GNPS Trinity workflow can be found here: https://bix-lab.ucsd.edu/display/Public/GNPS+Trinity+workflow

load feature quantification matrix from optimus


In [6]:
opt <- read.csv("features_quantification_matrix.csv", sep=",", dec=".",header = TRUE)

transpose


In [7]:
opt_num <- t(opt[,-1])
opt_num <- as.data.frame(opt_num)
colnames(opt_num) <- opt[,which(colnames(opt)=="Sample.name")]

opt_num <- cbind(rownames(opt_num),opt_num)
colnames(opt_num)[1] <- "row.ID"

opt_num <- cbind(c(1:nrow(opt_num)),opt_num)
colnames(opt_num)[1] <- "shared.name"
rownames(opt_num) <- c(1:nrow(opt_num))

extract FeatureIDs from column names of feature quantification matrix from optimus


In [8]:
FeatureIDs <- gsub(".*ID","",opt_num[,which(colnames(opt_num)=="row.ID")])
FeatureIDs <- gsub("[.]","",FeatureIDs)

opt_num <- cbind(FeatureIDs,opt_num)
colnames(opt_num)[1] <- "FeatureID"

reorder columns, so that shared.name is in first row (facilitates reading file into cytoscape)


In [9]:
opt_num <- opt_num[,c(which(colnames(opt_num)=="shared.name"),which(colnames(opt_num)!="shared.name"))]

write output file


In [11]:
write.table(opt_num,file="Trinity_output_withoutSirius.csv",row.names=F,sep=";",quote=FALSE)