Differential Analysis

Limma

g = g.make.contrasts(g)
g = g.limma(g)
g = g.fc(g)

Volcano plots

# Volcano plots
g=g.volcano(g)

# MD Plot
g=g.md(g)

Click to view static volcano plots:
r { g$volcano_output_links }


Differential Static Heatmaps

# DE heatmaps for contrasts
g=g.de.static.heatmap(g)

Click to view static heatmap plots:
r { g$heatmap_output_links }


r if(int_volcano_section) {"### Interactive Volcano Plots"}

g=g.interactive.volcano(g)

r if(int_volcano_section) {"Click to view interactive Volcano plots: "} r if(int_volcano_section) { g$intvolc_output_links }


Save Data

#, results='show'}
g = g.savedata(g)

# Save combined ranked lists for GSEA, for each contrast
if(length(g$gene_data_index)>1){
  g = g.gsea.combined.contrast(g)
}

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

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

  output_filename=file.path(g$output_path, paste(gsub("\\.","",make.names(project_name)), "_Summary", ".xlsx", sep=""))
  openxlsx::saveWorkbook(wbOut, file=output_filename, overwrite=TRUE)
}



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