AddedDocNoteForLookupTables #2
Open
zimingz wants to merge 129 commits into
Open
Conversation
Merge preprocessing branch w/ master
Modified clustersubseq to perform over 4 different flag seqs, which are keys to scaled syn/rep
Updates: MASS-PRF was written in the standard C++ programming language. The software package is accompanied by a manual document, example data, source codes, and compiled executable commands for Windows/Linux/Mac. Source codes are released to GPLv3, and can be downloaded from https://github.com/Townsend-Lab-Yale/MASSPRF_10July2016/.
-SCL 0 for no scaling -SCL 1 for automatic scaling -SCL <num> for user defined scaling
The thresholds of gamma thresholds for positive and negative selections.
Updated compiling command without 'make'; put the C++ version and thread details in.
Added the information for MASSPRF pipeline folder, and simulation folder.
Update PRFCluster.cpp
Update PRFCluster.h
Change 1800 to 2700 to adjust to a min_scale_length of 900
…-values of the 2x2 contingency tables.
added under the session 'How to run MASS-PRF?': - "Note: The program requires the four LookupTables in the working directory to run successfully, for more details about the LookupTables, please refer to the session ‘Gamma calculation using four Lookup Tables’ below."
Silent clustering -s 1 is the default option.
-s 1 is the default, the default is clustering silent sites.
Revised README.md to include detailed installation and setup instructions This update improves the README file by integrating comprehensive installation steps, usage guidance, and symlink setup for the MASS-PRF pipeline. It consolidates information from existing documentation to ensure users have a streamlined and clear setup process.
1. Update Time Output Format to Include Leading Zeros
Original Code:
int h = t / 3600, m = (t % 3600) / 60, s = t % 60;
if (h) cout << h << ":" << m << ":" << s << endl;
else cout << m << ":" << s << endl;
Modified Code:
int h = t / 3600, m = (t % 3600) / 60, s = t % 60;
if (h)
cout << setw(2) << setfill('0') << h << ":"
<< setw(2) << setfill('0') << m << ":"
<< setw(2) << setfill('0') << s << endl;
else
cout << setw(2) << setfill('0') << m << ":"
<< setw(2) << setfill('0') << s << endl;
These scripts were originally developed by Prof. Nic Fisk, Associate Professor at URI and a friend of the lab, to map selection pressures onto 3D protein structures. They were added to MASSPRF, with his permission, to facilitate 3D visualization of selection mapping.
These scripts were originally developed by Prof. Nic Fisk, Associate Professor at URI and a friend of the lab, to map selection pressures onto 3D protein structures. They were added to MASSPRF, with his permission, to facilitate 3D visualization of selection mapping.
Improved parsing robustness — the script now tolerates minor format changes in MASS-PRF outputs. Standardized per-nucleotide expansion for consistent 3D mapping. Cleaner failure handling and logging (Failed_genes.txt). Normalized output columns and generic labels for both NT and AA contexts. Safer filename handling when gene names contain underscores.
What changed
Added fixed gamma range with two new params:
minGamma = -4
maxGamma = 50
Colors are generated with a split palette (negative → blue, positive → red) centered at 0.
γ values outside [minGamma, maxGamma] are clamped to the edge bins.
When logT is numeric (e.g., 2), signed-log mapping respects the same fixed range.
Conditional installs for BiocManager, msa, and bio3d to avoid redundant installs.
Why
Make cross-gene / cross-run color scales comparable and stable.
Prevent extreme γ values from skewing palettes.
Backwards compatibility
If all γ already fall within the new range, visual results remain qualitatively consistent.
Notes
Ensure Biostrings is installed: BiocManager::install("Biostrings").
This release adds a simple non-genic mode and fixes a rare stability issue. Core results for coding runs are unchanged. Non-genic mode (`-ng 1`) - New per-nucleotide mode for non-coding regions (intergenic / intronic / UTR). - Codon/synonymous logic is turned off; every variable site is treated as replacement (R). - PS/DS, MKT, and NI are skipped (reported as `NA`); PR/DR and Gamma are still reported. - Use `-t <div_time>` to reuse divergence time estimated from coding runs. - Recommended for non-genic runs: `-ng 1 -o 1 -t <dt>`. Stability fix (no change to results) - Fixed a rare crash of the form: `blew fast model num ... 0.999193`. - Internal model sampling now uses a normalized CDF in `[0,1)` (standard inverse-CDF draw). - This does **not** change model probabilities or estimates; it only removes the crash.
upadate .h
…ng 1` non-genic mode). - Added `--non_genic` for MASS-PRF runs with `-ng 1`. → 2D skips PS/DS-based panels and keeps only Gamma + CI plots and site lists. - Added `--scale <k>` to set the scaling factor when it is missing from MASS-PRF output. → If no scaling is found, the script now safely defaults to scale = 1 instead of stopping. - More robust parsing of the results table and “Mission accomplished” marker. → Small format changes in the output are handled better; fewer false failures. - Standardized position expansion. → When scaling is used, positions are expanded to a clean 1..N grid for consistent 3D coloring. - Backward compatible. → If you do not use the new flags, behavior and outputs remain the same as before.
- Fix: -gap_policy command-line argument was silently ignored; now correctly parsed and applied (strict/pairwise/threshold) - Change: -gap_policy now accepts named strings instead of integers (strict=0, pairwise=1, threshold=2) for clarity - Fix: PR and DR clustering now print a Warning and skip gracefully when sites are too few (PR<2 or DR<2), instead of throwing an error and exiting; consistent with existing PS/DS behavior - Update README: full rewrite with system requirements, installation, complete first-example tutorial, gap policy docs, 2D/3D tool guide, common warnings, and tested-on information (AWS EC2, Yale McCleary HPC) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expanded the explanation of MASS-PRF to clarify its methodology and significance in quantifying natural selection across protein-coding genes.
…e tree - Remove bin/massprf (macOS pre-compiled binary, not cross-platform) - Remove bin/massprf.dSYM/ (macOS debug symbol bundle) - Add .gitignore to prevent compiled binary from being committed again - Fix README file tree: LookupTable_*.dat correctly shown under bin/, and massprf binary noted as generated during installation
- Fix memory and runtime estimates in scaling table (actual values measured on AWS EC2 t3.large, 8 GB RAM): Attacin-C and FZF1 use ~7-8 GB peak RAM and ~20-30s; PanI uses ~5-6 GB and ~1.5-2 hours; YIR024C completes in seconds - Fix tutorial commands: add examples/ prefix to all .fas file paths - Add verified output files for all four example datasets (v1.31, BIC criterion, default settings, tested on EC2 t3.large Ubuntu 24.04) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updated version information and references in README.
…parison - Add verified output files for all four example datasets run on AWS EC2 t4g.large (ARM64/Graviton, Ubuntu 24.04, 8 GB RAM) - Update expected runtime table to compare x86_64 and ARM64 performance - Update system requirements note to mention both architectures - ARM64 installation procedure is identical to x86_64 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove --ng flag: scaling is now always auto-detected from the MASS-PRF output regardless of whether -ng mode was used. The flag previously forced scaling=1 in non-genic mode, which incorrectly suppressed position expansion when -SCL was also used. - Simplify x-axis label to 'position' (no longer conditional on --ng) - Rewrite 2D_Mapping_Scripts/README.md: full beginner-friendly documentation covering requirements, quick start, output formats, plot interpretation, site list thresholds, 3D hand-off checklist, and troubleshooting
- Add 5 AlphaFold PDB files (NPC2, REX4, NBR9, COQ11, ERG11) to example-inputs/PDB_files/ - Add corresponding nucleotide FASTA (.fna) and MASS-PRF output (.csv) files - Replace example-inputs/design.tsv with portable relative-path version (5 columns) - Update batchMASSPRF_To_Chimera.R: silently drop extra design-file columns (e.g. notes) - Rewrite README with step-by-step Figure 4 reproduction tutorial for new users
…utputs - PRFCluster.cpp: fix PR/DR clustering guard that prevented rep_pol/rep_div from being populated in non-genic mode, causing segfault in r_stochastic - README: correct memory scaling table based on empirical AWS testing; update runtime table to v2.0 values; add -ng usage notes and PS=DS=0 warning; add -t 5 to YIR024C example command - examples/: add v2.0 ARM64 reference outputs for all four datasets
All four datasets run to completion on AWS EC2 x86_64 (Intel Xeon 2.50GHz, 8 vCPU, 30 GB RAM, Ubuntu 24.04): - Attacin-C: 14 min 16 sec, peak 8.8 GB RAM - FZF1: 26 min 9 sec, peak 16.7 GB RAM - PanI: 10 min 38 sec, peak 5.6 GB RAM - YIR024C: 52 sec, peak ~8 MB RAM (with -t 5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added under the session 'How to run MASS-PRF?'
'Note: The program requires the four LookupTables in the working directory to run successfully, for more details about the LookupTables, please refer to the session ‘Gamma calculation using four Lookup Tables’ below.'