Dariusz Murakowski [Thu, 3 Jan 2019 03:03:16 +0000 (22:03 -0500)]
Release under GNU AGPLv3 or later
Dariusz Murakowski [Mon, 27 Jul 2015 21:41:35 +0000 (17:41 -0400)]
Add options for separate inverse temperature (beta) multipliers for fields and couplings.
Dariusz Murakowski [Tue, 21 Jul 2015 20:56:37 +0000 (16:56 -0400)]
Add option to initialize state completely randomly.
Dariusz Murakowski [Thu, 16 Jul 2015 04:11:49 +0000 (00:11 -0400)]
Uniform random integer generation (by rejection sampling).
Dariusz Murakowski [Thu, 16 Jul 2015 04:07:16 +0000 (00:07 -0400)]
Clean up trailing ^M characters.
Dariusz Murakowski [Thu, 16 Jul 2015 03:30:09 +0000 (23:30 -0400)]
Optionally track relative contribution to energy from fields and couplings during MC sampling.
Dariusz Murakowski [Thu, 16 Jul 2015 01:17:32 +0000 (21:17 -0400)]
Close file handles only when opened. Add make flag for debug build.
Dariusz Murakowski [Mon, 6 Jul 2015 16:28:15 +0000 (12:28 -0400)]
Add `make` rule for MC code.
Dariusz Murakowski [Mon, 6 Jul 2015 16:20:15 +0000 (12:20 -0400)]
Code for doing Potts Monte Carlo (optionally with fixed epitope), from John Barton
20150630.
Dariusz Murakowski [Fri, 26 Jun 2015 20:20:04 +0000 (16:20 -0400)]
(minor) Don't build old Monte Carlo code. Print to stderr and throw exception. ctags -a -R.
Dariusz Murakowski [Fri, 26 Jun 2015 20:18:33 +0000 (16:18 -0400)]
Add secret help option (--help-rates) to show meaning of reaction rate constants.
Dariusz Murakowski [Fri, 26 Jun 2015 20:15:24 +0000 (16:15 -0400)]
Add command-line option/flag to flush each output line when printing to stdout.
Dariusz Murakowski [Fri, 26 Jun 2015 02:55:21 +0000 (22:55 -0400)]
Counter (dummy species) for viruses that have escaped T cell recognition.
Dariusz Murakowski [Fri, 26 Jun 2015 00:35:22 +0000 (20:35 -0400)]
Only add reactions with non-zero rate constants.
Dariusz Murakowski [Fri, 26 Jun 2015 00:15:18 +0000 (20:15 -0400)]
Document goto/come-from(-like) behavior. Clean up junk code comments.
Dariusz Murakowski [Thu, 25 Jun 2015 23:56:59 +0000 (19:56 -0400)]
Check number of inserted sites. Use unsigned int instead of size_t.
Dariusz Murakowski [Thu, 25 Jun 2015 23:43:16 +0000 (19:43 -0400)]
Proper indexing for multiple (>1) redundant sites.
Dariusz Murakowski [Thu, 25 Jun 2015 20:09:25 +0000 (16:09 -0400)]
Copy J matrix in blocks, padding with empty entries.
Dariusz Murakowski [Tue, 23 Jun 2015 08:49:19 +0000 (04:49 -0400)]
WIP attempt to insert dummy sites into J for degenerate/singular Potts states representing all amino acids ("X").
Dariusz Murakowski [Tue, 23 Jun 2015 08:47:59 +0000 (04:47 -0400)]
Add some bounds-checking to the couplings-array accesses during energy calculation.
Dariusz Murakowski [Tue, 23 Jun 2015 06:10:53 +0000 (02:10 -0400)]
Define state2aa properly.
Dariusz Murakowski [Tue, 23 Jun 2015 03:49:38 +0000 (23:49 -0400)]
Implement write_mod and esc_all for non-epitope WF run.
Conflicts:
wf.cpp
Dariusz Murakowski [Tue, 23 Jun 2015 03:36:14 +0000 (23:36 -0400)]
Numerical stability modification to sigmoid function (for survival probability).
Merge commit 'c6cabec'
Dariusz Murakowski [Tue, 23 Jun 2015 03:32:12 +0000 (23:32 -0400)]
Cosmetic changes to comments, format, and spacing.
Conflicts:
wf.cpp
Dariusz Murakowski [Wed, 17 Jun 2015 18:53:43 +0000 (14:53 -0400)]
Implement write_mod and esc_all for non-epitope WF run.
Dariusz Murakowski [Wed, 17 Jun 2015 17:48:32 +0000 (13:48 -0400)]
Make only `wf` (Wright-Fisher code).
Dariusz Murakowski [Wed, 17 Jun 2015 17:48:16 +0000 (13:48 -0400)]
Numerical stability modification to sigmoid function (for survival probability).
Dariusz Murakowski [Wed, 17 Jun 2015 17:29:18 +0000 (13:29 -0400)]
Cosmetic changes to comments, format, and spacing.
Dariusz Murakowski [Mon, 15 Jun 2015 22:20:28 +0000 (18:20 -0400)]
Remove two-site Hamiltonian.
Dariusz Murakowski [Fri, 12 Jun 2015 23:20:19 +0000 (19:20 -0400)]
:retab (replace \t with normal whitespace).
Dariusz Murakowski [Fri, 12 Jun 2015 21:26:30 +0000 (17:26 -0400)]
Rescale rates by system volume ratio (parameter).
Dariusz Murakowski [Thu, 14 May 2015 21:52:56 +0000 (17:52 -0400)]
CTL killing reactions are smart about virus-changing reactions (by tracking last-changed species).
Dariusz Murakowski [Sat, 9 May 2015 17:24:46 +0000 (13:24 -0400)]
Recalculate differently based on what reaction caused propensity "change" (currently: does not matter).
Dariusz Murakowski [Sat, 9 May 2015 17:15:17 +0000 (13:15 -0400)]
Test script for Potts code.
Dariusz Murakowski [Thu, 7 May 2015 21:06:25 +0000 (17:06 -0400)]
Clean up extra debug printing.
Dariusz Murakowski [Thu, 7 May 2015 20:47:28 +0000 (16:47 -0400)]
Fix some dependents. Modify total propensity instead of totally re-sum.
Dariusz Murakowski [Wed, 6 May 2015 19:34:38 +0000 (15:34 -0400)]
Handle dependencies between reactions, only recalculating propensity when affected. Tons of extra debugging stuff.
Dariusz Murakowski [Wed, 6 May 2015 19:25:54 +0000 (15:25 -0400)]
Option to print trajectory every N steps.
Dariusz Murakowski [Fri, 1 May 2015 22:38:20 +0000 (18:38 -0400)]
Allow passing script names into unit test runner. (Default: all *.test files.)
Dariusz Murakowski [Fri, 1 May 2015 22:30:24 +0000 (18:30 -0400)]
Unit testing for Ising using compensatory landscape from Krishna (not his RC_fun though).
Dariusz Murakowski [Fri, 1 May 2015 04:18:36 +0000 (00:18 -0400)]
Copy constructor for Virus and NTVirus object to reduce unnecessary energy calculations.
Dariusz Murakowski [Fri, 1 May 2015 02:47:26 +0000 (22:47 -0400)]
Fix subtle rare bug involving next timestep = infinity. Also prevent first rxn firing with zero propensity.
Dariusz Murakowski [Wed, 29 Apr 2015 22:08:32 +0000 (18:08 -0400)]
Firing the viral growth/death reactions should probably iterate over the entire map container....
Dariusz Murakowski [Wed, 29 Apr 2015 20:56:40 +0000 (16:56 -0400)]
Terminally differentiated effector cell needs additional death term. RC_fun = exp(-E) to match SSC.
Dariusz Murakowski [Tue, 28 Apr 2015 04:04:27 +0000 (00:04 -0400)]
ctags -a -R
Dariusz Murakowski [Tue, 28 Apr 2015 03:59:05 +0000 (23:59 -0400)]
Reactions accounting for propagation of CTL divisions.
Dariusz Murakowski [Tue, 28 Apr 2015 02:32:07 +0000 (22:32 -0400)]
Framework for multiple divisions (i.e. generations) of effector T cells.
Dariusz Murakowski [Mon, 27 Apr 2015 21:13:02 +0000 (17:13 -0400)]
Swap M and T in setting up CTL reactions (Ising).
Dariusz Murakowski [Mon, 27 Apr 2015 20:33:10 +0000 (16:33 -0400)]
Set up reactions for CTLs recognizing amino acids.
Dariusz Murakowski [Mon, 27 Apr 2015 20:13:44 +0000 (16:13 -0400)]
Import Potts epitope (amino acid sequence). Helper split() function on arbitrary delimiter.
Dariusz Murakowski [Fri, 24 Apr 2015 14:29:53 +0000 (10:29 -0400)]
Save mapping of Potts state to amino acid as well. Virus object has no access though.
Dariusz Murakowski [Fri, 24 Apr 2015 13:21:16 +0000 (09:21 -0400)]
Initialize distribution of nt seqs from file. Print (aggregate) unique amino acid seqs.
Dariusz Murakowski [Fri, 24 Apr 2015 08:28:52 +0000 (04:28 -0400)]
Start runtime framework for executing Potts system. Break out initialization routine.
Dariusz Murakowski [Fri, 24 Apr 2015 08:07:14 +0000 (04:07 -0400)]
Fix the build: delete all the temporary testing stuff.
Dariusz Murakowski [Fri, 24 Apr 2015 08:05:17 +0000 (04:05 -0400)]
Define all the reactions for Potts virus, handling nucleotide-level mutations.
Dariusz Murakowski [Fri, 24 Apr 2015 08:03:35 +0000 (04:03 -0400)]
Map the nt enum to and from character representation.
Dariusz Murakowski [Fri, 24 Apr 2015 07:05:20 +0000 (03:05 -0400)]
Construct recognizer from epitope string (and starting location).
Dariusz Murakowski [Fri, 24 Apr 2015 06:50:08 +0000 (02:50 -0400)]
CTL for recognizing arbitrary amino acid sequence as epitope.
Dariusz Murakowski [Fri, 24 Apr 2015 06:34:30 +0000 (02:34 -0400)]
Potts state mapping+tracking complete. Fix bounds check error in energy calculation.
Dariusz Murakowski [Fri, 24 Apr 2015 04:18:38 +0000 (00:18 -0400)]
Significant speed-up by inlining GSL RNG functions (~20% in short tests).
Dariusz Murakowski [Fri, 24 Apr 2015 04:15:13 +0000 (00:15 -0400)]
Copy over code to read seq2state file, which gives amino acid identity of each Potts state.
Dariusz Murakowski [Fri, 24 Apr 2015 03:10:32 +0000 (23:10 -0400)]
Start of Potts / amino acid / nucleotide-based virus species.
Dariusz Murakowski [Fri, 24 Apr 2015 02:16:25 +0000 (22:16 -0400)]
Avoid multiple defs of translators by only declaring in header. Now const, so must use .at(), not [].
Dariusz Murakowski [Thu, 23 Apr 2015 08:02:31 +0000 (04:02 -0400)]
Scrap enum class definitions. Clean up seqTools.
Dariusz Murakowski [Thu, 23 Apr 2015 06:21:33 +0000 (02:21 -0400)]
Copy seqTools.cpp to seqTools.h for inclusion to main.
Dariusz Murakowski [Thu, 23 Apr 2015 06:18:24 +0000 (02:18 -0400)]
Break normal functionality for testing! Separate beta (inverse temperature).
Dariusz Murakowski [Thu, 23 Apr 2015 05:37:30 +0000 (01:37 -0400)]
Solve warning about comparison between signed and unsigned integer expressions.
Dariusz Murakowski [Thu, 23 Apr 2015 05:04:26 +0000 (01:04 -0400)]
Copy John's Potts code from snip.{cpp,h}.
Dariusz Murakowski [Thu, 23 Apr 2015 04:27:50 +0000 (00:27 -0400)]
Decipher Potts encoding of sequence state/configuration.
Dariusz Murakowski [Wed, 22 Apr 2015 03:39:59 +0000 (23:39 -0400)]
WF: correctly use init pop frac.
Dariusz Murakowski [Wed, 22 Apr 2015 03:09:54 +0000 (23:09 -0400)]
Testing nucleotide <-> amino acid translation. Needs C++0x.
Compile with:
g++ -std=c++0x -o seqTools seqTools.cpp
Dariusz Murakowski [Tue, 21 Apr 2015 22:08:18 +0000 (18:08 -0400)]
Remove mutation rate "mu" from Virus object; now exclusively in reaction.
Dariusz Murakowski [Tue, 21 Apr 2015 21:32:20 +0000 (17:32 -0400)]
Update Makefile with header dependencies.
Dariusz Murakowski [Tue, 21 Apr 2015 21:00:55 +0000 (17:00 -0400)]
Multiple runs, more rate args, end simulation when all reactions exhausted.
Dariusz Murakowski [Tue, 21 Apr 2015 19:37:56 +0000 (15:37 -0400)]
Print virus species sequence when verbose.
Dariusz Murakowski [Tue, 21 Apr 2015 19:02:50 +0000 (15:02 -0400)]
Formatting: retab, clean whitespace.
Dariusz Murakowski [Tue, 21 Apr 2015 18:47:42 +0000 (14:47 -0400)]
Delete unused functions for SS.
Dariusz Murakowski [Tue, 21 Apr 2015 18:37:46 +0000 (14:37 -0400)]
Clarify dependencies. Copy hamiltonian.{cpp,h} to ham_ss.{cpp,h}. Copy contents of virus.{cpp,h} into pop_ss.{cpp,h}.
Dariusz Murakowski [Tue, 21 Apr 2015 18:24:40 +0000 (14:24 -0400)]
Virus reproduction reaction stores its own mutation rate.
Dariusz Murakowski [Tue, 21 Apr 2015 18:18:09 +0000 (14:18 -0400)]
Free memory from species and reaction arrays (to satisfy some valgrind).
Dariusz Murakowski [Tue, 21 Apr 2015 17:27:18 +0000 (13:27 -0400)]
Proper species names. Initial counts CTL counts for each type.
Dariusz Murakowski [Sat, 18 Apr 2015 00:32:55 +0000 (20:32 -0400)]
Output at intervals, remove more WF.
Dariusz Murakowski [Fri, 17 Apr 2015 18:25:35 +0000 (14:25 -0400)]
Clean out WF-only stuff.
Dariusz Murakowski [Fri, 17 Apr 2015 17:18:25 +0000 (13:18 -0400)]
Full system, including parameters.
Dariusz Murakowski [Thu, 9 Apr 2015 14:31:39 +0000 (10:31 -0400)]
Initialize multiple CTL clones+epitopes. Output at intervals. Pretty-print the sequence.
Dariusz Murakowski [Thu, 9 Apr 2015 13:11:09 +0000 (09:11 -0400)]
Separate function for running the dynamics.
Dariusz Murakowski [Thu, 9 Apr 2015 12:03:00 +0000 (08:03 -0400)]
Framework for killing by CTL.
Dariusz Murakowski [Thu, 9 Apr 2015 05:10:37 +0000 (01:10 -0400)]
Flesh out reactions for virus reproduction (with mutation) and death.
Dariusz Murakowski [Wed, 8 Apr 2015 20:48:00 +0000 (16:48 -0400)]
Start of Gillespie test.
Dariusz Murakowski [Fri, 20 Mar 2015 18:26:11 +0000 (14:26 -0400)]
ctags -a -R
Dariusz Murakowski [Fri, 20 Mar 2015 18:26:00 +0000 (14:26 -0400)]
ctags
Dariusz Murakowski [Tue, 24 Feb 2015 17:14:52 +0000 (12:14 -0500)]
Code to read Potts coupling parameters and calculate energy, from John Barton
20150218.
Dariusz Murakowski [Thu, 20 Nov 2014 21:52:45 +0000 (16:52 -0500)]
Actually do (and document) multiple runs without epitope.... And use initial population fraction....
Dariusz Murakowski [Thu, 20 Nov 2014 21:51:58 +0000 (16:51 -0500)]
(cosmetic) Personalized RunParameters for stochastic Gillespie simulation (SS).
Dariusz Murakowski [Thu, 20 Nov 2014 20:00:01 +0000 (15:00 -0500)]
Monte Carlo simulation of Boltzmann-distributed energy. Start Gillespie code. More build rules.
Dariusz Murakowski [Wed, 12 Nov 2014 20:45:17 +0000 (15:45 -0500)]
Fix sorted_vector compile errors (presumably due to gcc vs MSVC differences).
Dariusz Murakowski [Wed, 20 Aug 2014 20:26:56 +0000 (16:26 -0400)]
STL compliant sorted vector class (std::map replacement) from CodeProject.
Source:
http://www.codeproject.com/Articles/3217/An-STL-compliant-sorted-vector?display=Print
Introduction:
sorted_vector adapts a std::vector to the interface required by
std::set/std::multiset, thereby providing set/multiset and vector
functionality (random access) in one container.
Tests show that sorted_vector's element retrieval (find) speed
outperforms that of std::set/std::multiset by a factor of 2 (on most
machines). On the downward side is the poor performance of
sorted_vector's insert member function, because it inserts an element
somewhere in the middle of the sorted vector in order to preserve the
sort order. By using sorted_vector's low level interface one can solve
this performance bottleneck by inserting a bunch of objects using a
series of push_back's followed by a call to the member function sort,
which restores the sort order.
sorted_vector should be preferred over std::set/std::multiset if many
small elements must be stored. Most STL implementations use a variant of
a balanced tree to implement set and multiset, which imposes a per
element storage overhead of 3 pointers. The most important reason to use
a std::set/std::multiset instead of sorted_vector is the need to keep
iterators into a set/multiset while inserting more elements into the
set. These iterators remain valid in the case of a set/multiset, but are
invalidated in the case of a sorted_vector container.
Dariusz Murakowski [Sat, 26 Apr 2014 22:56:23 +0000 (18:56 -0400)]
Command line parameter for bonus/penalty applied to each epitope or total immune pressure.
Dariusz Murakowski [Thu, 17 Apr 2014 02:03:15 +0000 (22:03 -0400)]
Print supplementary output file (*.sum) with CSV sequence.
Dariusz Murakowski [Thu, 17 Apr 2014 01:47:20 +0000 (21:47 -0400)]
Detect when escape from *all* epitopes (vs *any* immune pressure).