###Example workflow 1: open a file -> plot using createplotlist - save the plots ###Renske v Raaphorst - October 2019 ################Packages################ require(bactMAP) ################Variables - automatic### # This workflow imports data from oufti and assumes both segmentation as spot detection data. # Check all import functions on https://github.com/veeninglab/bactmap/wiki/importing-data-using-bactmap # Set your working directory using 'choose.dir' setwd(choose.dir()) # Pick your Oufti output file using `file.choose()` oufti_file_location <- file.choose() # Give the proper conversion factor for "My_Factor". # The console will ask for the factor when running the script. addPixels2um("My_Factor") ###########Data_Import##################### ########################################### oufti_output <- extr_Oufti(oufti_file_location) ##########Plotting######################### #No side plots, 4 groups (default), blue colors. oufti_plots <- createPlotList(oufti_output$spots_relative, oufti_output$mesh, mag="My_Factor", colorpalette="ColdBlue", showPlot=FALSE) ############Saving Data################### #save relative spot localizations save(oufti_plots$spotdata, file="Oufti_Spots_Relative.Rda") #save all plots cairo_pdf(filename="All_Oufti_Plots.pdf", onefile=TRUE, width=8, height=8) oufti_plots$lengthplot oufti_plots$widthplot plot(oufti_plots$qplots) oufti_plots$plottotal plot(oufti_plots$histograms) dev.off()