Commit earlier refactoring
This commit is contained in:
820
workflow/README.md
Normal file
820
workflow/README.md
Normal file
@@ -0,0 +1,820 @@
|
||||
# Hartman Lab Self-Documenting Workflow
|
||||
|
||||
One script to rule them all (see: xkcd #927)
|
||||
|
||||
## Overview
|
||||
|
||||
A flexible yet opinionated analysis framework for the Hartman Lab
|
||||
There should be at least 4 subdirectories to organize Q-HTCP data and analysis. The parent directory is simply called 'Q-HTCP' and the 4 are subdirectories described below (Fig. 1):
|
||||
* **ExpJobs**
|
||||
* This directory contains raw image data and image analysis results for the entire collection of Q-HTCP experiments.
|
||||
* We recommend each subdirectory within 'ExpJobs" should represent a single Q-HTCP experiment and be named using the following convention (AB yyyy_mmdd_PerturbatationsOfInterest): experimenter initials ('AB '), date ('yyyy_mmdd_'), and brief description ('drugs_medias').
|
||||
* Each subdirectory contains the Raw Image Folders for that experiment (a series of N folders with successive integer labels 1 to N, each folder containing the time series of images for a single cell array). It also contains a user-supplied subfolder, which must be named ''MasterPlateFiles" and must contain two excel files, one named 'DrugMedia_experimentdescription' and the other named 'MasterPlate_experimentdescription'. The bolded part of the file name including the underscore is required. The italicized part is optional description. Generally the 'DrugMedia_' file merits description.
|
||||
* If the standard MasterPlate_Template file is being used, it's not needed to customize then name. On the other hand if the template is modified, it is recommended to rename it and describe accordingly - a useful convention is to use the same name for the MP files as given to the experiment (i.e, the parent ExpJobs subdirectory described above) after the underscores.
|
||||
* The 'MasterPlate_' file contain associated cell array information (culture IDs for all of the cell arrays in the experiment) while the 'DrugMedia_' file contains information about the media that the cell array is printed to.
|
||||
* Together they encapsulate and define the experimental design.
|
||||
* The QHTCPImageFolders and 'MasterPlateFiles' folder are the inputs for image analysis with EASY software.
|
||||
* As further described below, EASY will automatically generate a 'Results' directory (within the ExpJobs/'ExperimentJob' folder) with a name that consists of a system-generated timestamp and an optional short description provided by the user (Fig.2). The 'Results' directory is created and entered, using the "File >> New Experiment" dropdown in EASY. Multiple 'Results' files may be created (and uniquely named) within an 'ExperimentJob' folder.
|
||||
* **EASY**
|
||||
* This directory contains the GUI-enabled MATLAB software to accomplish image analysis and growth curve fitting.
|
||||
* EASY analyzes Q-HTCP image data within an 'ExperimentJob'' folder (described above; each cell array has its own folder containing its entire time series of images).
|
||||
* EASY analysis produces image quantification data and growth curve fitting results for each cell array; these results are subsequently assembled into a single file and labeled, using information contained in the 'MasterPlate_' and 'DrugMedia_' files in the 'MasterPlateFiles' subdirectory.
|
||||
* The final files (named '!!ResultsStd_.txt' or '!!ResultsELr_.txt') are produced in a subdirectory that EASY creates within the 'ExperimentJob' folder, named '/ResultsTimeStampDesc/PrintResults' (Fig. 2).
|
||||
* The /EASY directory is simply where the latest EASY version resides (additional versions in development or legacy versions may also be stored there).
|
||||
* The raw data inputs and result outputs for EASY are kept in the 'ExpJobs' directory.
|
||||
* EASY also outputs a '.mat' file that is stored in the 'matResults' folder and is named with the TimeStamp and user-provided name appended to the 'Results' folder name when 'New Experiment' is executed from the 'File' Dropdown menu in the EASY console.
|
||||
* **EZview**
|
||||
* This directory contains the GUI-enabled MATLAB software to conveniently and efficiently mine the raw cell array image data for a Q-HTCP experiment.
|
||||
* It takes the Results.m file (created by EASY software) as an input and permits the user to navigate through the raw image data and growth curve results for the experiment.
|
||||
* The /EZview provides a place for storing the the latest EZview version (as well as other EZview versions).
|
||||
* The /EZview provides a GUI for examining the EASY results as provided in the …/matResults/… .mat file.
|
||||
* **StudiesQHTCP**
|
||||
* This directory contains the GUI-enabled JAVA software composite (MATLAB, JAVA, R, Python, Perl, Shell) that takes growth curve results (created by EASY software) as an input and successively generates interaction Z-score results, which are used for graphing gene interactions, Clustering, Gene Ontology analysis, and other ways of interpreting and visualizing the experimental quality and outcomes. {The /StudiesQHTCP folder contains the ordered command line scripts that call sets of other scripts to perform data selection and adaptation from the extracted text results spreadsheet found in the /ExpJobs/experiment name/Results…/PrintResults/ folder. In particular the 'user customize interactionCode4experiment.R' file. It also contains a multitude of R generated plots based on the selected data and possible adaptation. All clustering and Gene ontology analysis are derived from the 'ZScores_Interaction.csv' file found in the/ZScores subdirectory.}
|
||||
* **Master Plates**
|
||||
* This optional folder is a convenient place to store copies of the 'MasterPlate_' and a 'DrugMedia_' file templates, along with previously used files that may have been modified and could be reused or further modified to enable future analyses.
|
||||
* These two file types are required in the 'MasterPlateFiles' folder, which catalogs experimental information specific to individual Jobs in the ExpJobs folder, as described further below.
|
||||
|
||||
NOTES:
|
||||
* For the time being I have tried to balance the recognizability of your current workflow with better practices that allow this program to function.
|
||||
|
||||
TODO:
|
||||
* Scripts should be made modular enough that they can be stored in the same dir
|
||||
* Don't cd in scripts
|
||||
* Pass variables
|
||||
* Variable scoping is horrible right now
|
||||
* I wrote this sequentially and tried to keep track the best I could
|
||||
* Local vars have a higher likelihood of being lower case, global vars are UPPER
|
||||
|
||||
## Index
|
||||
|
||||
* [print_help](#printhelp)
|
||||
* [parse_input](#parseinput)
|
||||
* [install_dependencies](#installdependencies)
|
||||
* [init_project](#initproject)
|
||||
* [easy](#easy)
|
||||
* [ezview](#ezview)
|
||||
* [qhtcp](#qhtcp)
|
||||
* [remc](#remc)
|
||||
* [gtf](#gtf)
|
||||
* [gta](#gta)
|
||||
* [r_gta](#rgta)
|
||||
* [r_gta_pairwiselk](#rgtapairwiselk)
|
||||
* [r_gta_heatmaps](#rgtaheatmaps)
|
||||
* [mat_exp_frontend](#matexpfrontend)
|
||||
* [r_interactions](#rinteractions)
|
||||
* [r_join_interact](#rjoininteract)
|
||||
* [java_extract](#javaextract)
|
||||
* [r_add_shift_values](#raddshiftvalues)
|
||||
* [r_heat_maps_zscores](#rheatmapszscores)
|
||||
* [r_heat_maps_homology](#rheatmapshomology)
|
||||
* [py_gtf_dcon](#pygtfdcon)
|
||||
* [pl_gtf](#plgtf)
|
||||
* [pl_gtf_analyze](#plgtfanalyze)
|
||||
* [pl_gtf_terms2tsv](#plgtfterms2tsv)
|
||||
* [py_gtf_concat](#pygtfconcat)
|
||||
* [r_compile_gtf](#rcompilegtf)
|
||||
* [get_studies](#getstudies)
|
||||
* [get_easy_results](#geteasyresults)
|
||||
* [documentation](#documentation)
|
||||
|
||||
## Help
|
||||
|
||||
Change these variables to use different libraries
|
||||
|
||||
### print_help
|
||||
|
||||
Print a helpful message
|
||||
|
||||
_Function has no arguments._
|
||||
|
||||
## User Input
|
||||
|
||||
Creates array and switches from user input
|
||||
parse_input() takes all of the arguments passed to the script
|
||||
|
||||
### parse_input
|
||||
|
||||
Creates array and switches from user input
|
||||
parse_input() takes all of the arguments passed to the script
|
||||
|
||||
## Install dependencies
|
||||
|
||||
A module contains a cohesive set of actions/experiments to run on a project
|
||||
Use a module when:
|
||||
* Building a new type of analysis from scratch
|
||||
* Generating project directories
|
||||
* Grouping multiple submodules (and modules) into a larger task
|
||||
* Dictating the ordering of multiple submodules
|
||||
* Modules should competently handle pushd and popd for their submodules if they do not reside in the SCANS/PROJECT_DIR
|
||||
|
||||
### install_dependencies
|
||||
|
||||
Installs dependencies for the workflow
|
||||
|
||||
|
||||
|
||||
Dependencies
|
||||
* R
|
||||
* Perl
|
||||
* Java
|
||||
* MATLAB
|
||||
|
||||
For MacOS
|
||||
* export HOMEBREW_BREW_GIT_REMOTE=https://github.com/Homebrew/brew
|
||||
* /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
* cpan File::Map ExtUtils::PkgConfig GD GO::TermFinder
|
||||
* brew install graphiz gd pdftk-java pandoc shdoc nano rsync
|
||||
|
||||
For Linux
|
||||
* cpan File::Map ExtUtils::PkgConfig GD GO::TermFinder
|
||||
* apt-get install graphviz libgd-dev pdftk-java pandoc shdoc nano rsync
|
||||
or
|
||||
* dnf install graphviz pandoc pdftk-java gd-devel shdoc nano rsync
|
||||
|
||||
For R
|
||||
* install.packages(“BiocManager”)
|
||||
* BiocManager::install(“org.Sc.sgd.db”)
|
||||
* install.packages(c('ontologyIndex', 'ggrepel', 'tidyverse', 'sos', 'openxlsx'), dep=TRUE)
|
||||
|
||||
_Function has no arguments._
|
||||
|
||||
## Initialize a new project in the scans directory
|
||||
|
||||
This function creates and initializes project directories
|
||||
This module is responsible for the following tasks:
|
||||
* Initializing a project directory in the scans directory
|
||||
* Initializing a QHTCP project directory in the qhtcp directory
|
||||
|
||||
TODO
|
||||
* Copy over source image directories from robot - are these alse named by the ExpJobs name?
|
||||
* Suggest renaming ExpJobs to something like "scans" or "images"
|
||||
* MasterPlate_ file **should not** be an xlsx file, no portability
|
||||
|
||||
NOTES
|
||||
* Copy over the images from the robot and then DO NOT TOUCH that directory except to copy from it
|
||||
* Write-protect (read-only) if we need to
|
||||
* Copy data from scans/images directory to the project working dir and then begin analysis
|
||||
* You may think...but doesn't that 2x data?
|
||||
* No, btrfs subvolume uses reflinks, only data that is altered will be duplicated
|
||||
* Most of the data are static images that are not written to, so the data is deduplicated
|
||||
|
||||
### init_project
|
||||
|
||||
This function creates and initializes project directories
|
||||
This module is responsible for the following tasks:
|
||||
* Initializing a project directory in the scans directory
|
||||
* Initializing a QHTCP project directory in the qhtcp directory
|
||||
|
||||
TODO
|
||||
* Copy over source image directories from robot - are these alse named by the ExpJobs name?
|
||||
* Suggest renaming ExpJobs to something like "scans" or "images"
|
||||
* MasterPlate_ file **should not** be an xlsx file, no portability
|
||||
|
||||
NOTES
|
||||
* Copy over the images from the robot and then DO NOT TOUCH that directory except to copy from it
|
||||
* Write-protect (read-only) if we need to
|
||||
* Copy data from scans/images directory to the project working dir and then begin analysis
|
||||
* You may think...but doesn't that 2x data?
|
||||
* No, btrfs subvolume uses reflinks, only data that is altered will be duplicated
|
||||
* Most of the data are static images that are not written to, so the data is deduplicated
|
||||
|
||||
## EASY
|
||||
|
||||
Start an EASY analysis
|
||||
TODO Don't create output in the scans folder, put it in an output directory
|
||||
TODO The !!Results output files need standardized naming
|
||||
TODO Don't perform directory operations in EASY
|
||||
* The scans/images and 'MasterPlateFiles' folder are the inputs for image analysis with EASY software.
|
||||
* EASY will automatically generate a 'Results' directory (within the ExpJobs/'ExperimentJob' folder) w/ timestamp and an optional short description provided by the user (Fig.2).
|
||||
* The 'Results' directory is created and entered, using the "File >> New Experiment" dropdown in EASY.
|
||||
* Multiple 'Results' files may be created (and uniquely named) within an 'ExperimentJob' folder.
|
||||
|
||||
Template:
|
||||
templates/easy
|
||||
* [datatipp.m](templates/easy/datatipp.m)
|
||||
* [DgenResults.m](templates/easy/DgenResults.m)
|
||||
* [DMPexcel2mat.m](templates/easy/DMPexcel2mat.m)
|
||||
* [EASYconsole.asv](templates/easy/EASYconsole.asv)
|
||||
* [EASYconsole.fig](templates/easy/EASYconsole.fig)
|
||||
* [EASYconsole.m](templates/easy/EASYconsole.m)
|
||||
* [figs](templates/easy/figs)
|
||||
* [NPTdirect.fig](templates/easy/figs/NPTdirect.fig)
|
||||
* [searchNPTIm.fig](templates/easy/figs/searchNPTIm.fig)
|
||||
* [NCdisplayGui.m](templates/easy/NCdisplayGui.m)
|
||||
* [NCfitImCFparforFailGbl2.m](templates/easy/NCfitImCFparforFailGbl2.m)
|
||||
* [NCscurImCF_3parfor.m](templates/easy/NCscurImCF_3parfor.m)
|
||||
* [NCsingleDisplay.m](templates/easy/NCsingleDisplay.m)
|
||||
* [NIcircle.m](templates/easy/NIcircle.m)
|
||||
* [NImParamRadiusGui.m](templates/easy/NImParamRadiusGui.m)
|
||||
* [NIscanIntensBGpar4GblFnc.m](templates/easy/NIscanIntensBGpar4GblFnc.m)
|
||||
* [p4loop8c.m](templates/easy/p4loop8c.m)
|
||||
* [par4GblFnc8c.m](templates/easy/par4GblFnc8c.m)
|
||||
* [par4Gbl_Main8c.m](templates/easy/par4Gbl_Main8c.m)
|
||||
* [PTmats](templates/easy/PTmats)
|
||||
* [Nbdg.mat](templates/easy/PTmats/Nbdg.mat)
|
||||
* [NCFparms.mat](templates/easy/PTmats/NCFparms.mat)
|
||||
* [NImParameters.mat](templates/easy/PTmats/NImParameters.mat)
|
||||
* [NPTdirectParameters.mat](templates/easy/PTmats/NPTdirectParameters.mat)
|
||||
* [NPTmapDirect.mat](templates/easy/PTmats/NPTmapDirect.mat)
|
||||
* [NPTmapSearch.mat](templates/easy/PTmats/NPTmapSearch.mat)
|
||||
* [NPTsearchParameters.mat](templates/easy/PTmats/NPTsearchParameters.mat)
|
||||
|
||||
To analyze a new Q-HTCP experiment:
|
||||
* Open the EASY Software.
|
||||
* Open 'EstartConsole.m' with MATLAB
|
||||
* Click the Run icon (play button)
|
||||
* When prompted, click "Change Folder" (do not select "Add to Path").
|
||||
* In the pop-up display, select from the 'File' dropdown: 'New Experiment'.
|
||||
* From the pop-up, choose where to save the new file.
|
||||
* Navigate to the relevant job in the ExpJobs folder, name the file accordingly, and click 'save'.
|
||||
* The newly created .mat file in the newly created Results folder will automatically be loaded.
|
||||
* The file name will then be automatically appended by the code with the current date information (e.g. 'A1.mat' will become 'Results2023-07-19A1)
|
||||
* If the experiment has already been created, it can be reloaded by clicking 'Load Experiment' instead of 'New Experiment' and selecting the relevant results
|
||||
* In the pop-up display, click on the 'Run' dropdown menu and select 'Image CurveFit ComboAnalysis'.
|
||||
* In the updated pop-up, choose/highlight all desired image folders for analysis (this is generally all of the folders, since only the ones that need analysis should be there) and then click on 'continue'.
|
||||
* As the program is running, updates will periodically appear in the Command Window; there will be an initial pause at "Before call to NIscanIntens…..".
|
||||
* When the curve fitting is finished, the EASY console will pop back up.
|
||||
* Check to see the completed analysis results in the newly created 'PrintResults' Folder, inside of the 'Results' Folder.
|
||||
* Other folders ('CFfigs', 'figs', 'Fotos') are created for later optional use and will be empty.
|
||||
* **NOTE:** The image analysis is completed independent of labeling the data (strains, media type, etc. Labeling happens next with the 'GenReports' function).
|
||||
* Click on the 'GenReports' dropdown and select 'DrugMediaMP Generate .mat'
|
||||
* **NOTE:** The 'MasterPlate' and 'DrugMedia' files have very specific formats and should be completed from a template.
|
||||
* The Masterplate file must be exact (it must contain all and only the strains that were actually tested).
|
||||
* For example, if only part of a library is tested, the complete library file must be modified to remove irrelevant strains.
|
||||
* You will be prompted to first select the 'MasterPlate' file. You will need to navigate away from the working directory to get to it.
|
||||
* It is fine for the 'MasterPlate_' file to be .xlsx (or .xls), and if you don't see it in the popup window, then change the file type from '.xls' to "all files" and then select it.
|
||||
* Once it is selected, a report of the number of master plates in the file will pop up; when the report appears, assuming it is correct, click on 'OK'.
|
||||
* You will then be prompted to select the 'DrugMedia' file from the relevant job folder. You will automatically return to the correct prior directory location.
|
||||
* Choose it and click 'OK'. You may see a warning about column headers being modified, but that's ok.
|
||||
* This will create an additional file in the 'MasterPlatesFiles' folder named 'MPDMmat.mat'
|
||||
* Click on the 'GenReports' dropdown and select 'Results_Generate.'
|
||||
* You will first see '!!ResultsElr_.txt' generated in the 'PrintResults' folder.
|
||||
* Refreshing will reveal an increasing file size until you see the '!!ResultsStd_.txt' being generated.
|
||||
* When finished, the '!!ResultsStd_.txt' will be about the same file size and it should be used in the following StudiesQHTCP analysis.
|
||||
* 'NoGrowth_.txt', and 'GrowthOnly_.txt' files will be generated in the 'PrintResults' folder.
|
||||
|
||||
Issues:
|
||||
* We need full documentation for all of the current workflow. There are different documents that need to be integrated. This will need to be updated as we make improvements to the system.
|
||||
* MasterPlate_ file must have ydl227c in orf column, or else it Z_interaction.R will fail, because it can't calculate shift values.
|
||||
* Make sure there are no special characters; e.g., (), “, ', ?, etc.; dash and underscore are ok as delimiters
|
||||
* Drug_Media_ file must have letter character to be read as 'text'.
|
||||
* MasterPlate_ file and DrugMedia_ are .xlsx or .xls, but !!Results_ is .txt.
|
||||
* In Z_interactions.R, does it require a zero concentration/perturbation (should we use zero for the low conc, even if it's not zero), e.g., in order to do the shift correctly.
|
||||
* Need to enable all file types (not only .xls) as the default for GenerateResults (to select MP and DM files as .xlsx).
|
||||
* Explore differences between the ELR and STD files - 24_0414; John R modified Z script to format ELR file for Z_interactions.R analysis.
|
||||
* To keep time stamps when transferring with FileZilla, go to the transfer drop down and turn it on, see https://filezillapro.com/docs/v3/advanced/preserve-timestamps/
|
||||
* Could we change the 'MasterPlateFiles' folder label in EASY to 'MasterPlate_DrugMedia' (since there should be only one MP and there is also a DM file required?
|
||||
* I was also thinking of adding a 'MasterPlateFilesOnly' folder to the QHTCP directory template where one could house different MPFiles (e.g., with and without damps, with and without Refs on all MPs, etc; other custom MPFiles, updated versions, etc)
|
||||
* Currently updated files are in '23_1011_NewUpdatedMasterPlate_Files' on Mac (yeast strains/23_0914…/)
|
||||
* For EASY to report cell array positions (plate_row_column) to facilitate analyzing plate artifacts. The MP File in Col 3 is called 'LibraryLocation' and is reported after 'Specifics' in the !!Results.
|
||||
* Can EASY/StudiesQ-HTCP be updated at any time by rerunning with updated MP file (new information for gene, desc, etc)- or maybe better to always start with a new template?
|
||||
* Need to be aware of file formatting to avoid dates (e.g., with gene names like MAY24, OCT1, etc, and with plate locations 1E1, 1E2, etc)- this has been less of a problem.
|
||||
* In StudiesQHTCP folders, remember to annotate Exp1, Exp2, in the StudyInfo.csv file.
|
||||
* Where are gene names called from for labeling REMc heatmaps, TSHeatmaps, Z-interaction graphs, etc? Is this file in the QHTCP 'code' folder, or is it in the the results file (and thus ultimately the MP file)?
|
||||
* Is it ok for a MasterPlate_ file to have multiple sheets (e.g., readme tab- is only the first tab read in)?
|
||||
* What are the rules for pulling information from the MasterPlateFile to the !!Results_ (e.g., is it the column or the Header Name, etc that is searched? Particular cells in the DrugMedia file?).
|
||||
* Modifier, Conc are from DM sheet, and refer to the agar media arrays. OrfRep is from MasterPlate_ File. 'Specifics' (Last Column) is experiment specific and accommodate designs involving differences across the multi-well liquid arrays. 'StrainBkGrd' (now 'Library location') is in the 3rd column and reported after 'Specifics' at the last col of the '!!Results..' file.
|
||||
* Do we have / could we make an indicator- work in progress or idle/complete with MP/DM and after gen-report. Now, we can check for the MPDMmat.mat file, or we can look in PrintResults, but would be nice to know without looking there.
|
||||
* File>>Load Experiment wasn't working (no popup to redirect). Check this again.
|
||||
|
||||
### easy
|
||||
|
||||
Start an EASY analysis
|
||||
TODO Don't create output in the scans folder, put it in an output directory
|
||||
TODO The !!Results output files need standardized naming
|
||||
TODO Don't perform directory operations in EASY
|
||||
* The scans/images and 'MasterPlateFiles' folder are the inputs for image analysis with EASY software.
|
||||
* EASY will automatically generate a 'Results' directory (within the ExpJobs/'ExperimentJob' folder) w/ timestamp and an optional short description provided by the user (Fig.2).
|
||||
* The 'Results' directory is created and entered, using the "File >> New Experiment" dropdown in EASY.
|
||||
* Multiple 'Results' files may be created (and uniquely named) within an 'ExperimentJob' folder.
|
||||
|
||||
Template:
|
||||
templates/easy
|
||||
* [datatipp.m](templates/easy/datatipp.m)
|
||||
* [DgenResults.m](templates/easy/DgenResults.m)
|
||||
* [DMPexcel2mat.m](templates/easy/DMPexcel2mat.m)
|
||||
* [EASYconsole.asv](templates/easy/EASYconsole.asv)
|
||||
* [EASYconsole.fig](templates/easy/EASYconsole.fig)
|
||||
* [EASYconsole.m](templates/easy/EASYconsole.m)
|
||||
* [figs](templates/easy/figs)
|
||||
* [NPTdirect.fig](templates/easy/figs/NPTdirect.fig)
|
||||
* [searchNPTIm.fig](templates/easy/figs/searchNPTIm.fig)
|
||||
* [NCdisplayGui.m](templates/easy/NCdisplayGui.m)
|
||||
* [NCfitImCFparforFailGbl2.m](templates/easy/NCfitImCFparforFailGbl2.m)
|
||||
* [NCscurImCF_3parfor.m](templates/easy/NCscurImCF_3parfor.m)
|
||||
* [NCsingleDisplay.m](templates/easy/NCsingleDisplay.m)
|
||||
* [NIcircle.m](templates/easy/NIcircle.m)
|
||||
* [NImParamRadiusGui.m](templates/easy/NImParamRadiusGui.m)
|
||||
* [NIscanIntensBGpar4GblFnc.m](templates/easy/NIscanIntensBGpar4GblFnc.m)
|
||||
* [p4loop8c.m](templates/easy/p4loop8c.m)
|
||||
* [par4GblFnc8c.m](templates/easy/par4GblFnc8c.m)
|
||||
* [par4Gbl_Main8c.m](templates/easy/par4Gbl_Main8c.m)
|
||||
* [PTmats](templates/easy/PTmats)
|
||||
* [Nbdg.mat](templates/easy/PTmats/Nbdg.mat)
|
||||
* [NCFparms.mat](templates/easy/PTmats/NCFparms.mat)
|
||||
* [NImParameters.mat](templates/easy/PTmats/NImParameters.mat)
|
||||
* [NPTdirectParameters.mat](templates/easy/PTmats/NPTdirectParameters.mat)
|
||||
* [NPTmapDirect.mat](templates/easy/PTmats/NPTmapDirect.mat)
|
||||
* [NPTmapSearch.mat](templates/easy/PTmats/NPTmapSearch.mat)
|
||||
* [NPTsearchParameters.mat](templates/easy/PTmats/NPTsearchParameters.mat)
|
||||
|
||||
To analyze a new Q-HTCP experiment:
|
||||
* Open the EASY Software.
|
||||
* Open 'EstartConsole.m' with MATLAB
|
||||
* Click the Run icon (play button)
|
||||
* When prompted, click "Change Folder" (do not select "Add to Path").
|
||||
* In the pop-up display, select from the 'File' dropdown: 'New Experiment'.
|
||||
* From the pop-up, choose where to save the new file.
|
||||
* Navigate to the relevant job in the ExpJobs folder, name the file accordingly, and click 'save'.
|
||||
* The newly created .mat file in the newly created Results folder will automatically be loaded.
|
||||
* The file name will then be automatically appended by the code with the current date information (e.g. 'A1.mat' will become 'Results2023-07-19A1)
|
||||
* If the experiment has already been created, it can be reloaded by clicking 'Load Experiment' instead of 'New Experiment' and selecting the relevant results
|
||||
* In the pop-up display, click on the 'Run' dropdown menu and select 'Image CurveFit ComboAnalysis'.
|
||||
* In the updated pop-up, choose/highlight all desired image folders for analysis (this is generally all of the folders, since only the ones that need analysis should be there) and then click on 'continue'.
|
||||
* As the program is running, updates will periodically appear in the Command Window; there will be an initial pause at "Before call to NIscanIntens…..".
|
||||
* When the curve fitting is finished, the EASY console will pop back up.
|
||||
* Check to see the completed analysis results in the newly created 'PrintResults' Folder, inside of the 'Results' Folder.
|
||||
* Other folders ('CFfigs', 'figs', 'Fotos') are created for later optional use and will be empty.
|
||||
* **NOTE:** The image analysis is completed independent of labeling the data (strains, media type, etc. Labeling happens next with the 'GenReports' function).
|
||||
* Click on the 'GenReports' dropdown and select 'DrugMediaMP Generate .mat'
|
||||
* **NOTE:** The 'MasterPlate' and 'DrugMedia' files have very specific formats and should be completed from a template.
|
||||
* The Masterplate file must be exact (it must contain all and only the strains that were actually tested).
|
||||
* For example, if only part of a library is tested, the complete library file must be modified to remove irrelevant strains.
|
||||
* You will be prompted to first select the 'MasterPlate' file. You will need to navigate away from the working directory to get to it.
|
||||
* It is fine for the 'MasterPlate_' file to be .xlsx (or .xls), and if you don't see it in the popup window, then change the file type from '.xls' to "all files" and then select it.
|
||||
* Once it is selected, a report of the number of master plates in the file will pop up; when the report appears, assuming it is correct, click on 'OK'.
|
||||
* You will then be prompted to select the 'DrugMedia' file from the relevant job folder. You will automatically return to the correct prior directory location.
|
||||
* Choose it and click 'OK'. You may see a warning about column headers being modified, but that's ok.
|
||||
* This will create an additional file in the 'MasterPlatesFiles' folder named 'MPDMmat.mat'
|
||||
* Click on the 'GenReports' dropdown and select 'Results_Generate.'
|
||||
* You will first see '!!ResultsElr_.txt' generated in the 'PrintResults' folder.
|
||||
* Refreshing will reveal an increasing file size until you see the '!!ResultsStd_.txt' being generated.
|
||||
* When finished, the '!!ResultsStd_.txt' will be about the same file size and it should be used in the following StudiesQHTCP analysis.
|
||||
* 'NoGrowth_.txt', and 'GrowthOnly_.txt' files will be generated in the 'PrintResults' folder.
|
||||
|
||||
Issues:
|
||||
* We need full documentation for all of the current workflow. There are different documents that need to be integrated. This will need to be updated as we make improvements to the system.
|
||||
* MasterPlate_ file must have ydl227c in orf column, or else it Z_interaction.R will fail, because it can't calculate shift values.
|
||||
* Make sure there are no special characters; e.g., (), “, ', ?, etc.; dash and underscore are ok as delimiters
|
||||
* Drug_Media_ file must have letter character to be read as 'text'.
|
||||
* MasterPlate_ file and DrugMedia_ are .xlsx or .xls, but !!Results_ is .txt.
|
||||
* In Z_interactions.R, does it require a zero concentration/perturbation (should we use zero for the low conc, even if it's not zero), e.g., in order to do the shift correctly.
|
||||
* Need to enable all file types (not only .xls) as the default for GenerateResults (to select MP and DM files as .xlsx).
|
||||
* Explore differences between the ELR and STD files - 24_0414; John R modified Z script to format ELR file for Z_interactions.R analysis.
|
||||
* To keep time stamps when transferring with FileZilla, go to the transfer drop down and turn it on, see https://filezillapro.com/docs/v3/advanced/preserve-timestamps/
|
||||
* Could we change the 'MasterPlateFiles' folder label in EASY to 'MasterPlate_DrugMedia' (since there should be only one MP and there is also a DM file required?
|
||||
* I was also thinking of adding a 'MasterPlateFilesOnly' folder to the QHTCP directory template where one could house different MPFiles (e.g., with and without damps, with and without Refs on all MPs, etc; other custom MPFiles, updated versions, etc)
|
||||
* Currently updated files are in '23_1011_NewUpdatedMasterPlate_Files' on Mac (yeast strains/23_0914…/)
|
||||
* For EASY to report cell array positions (plate_row_column) to facilitate analyzing plate artifacts. The MP File in Col 3 is called 'LibraryLocation' and is reported after 'Specifics' in the !!Results.
|
||||
* Can EASY/StudiesQ-HTCP be updated at any time by rerunning with updated MP file (new information for gene, desc, etc)- or maybe better to always start with a new template?
|
||||
* Need to be aware of file formatting to avoid dates (e.g., with gene names like MAY24, OCT1, etc, and with plate locations 1E1, 1E2, etc)- this has been less of a problem.
|
||||
* In StudiesQHTCP folders, remember to annotate Exp1, Exp2, in the StudyInfo.csv file.
|
||||
* Where are gene names called from for labeling REMc heatmaps, TSHeatmaps, Z-interaction graphs, etc? Is this file in the QHTCP 'code' folder, or is it in the the results file (and thus ultimately the MP file)?
|
||||
* Is it ok for a MasterPlate_ file to have multiple sheets (e.g., readme tab- is only the first tab read in)?
|
||||
* What are the rules for pulling information from the MasterPlateFile to the !!Results_ (e.g., is it the column or the Header Name, etc that is searched? Particular cells in the DrugMedia file?).
|
||||
* Modifier, Conc are from DM sheet, and refer to the agar media arrays. OrfRep is from MasterPlate_ File. 'Specifics' (Last Column) is experiment specific and accommodate designs involving differences across the multi-well liquid arrays. 'StrainBkGrd' (now 'Library location') is in the 3rd column and reported after 'Specifics' at the last col of the '!!Results..' file.
|
||||
* Do we have / could we make an indicator- work in progress or idle/complete with MP/DM and after gen-report. Now, we can check for the MPDMmat.mat file, or we can look in PrintResults, but would be nice to know without looking there.
|
||||
* File>>Load Experiment wasn't working (no popup to redirect). Check this again.
|
||||
|
||||
## EZview
|
||||
|
||||
TODO WIP
|
||||
|
||||
### ezview
|
||||
|
||||
TODO WIP
|
||||
|
||||
## QHTCP
|
||||
|
||||
System for Multi-QHTCP-Experiment Gene Interaction Profiling Analysis
|
||||
* Functional rewrite of REMcMaster3.sh, RemcMaster2.sh, REMcJar2.sh, ExpFrontend.m, mProcess.sh, mFunction.sh, mComponent.sh
|
||||
* Added a newline character to the end of StudyInfo.csv so it is a valid text file
|
||||
TODO Suggest renaming StudiesQHTCP to something like qhtcp qhtcp_output or output
|
||||
TODO Store StudyInfo somewhere better
|
||||
TODO Move (hide) the study template somewhere else
|
||||
TODO StudiesArchive should be smarter:
|
||||
* Create a database with as much information as possible
|
||||
* Write a function that easily loads and parses databse into easy-to-use variables
|
||||
* Allow users to reference those variables to write their own modules
|
||||
TODO Should not be using initials
|
||||
* not unique enough and we don't have that data easily on hand
|
||||
* usernames are unique and make more sense
|
||||
* I don't know what all would have to be modified atm
|
||||
|
||||
Rerunning this module uses rsync --update to only copy files that are newer in the template
|
||||
If you wish for the template to overwrite your changes, delete the file from your QHTCP project dir
|
||||
|
||||
To create a new study (Experiment Specific Interaction Zscores generation)
|
||||
|
||||
* StudyInfo.csv instructions:
|
||||
* In your files directory, open the /Code folder, edit the 'StudyInfo.csv' spreadsheet, and save it as a 'csv' file to give each experiment the labels you wish to be used for the plots and specific files.
|
||||
* Enter the desired Experiment names- **order the names in the way you want them to appear in the REMc heatmaps; and make sure to run the front end programs (below) in the correct order (e.g., run front end in 'exp1' folder to call the !!Results file for the experiment you named as exp1 in the StudyInfo.csv file)
|
||||
* The GTA and pairwise, TSHeatmaps, JoinInteractions and GTF Heatmap scripts use this table to label results and heatmaps in a meaningful way for the user and others. The BackgroundSD and ZscoreJoinSD fields will be filled automatically according to user specifications, at a later step in the QHTCP study process.
|
||||
|
||||
* MATLAB ExpFrontend.m was made for recording into a spreadsheet ('StudiesDataArchive.txt') the date and files used (i.e., directory paths to the !!Results files used as input for Z-interaction script) for each multi-experiment study.
|
||||
Give each experiment the labels you wish to be used for the plots and specific files.
|
||||
Enter the desired Experiment names and order them in the way you want them to appear in the REMc heatmaps;
|
||||
Run the front end MATLAB programs in the correct order (e.g., run front end in 'exp1' folder to call the !!Results file for the experiment you named as exp1 in the StudyInfo.csv file)
|
||||
The GTA and pairwise, TSHeatmaps, JoinInteractions and GTF Heatmap scripts use this table to label results and heatmaps in a meaningful way for the user and others.
|
||||
The BackgroundSD and ZscoreJoinSD fields will be filled automatically according to user specifications, at a later step in the QHTCP study process.
|
||||
|
||||
* Open MATLAB and in the application navigate to each specific /Exp folder, call and execute ExpFrontend.m by clicking the play icon.
|
||||
* Use the "Open file" function from within Matlab.
|
||||
* Do not double-click on the file from the directory.
|
||||
* When prompted, navigate to the ExpJobs folder and the PrintResults folder within the correct job folder.
|
||||
* Repeat this for every Exp# folder depending on how many experiments are being performed.
|
||||
* Note: Before doing this, it's a good idea to compare the ref and non-ref CPP average and median values. If they are not approximately equal, then may be helpful to standardize Ref values to the measures of central tendency of the Non-refs, because the Ref CPPs are used for the z-scores, which should be centered around zero.
|
||||
* This script will copy the !!ResultsStd file (located in /PrintResults in the relevant job folder in /ExpJobs **rename this !!Results file before running front end; we normally use the 'STD' (not the 'ELR' file) chosen to the Exp# directory as can be seen in the “Current Folder” column in MATLAB, and it updates 'StudiesDataArchive.txt' file that resides in the /StudiesQHTCP folder. 'StudiesDataArchive.txt' is a log of file paths used for different studies, including timestamps.
|
||||
|
||||
Do this to document the names, dates and paths of all the studies and experiment data used in each study. Note, one should only have a single '!!Results…' file for each /Exp_ to prevent ambiguity and confusion. If you decide to use a new or different '!!Results…' sheet from what was used in a previous “QHTCP Study”, remove the one not being used. NOTE: if you copy a '!!Results…' file in by hand, it will not be recorded in the 'StudiesDataArchive.txt' file and so will not be documented for future reference. If you use the ExpFrontend.m utility it will append the new source for the raw !!Results… to the 'StudiesDataArchive.txt' file.
|
||||
As stated above, it is advantageous to think about the comparisons one wishes to make so as to order the experiments in a rational way as it relates to the presentation of plots. That is, which results from sheets and selected 'interaction … .R', user modified script, is used in /Exp1, Exp2, Exp3 and Exp4 as explained in the following section.
|
||||
TODO MUST CLEAN UP QHTCP TEMPLATE DIRECTORY
|
||||
|
||||
|
||||
As stated earlier, the user can add folders to back up temporary results, study-related notes, or other related work.
|
||||
However, it is advised to set up and use separate STUDIES when evaluating differing data sets whether that is from experiment results files or from differing data selections in the first interaction … .R script stage.
|
||||
This reduces confusion at the time of the study and especially for those reviewing study analysis in the future.
|
||||
How-To Procedure: Execute a Multi-experiment Study
|
||||
* Consider the goals of the study and design a strategy of experiments to include in the study.
|
||||
* Consider the quality of the experiment runs using EZview to see if there are systematic problems that are readily detectable.
|
||||
* In some cases, one may wish to design a 'pilot' study for discovery purposes.
|
||||
* There is no problem doing that, just take a template study, copy and rename it as XYZpilotStudy etc.
|
||||
* However, careful examination of the experimental results using EZview will likely save time in the long run.
|
||||
* One may be able to relatively quickly run the interaction Z scores (the main challenge there is the user creation of customized interaction… .R code.
|
||||
* I have tried to simplify this by locating the user edits near the top).
|
||||
|
||||
### qhtcp
|
||||
|
||||
System for Multi-QHTCP-Experiment Gene Interaction Profiling Analysis
|
||||
* Functional rewrite of REMcMaster3.sh, RemcMaster2.sh, REMcJar2.sh, ExpFrontend.m, mProcess.sh, mFunction.sh, mComponent.sh
|
||||
* Added a newline character to the end of StudyInfo.csv so it is a valid text file
|
||||
TODO Suggest renaming StudiesQHTCP to something like qhtcp qhtcp_output or output
|
||||
TODO Store StudyInfo somewhere better
|
||||
TODO Move (hide) the study template somewhere else
|
||||
TODO StudiesArchive should be smarter:
|
||||
* Create a database with as much information as possible
|
||||
* Write a function that easily loads and parses databse into easy-to-use variables
|
||||
* Allow users to reference those variables to write their own modules
|
||||
TODO Should not be using initials
|
||||
* not unique enough and we don't have that data easily on hand
|
||||
* usernames are unique and make more sense
|
||||
* I don't know what all would have to be modified atm
|
||||
|
||||
Rerunning this module uses rsync --update to only copy files that are newer in the template
|
||||
If you wish for the template to overwrite your changes, delete the file from your QHTCP project dir
|
||||
|
||||
To create a new study (Experiment Specific Interaction Zscores generation)
|
||||
|
||||
* StudyInfo.csv instructions:
|
||||
* In your files directory, open the /Code folder, edit the 'StudyInfo.csv' spreadsheet, and save it as a 'csv' file to give each experiment the labels you wish to be used for the plots and specific files.
|
||||
* Enter the desired Experiment names- **order the names in the way you want them to appear in the REMc heatmaps; and make sure to run the front end programs (below) in the correct order (e.g., run front end in 'exp1' folder to call the !!Results file for the experiment you named as exp1 in the StudyInfo.csv file)
|
||||
* The GTA and pairwise, TSHeatmaps, JoinInteractions and GTF Heatmap scripts use this table to label results and heatmaps in a meaningful way for the user and others. The BackgroundSD and ZscoreJoinSD fields will be filled automatically according to user specifications, at a later step in the QHTCP study process.
|
||||
|
||||
* MATLAB ExpFrontend.m was made for recording into a spreadsheet ('StudiesDataArchive.txt') the date and files used (i.e., directory paths to the !!Results files used as input for Z-interaction script) for each multi-experiment study.
|
||||
Give each experiment the labels you wish to be used for the plots and specific files.
|
||||
Enter the desired Experiment names and order them in the way you want them to appear in the REMc heatmaps;
|
||||
Run the front end MATLAB programs in the correct order (e.g., run front end in 'exp1' folder to call the !!Results file for the experiment you named as exp1 in the StudyInfo.csv file)
|
||||
The GTA and pairwise, TSHeatmaps, JoinInteractions and GTF Heatmap scripts use this table to label results and heatmaps in a meaningful way for the user and others.
|
||||
The BackgroundSD and ZscoreJoinSD fields will be filled automatically according to user specifications, at a later step in the QHTCP study process.
|
||||
|
||||
* Open MATLAB and in the application navigate to each specific /Exp folder, call and execute ExpFrontend.m by clicking the play icon.
|
||||
* Use the "Open file" function from within Matlab.
|
||||
* Do not double-click on the file from the directory.
|
||||
* When prompted, navigate to the ExpJobs folder and the PrintResults folder within the correct job folder.
|
||||
* Repeat this for every Exp# folder depending on how many experiments are being performed.
|
||||
* Note: Before doing this, it's a good idea to compare the ref and non-ref CPP average and median values. If they are not approximately equal, then may be helpful to standardize Ref values to the measures of central tendency of the Non-refs, because the Ref CPPs are used for the z-scores, which should be centered around zero.
|
||||
* This script will copy the !!ResultsStd file (located in /PrintResults in the relevant job folder in /ExpJobs **rename this !!Results file before running front end; we normally use the 'STD' (not the 'ELR' file) chosen to the Exp# directory as can be seen in the “Current Folder” column in MATLAB, and it updates 'StudiesDataArchive.txt' file that resides in the /StudiesQHTCP folder. 'StudiesDataArchive.txt' is a log of file paths used for different studies, including timestamps.
|
||||
|
||||
Do this to document the names, dates and paths of all the studies and experiment data used in each study. Note, one should only have a single '!!Results…' file for each /Exp_ to prevent ambiguity and confusion. If you decide to use a new or different '!!Results…' sheet from what was used in a previous “QHTCP Study”, remove the one not being used. NOTE: if you copy a '!!Results…' file in by hand, it will not be recorded in the 'StudiesDataArchive.txt' file and so will not be documented for future reference. If you use the ExpFrontend.m utility it will append the new source for the raw !!Results… to the 'StudiesDataArchive.txt' file.
|
||||
As stated above, it is advantageous to think about the comparisons one wishes to make so as to order the experiments in a rational way as it relates to the presentation of plots. That is, which results from sheets and selected 'interaction … .R', user modified script, is used in /Exp1, Exp2, Exp3 and Exp4 as explained in the following section.
|
||||
TODO MUST CLEAN UP QHTCP TEMPLATE DIRECTORY
|
||||
|
||||
|
||||
As stated earlier, the user can add folders to back up temporary results, study-related notes, or other related work.
|
||||
However, it is advised to set up and use separate STUDIES when evaluating differing data sets whether that is from experiment results files or from differing data selections in the first interaction … .R script stage.
|
||||
This reduces confusion at the time of the study and especially for those reviewing study analysis in the future.
|
||||
How-To Procedure: Execute a Multi-experiment Study
|
||||
* Consider the goals of the study and design a strategy of experiments to include in the study.
|
||||
* Consider the quality of the experiment runs using EZview to see if there are systematic problems that are readily detectable.
|
||||
* In some cases, one may wish to design a 'pilot' study for discovery purposes.
|
||||
* There is no problem doing that, just take a template study, copy and rename it as XYZpilotStudy etc.
|
||||
* However, careful examination of the experimental results using EZview will likely save time in the long run.
|
||||
* One may be able to relatively quickly run the interaction Z scores (the main challenge there is the user creation of customized interaction… .R code.
|
||||
* I have tried to simplify this by locating the user edits near the top).
|
||||
|
||||
## GTF
|
||||
|
||||
GTF module for QHTCP
|
||||
TODO which components of remc can be parallelized?
|
||||
The submodules in remc really like to be run from the REMc dir
|
||||
so we pop in and out for now
|
||||
NOTE the remc modules could use some love
|
||||
* Don't cd within scripts, it's confusing
|
||||
* Use arguments to pass configuration variables
|
||||
* This allows us to abstract the program away in script-run-workflow and treat it like a module
|
||||
|
||||
### remc
|
||||
|
||||
GTF module for QHTCP
|
||||
TODO which components of remc can be parallelized?
|
||||
The submodules in remc really like to be run from the REMc dir
|
||||
so we pop in and out for now
|
||||
NOTE the remc modules could use some love
|
||||
* Don't cd within scripts, it's confusing
|
||||
* Use arguments to pass configuration variables
|
||||
* This allows us to abstract the program away in script-run-workflow and treat it like a module
|
||||
|
||||
## GTF
|
||||
|
||||
GTF module for QHTCP
|
||||
|
||||
### gtf
|
||||
|
||||
GTF module for QHTCP
|
||||
|
||||
## GTA
|
||||
|
||||
GTA module for QHTCP
|
||||
NOTES
|
||||
* Heavily modified GTAtemplate.R
|
||||
TODO
|
||||
*
|
||||
*
|
||||
|
||||
### gta
|
||||
|
||||
GTA module for QHTCP
|
||||
NOTES
|
||||
* Heavily modified GTAtemplate.R
|
||||
TODO
|
||||
*
|
||||
*
|
||||
|
||||
#### Variables set
|
||||
|
||||
* **GTA_OUT_DIR** (string): The GTA output results dir
|
||||
* **all_sgd_terms_csv** (string): The all_SGD_GOTerms_for_QHTCPtk.csv file
|
||||
* **sgd_terms_tfile** (string): The go_terms.tab file
|
||||
* **sgd_features_file** (string): The gene_association.sgd file
|
||||
* **gene_ontology_file** (string): The gene_ontology_edit.obo file
|
||||
* **zscores_file** (string): The ZScores_interaction.csv file
|
||||
|
||||
## Submodules
|
||||
|
||||
Submodules provide functionality to modules and should be reusable
|
||||
A submodule only runs by default if called by a module
|
||||
Use a submodule for:
|
||||
* Calling external scripts
|
||||
* Performing repetitive tasks
|
||||
* Generalizing code
|
||||
* Functions you do not want to perform by default (submodules should be called modules)
|
||||
* Should not call cd or pushd (let module dictate)
|
||||
|
||||
### r_gta
|
||||
|
||||
GTAtemplate R script
|
||||
TODO:
|
||||
* Is GTAtemplate.R actually a template?
|
||||
|
||||
Files:
|
||||
* gene_association.sgd: https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd
|
||||
* go_terms.tab
|
||||
|
||||
Output:
|
||||
*
|
||||
|
||||
This submodule:
|
||||
*
|
||||
*
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Exp# name
|
||||
* **$2** (string): ZScores_Interaction.csv file
|
||||
* **$3** (string): go_terms.tab file
|
||||
* **$4** (string): gene_association.sgd
|
||||
* **$5** (string): output directory
|
||||
|
||||
### r_gta_pairwiselk
|
||||
|
||||
PairwiseLK.R R script
|
||||
TODO:
|
||||
* Should move directory creation from PairwiseLK.R to gta module
|
||||
|
||||
Files:
|
||||
*
|
||||
*
|
||||
|
||||
Output:
|
||||
*
|
||||
|
||||
This submodule:
|
||||
* Will perform both L and K comparisons for the specified experiment folders.
|
||||
* The code uses the naming convention of PairwiseCompare_Exp’#’-Exp’#’ to standardize and keep simple the structural naming (where ‘X’ is either K or L and ‘Y’ is the number of the experiment GTA results to be found in ../GTAresult/Exp_).
|
||||
* {FYI There are also individual scripts that just do the ‘L’ or ‘K’ pairwise studies in the ../Code folder.}
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): First Exp# name
|
||||
* **$2** (string): Second Exp# name
|
||||
* **$3** (string): StudyInfo.txt file
|
||||
* **$4** (string): output directory
|
||||
|
||||
### r_gta_heatmaps
|
||||
|
||||
TSHeatmaps5dev2.R R script
|
||||
TODO:
|
||||
* Script could use rename
|
||||
* Script should be refactored to automatically allow more studies
|
||||
* Script should be refactored with more looping to reduce verbosity
|
||||
|
||||
Files:
|
||||
*
|
||||
*
|
||||
|
||||
Output:
|
||||
*
|
||||
|
||||
This submodule:
|
||||
* The Term Specific Heatmaps are produced directly from the ../ExpStudy/Exp_/ZScores/ZScores_Interaction.csv file generated by the user modified interaction… .R script.
|
||||
* The heatmap labeling is per the names the user wrote into the StudyInfo.txt spreadsheet.
|
||||
* Verify that the All_SGD_GOTerms_for_QHTCPtk.csv found in ../Code is what you wish to use or if you wish to use a custom modified version.
|
||||
* If you wish to use a custom modified version, create it and modify the TSHeatmaps template script (TSHeatmaps5dev2.R) and save it as a ‘TSH_study specific name’.
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): StudyInfo.csv file
|
||||
* **$2** (string): gene_ontology_edit.obo file
|
||||
* **$3** (string): go_terms.tab file
|
||||
* **$4** (string): All_SGD_GOTerms_for_QHTCPtk.csv
|
||||
* **$5** (string): ZScores_interaction.csv
|
||||
* **$6** (string): base directory
|
||||
* **$7** (string): output directory
|
||||
|
||||
### mat_exp_frontend
|
||||
|
||||
Run the ExpFrontend.m program
|
||||
This submodule:
|
||||
* Pushes into the Study template directory (ExpTemplate)
|
||||
* Prompts the user to run ExpFrontend.m
|
||||
* Pops out
|
||||
NOTES:
|
||||
* ExpFrontend.m should be or is being rewritten
|
||||
|
||||
### r_interactions
|
||||
|
||||
Run the R interactions analysis (Z_InteractionTemplate.R)
|
||||
TODO
|
||||
* don't want to rename Z_InteractionTemplate.R because that will break logic, just edit in place instead
|
||||
NOTES
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): The current working directory
|
||||
|
||||
### r_join_interact
|
||||
|
||||
JoinInteractExps3dev.R creates REMcRdy_lm_only.csv and Shift_only.csv
|
||||
|
||||
### java_extract
|
||||
|
||||
Jingyu's REMc java utility using file input file REMcRdy_lm_only.csv
|
||||
and output REMcRdy_lm_only.csv-finalTable.csv
|
||||
|
||||
### r_add_shift_values
|
||||
|
||||
Add shift values back to REMcRdy_lm_only.csv-finalTable.csv
|
||||
and output "REMcWithShift.csv" for use with the REMc heat maps
|
||||
|
||||
### r_heat_maps_zscores
|
||||
|
||||
Execute REMcHeatmaps_zscores.R
|
||||
|
||||
### r_heat_maps_homology
|
||||
|
||||
Execute REMcHeatmaps_Z_lm_wDAmPs_andHomology_221212.R
|
||||
TODO this R script needs configurable output so we don't need to push/pop
|
||||
|
||||
### py_gtf_dcon
|
||||
|
||||
Perform python dcon portion of GTF
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Directory to process
|
||||
* **$2** (string): Output directory name
|
||||
|
||||
### pl_gtf
|
||||
|
||||
Perl modules for GTF
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Working directory
|
||||
* **$2** (string): Output directory name to look for txt files
|
||||
|
||||
### pl_gtf_analyze
|
||||
|
||||
Perl analyze submodule
|
||||
This seems weird to me because we're just overwriting the same data for all set2 members
|
||||
https://metacpan.org/dist/GO-TermFinder/view/examples/analyze.pl
|
||||
Is there a reason you need a custom version and not the original from cpan?
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Set 1 TODO naming
|
||||
* **$2** (string): Set 2 TODO naming
|
||||
|
||||
### pl_gtf_terms2tsv
|
||||
|
||||
Perl terms2tsv submodule
|
||||
Probably should be translated to shell/python
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Terms file TODO naming
|
||||
|
||||
### py_gtf_concat
|
||||
|
||||
Python concat submodule for GTF
|
||||
Concat the process ontology outputs from the /REMcReady_lm_only folder
|
||||
Probably should be translated to bash
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): working directory
|
||||
* **$2** (string): output directory name to look for txt files
|
||||
* **$3** (string): output file
|
||||
|
||||
### r_compile_gtf
|
||||
|
||||
Compile GTF in R
|
||||
|
||||
_Function has no arguments._
|
||||
|
||||
### get_studies
|
||||
|
||||
Parse study names from StudyInfo.csv files
|
||||
TODO: This whole submodule should eventually be either
|
||||
* Removed
|
||||
* Expanded into a file that stores all project/study settings (database)
|
||||
I had to had a new line to the end of StudyInfo.csv, may break things?
|
||||
Example:
|
||||
ExpNumb,ExpLabel,BackgroundSD,ZscoreJoinSD,AnalysisBy
|
||||
1,ExpName1,NA,NA,UserInitials
|
||||
2,ExpName2,NA,NA,UserInitials
|
||||
3,ExpName3,NA,NA,UserInitials
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): File to read
|
||||
|
||||
#### Variables set
|
||||
|
||||
* **STUDIES_NUMS** (array): Contains Exp numbers
|
||||
* **NUM_STUDIES** (int): Number of existing studies
|
||||
|
||||
#### Exit codes
|
||||
|
||||
* **0**: If one or more studies found
|
||||
* **1**: If no studies found
|
||||
|
||||
### get_easy_results
|
||||
|
||||
Gets info about EASY output in the project's scans directory
|
||||
TODO: Standardize EASY output, it's hard to understand
|
||||
|
||||
#### Arguments
|
||||
|
||||
* **$1** (string): Project scans (ExpJobs)
|
||||
|
||||
#### Variables set
|
||||
|
||||
* **EASY_RESULTS_DIRS** (array): Globbed results files from SCANS_DIR/
|
||||
* **EASY_RESULTS_FILES** (array): Globbed results files from SCANS_DIR/
|
||||
|
||||
#### Exit codes
|
||||
|
||||
* **0**: if at least one results directory exists
|
||||
* **1**: if no results directories exist
|
||||
|
||||
## Documentation
|
||||
|
||||
Generates markdown documentation from this script using shdoc
|
||||
|
||||
TODO
|
||||
* We can include images in the markdown file but not natively with shdoc
|
||||
* Need to add a post processor
|
||||
* Or use a 'veryuniqueword' and some fancy sed
|
||||
|
||||
### documentation
|
||||
|
||||
Generates markdown documentation from this script using shdoc
|
||||
|
||||
TODO
|
||||
* We can include images in the markdown file but not natively with shdoc
|
||||
* Need to add a post processor
|
||||
* Or use a 'veryuniqueword' and some fancy sed
|
||||
|
||||
_Function has no arguments._
|
||||
|
||||
Reference in New Issue
Block a user