r if(activePathways_section & length(g$gene_data_index)>1){"### ActivePathways Integrative Enrichment"}

g = g.activepath(g)

r if(activePathways_section & length(g$gene_data_index)>1){paste("For ActivePathways results, see ", g$gsea_working_dir ," directory. ", sep="")}


# Get potential id's and save a new annotation file. 
g = g.mumm2omicsList(g)

# Save excel file summary for collaborators
if(saveXlsx==TRUE){    
  wbOut <- openxlsx::createWorkbook()

  for(i in 1:length(g$metab_data_index)){ try({
    writeDataToSheets(wb=wbOut, eset=g$omicsList[[ g$mz_data_index[i] ]][["eSet"]], limmaFit=g$omicsList[[ g$mz_data_index[i] ]][["fit"]], 
                      type=g$omicsList[[ g$mz_data_index[i] ]][["dataType"]], data_format=g$omicsList[[ g$mz_data_index[i] ]][["dataFormat"]]); 
  }) }  

  output_filename=file.path(g$output_path, paste(gsub("\\.","",make.names(project_name)), "_Summary_AllMetIDs", ".xlsx", sep=""))
  openxlsx::saveWorkbook(wbOut, file=output_filename, overwrite=TRUE)
}
### Make combined ranked list with metabolites
  g = g.combine.rnk(g)   

r if( ( show_metab_enrich & length(g$metab_data_index)>0 & length(g$gene_data_index)>0) ){"### GSEA for Integrative Proteomics and Metabolomics"}

if( run_gsea & species!="Other" ) { try({
  g = g.momenta(g)
}) } 

r if( ( show_metab_enrich & length(g$metab_data_index)>0 & length(g$gene_data_index)>0) ){paste("For complete prot/met integrative GSEA results, see ", g$gsea_working_dir ," directory. ", sep="")}




cnsb-boston/Omics_Notebook documentation built on July 16, 2022, 4:38 p.m.