VirEvoDyn.git
10 years agoDefine state2aa properly.
Dariusz Murakowski [Tue, 23 Jun 2015 06:10:53 +0000 (02:10 -0400)]
Define state2aa properly.

10 years agoImplement write_mod and esc_all for non-epitope WF run.
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

10 years agoNumerical stability modification to sigmoid function (for survival probability).
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'

10 years agoCosmetic changes to comments, format, and spacing.
Dariusz Murakowski [Tue, 23 Jun 2015 03:32:12 +0000 (23:32 -0400)]
Cosmetic changes to comments, format, and spacing.

Conflicts:
wf.cpp

10 years agoImplement write_mod and esc_all for non-epitope WF run.
Dariusz Murakowski [Wed, 17 Jun 2015 18:53:43 +0000 (14:53 -0400)]
Implement write_mod and esc_all for non-epitope WF run.

10 years agoMake only `wf` (Wright-Fisher code).
Dariusz Murakowski [Wed, 17 Jun 2015 17:48:32 +0000 (13:48 -0400)]
Make only `wf` (Wright-Fisher code).

10 years agoNumerical stability modification to sigmoid function (for survival probability).
Dariusz Murakowski [Wed, 17 Jun 2015 17:48:16 +0000 (13:48 -0400)]
Numerical stability modification to sigmoid function (for survival probability).

10 years agoCosmetic changes to comments, format, and spacing.
Dariusz Murakowski [Wed, 17 Jun 2015 17:29:18 +0000 (13:29 -0400)]
Cosmetic changes to comments, format, and spacing.

10 years agoRemove two-site Hamiltonian.
Dariusz Murakowski [Mon, 15 Jun 2015 22:20:28 +0000 (18:20 -0400)]
Remove two-site Hamiltonian.

10 years ago:retab (replace \t with normal whitespace).
Dariusz Murakowski [Fri, 12 Jun 2015 23:20:19 +0000 (19:20 -0400)]
:retab (replace \t with normal whitespace).

10 years agoRescale rates by system volume ratio (parameter).
Dariusz Murakowski [Fri, 12 Jun 2015 21:26:30 +0000 (17:26 -0400)]
Rescale rates by system volume ratio (parameter).

10 years agoCTL killing reactions are smart about virus-changing reactions (by tracking last...
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).

10 years agoRecalculate differently based on what reaction caused propensity "change" (currently...
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).

10 years agoTest script for Potts code.
Dariusz Murakowski [Sat, 9 May 2015 17:15:17 +0000 (13:15 -0400)]
Test script for Potts code.

10 years agoClean up extra debug printing.
Dariusz Murakowski [Thu, 7 May 2015 21:06:25 +0000 (17:06 -0400)]
Clean up extra debug printing.

10 years agoFix some dependents. Modify total propensity instead of totally re-sum.
Dariusz Murakowski [Thu, 7 May 2015 20:47:28 +0000 (16:47 -0400)]
Fix some dependents. Modify total propensity instead of totally re-sum.

10 years agoHandle dependencies between reactions, only recalculating propensity when affected...
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.

10 years agoOption to print trajectory every N steps.
Dariusz Murakowski [Wed, 6 May 2015 19:25:54 +0000 (15:25 -0400)]
Option to print trajectory every N steps.

10 years agoAllow passing script names into unit test runner. (Default: all *.test files.)
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.)

10 years agoUnit testing for Ising using compensatory landscape from Krishna (not his RC_fun...
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).

10 years agoCopy constructor for Virus and NTVirus object to reduce unnecessary energy calculations.
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.

10 years agoFix subtle rare bug involving next timestep = infinity. Also prevent first rxn firing...
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.

10 years agoFiring the viral growth/death reactions should probably iterate over the entire map...
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....

10 years agoTerminally differentiated effector cell needs additional death term. RC_fun = exp...
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.

10 years agoctags -a -R
Dariusz Murakowski [Tue, 28 Apr 2015 04:04:27 +0000 (00:04 -0400)]
ctags -a -R

10 years agoReactions accounting for propagation of CTL divisions.
Dariusz Murakowski [Tue, 28 Apr 2015 03:59:05 +0000 (23:59 -0400)]
Reactions accounting for propagation of CTL divisions.

10 years agoFramework for multiple divisions (i.e. generations) of effector T cells.
Dariusz Murakowski [Tue, 28 Apr 2015 02:32:07 +0000 (22:32 -0400)]
Framework for multiple divisions (i.e. generations) of effector T cells.

10 years agoSwap M and T in setting up CTL reactions (Ising).
Dariusz Murakowski [Mon, 27 Apr 2015 21:13:02 +0000 (17:13 -0400)]
Swap M and T in setting up CTL reactions (Ising).

10 years agoSet up reactions for CTLs recognizing amino acids.
Dariusz Murakowski [Mon, 27 Apr 2015 20:33:10 +0000 (16:33 -0400)]
Set up reactions for CTLs recognizing amino acids.

10 years agoImport Potts epitope (amino acid sequence). Helper split() function on arbitrary...
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.

10 years agoSave mapping of Potts state to amino acid as well. Virus object has no access though.
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.

10 years agoInitialize distribution of nt seqs from file. Print (aggregate) unique amino acid...
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.

10 years agoStart runtime framework for executing Potts system. Break out initialization routine.
Dariusz Murakowski [Fri, 24 Apr 2015 08:28:52 +0000 (04:28 -0400)]
Start runtime framework for executing Potts system. Break out initialization routine.

10 years agoFix the build: delete all the temporary testing stuff.
Dariusz Murakowski [Fri, 24 Apr 2015 08:07:14 +0000 (04:07 -0400)]
Fix the build: delete all the temporary testing stuff.

10 years agoDefine all the reactions for Potts virus, handling nucleotide-level mutations.
Dariusz Murakowski [Fri, 24 Apr 2015 08:05:17 +0000 (04:05 -0400)]
Define all the reactions for Potts virus, handling nucleotide-level mutations.

10 years agoMap the nt enum to and from character representation.
Dariusz Murakowski [Fri, 24 Apr 2015 08:03:35 +0000 (04:03 -0400)]
Map the nt enum to and from character representation.

10 years agoConstruct recognizer from epitope string (and starting location).
Dariusz Murakowski [Fri, 24 Apr 2015 07:05:20 +0000 (03:05 -0400)]
Construct recognizer from epitope string (and starting location).

10 years agoCTL for recognizing arbitrary amino acid sequence as epitope.
Dariusz Murakowski [Fri, 24 Apr 2015 06:50:08 +0000 (02:50 -0400)]
CTL for recognizing arbitrary amino acid sequence as epitope.

10 years agoPotts state mapping+tracking complete. Fix bounds check error in energy calculation.
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.

10 years agoSignificant speed-up by inlining GSL RNG functions (~20% in short tests).
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).

10 years agoCopy over code to read seq2state file, which gives amino acid identity of each Potts...
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.

10 years agoStart of Potts / amino acid / nucleotide-based virus species.
Dariusz Murakowski [Fri, 24 Apr 2015 03:10:32 +0000 (23:10 -0400)]
Start of Potts / amino acid / nucleotide-based virus species.

10 years agoAvoid multiple defs of translators by only declaring in header. Now const, so must...
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 [].

10 years agoScrap enum class definitions. Clean up seqTools.
Dariusz Murakowski [Thu, 23 Apr 2015 08:02:31 +0000 (04:02 -0400)]
Scrap enum class definitions. Clean up seqTools.

10 years agoCopy seqTools.cpp to seqTools.h for inclusion to main.
Dariusz Murakowski [Thu, 23 Apr 2015 06:21:33 +0000 (02:21 -0400)]
Copy seqTools.cpp to seqTools.h for inclusion to main.

10 years agoBreak normal functionality for testing! Separate beta (inverse temperature).
Dariusz Murakowski [Thu, 23 Apr 2015 06:18:24 +0000 (02:18 -0400)]
Break normal functionality for testing! Separate beta (inverse temperature).

10 years agoSolve warning about comparison between signed and unsigned integer expressions.
Dariusz Murakowski [Thu, 23 Apr 2015 05:37:30 +0000 (01:37 -0400)]
Solve warning about comparison between signed and unsigned integer expressions.

10 years agoCopy John's Potts code from snip.{cpp,h}.
Dariusz Murakowski [Thu, 23 Apr 2015 05:04:26 +0000 (01:04 -0400)]
Copy John's Potts code from snip.{cpp,h}.

10 years agoDecipher Potts encoding of sequence state/configuration.
Dariusz Murakowski [Thu, 23 Apr 2015 04:27:50 +0000 (00:27 -0400)]
Decipher Potts encoding of sequence state/configuration.

10 years agoWF: correctly use init pop frac.
Dariusz Murakowski [Wed, 22 Apr 2015 03:39:59 +0000 (23:39 -0400)]
WF: correctly use init pop frac.

10 years agoTesting nucleotide <-> amino acid translation. Needs C++0x.
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

10 years agoRemove mutation rate "mu" from Virus object; now exclusively in reaction.
Dariusz Murakowski [Tue, 21 Apr 2015 22:08:18 +0000 (18:08 -0400)]
Remove mutation rate "mu" from Virus object; now exclusively in reaction.

10 years agoUpdate Makefile with header dependencies.
Dariusz Murakowski [Tue, 21 Apr 2015 21:32:20 +0000 (17:32 -0400)]
Update Makefile with header dependencies.

10 years agoMultiple runs, more rate args, end simulation when all reactions exhausted.
Dariusz Murakowski [Tue, 21 Apr 2015 21:00:55 +0000 (17:00 -0400)]
Multiple runs, more rate args, end simulation when all reactions exhausted.

10 years agoPrint virus species sequence when verbose.
Dariusz Murakowski [Tue, 21 Apr 2015 19:37:56 +0000 (15:37 -0400)]
Print virus species sequence when verbose.

10 years agoFormatting: retab, clean whitespace.
Dariusz Murakowski [Tue, 21 Apr 2015 19:02:50 +0000 (15:02 -0400)]
Formatting: retab, clean whitespace.

10 years agoDelete unused functions for SS.
Dariusz Murakowski [Tue, 21 Apr 2015 18:47:42 +0000 (14:47 -0400)]
Delete unused functions for SS.

10 years agoClarify dependencies. Copy hamiltonian.{cpp,h} to ham_ss.{cpp,h}. Copy contents of...
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}.

10 years agoVirus reproduction reaction stores its own mutation rate.
Dariusz Murakowski [Tue, 21 Apr 2015 18:24:40 +0000 (14:24 -0400)]
Virus reproduction reaction stores its own mutation rate.

10 years agoFree memory from species and reaction arrays (to satisfy some valgrind).
Dariusz Murakowski [Tue, 21 Apr 2015 18:18:09 +0000 (14:18 -0400)]
Free memory from species and reaction arrays (to satisfy some valgrind).

10 years agoProper species names. Initial counts CTL counts for each type.
Dariusz Murakowski [Tue, 21 Apr 2015 17:27:18 +0000 (13:27 -0400)]
Proper species names. Initial counts CTL counts for each type.

10 years agoOutput at intervals, remove more WF.
Dariusz Murakowski [Sat, 18 Apr 2015 00:32:55 +0000 (20:32 -0400)]
Output at intervals, remove more WF.

10 years agoClean out WF-only stuff.
Dariusz Murakowski [Fri, 17 Apr 2015 18:25:35 +0000 (14:25 -0400)]
Clean out WF-only stuff.

10 years agoFull system, including parameters.
Dariusz Murakowski [Fri, 17 Apr 2015 17:18:25 +0000 (13:18 -0400)]
Full system, including parameters.

10 years agoInitialize multiple CTL clones+epitopes. Output at intervals. Pretty-print the sequence.
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.

10 years agoSeparate function for running the dynamics.
Dariusz Murakowski [Thu, 9 Apr 2015 13:11:09 +0000 (09:11 -0400)]
Separate function for running the dynamics.

10 years agoFramework for killing by CTL.
Dariusz Murakowski [Thu, 9 Apr 2015 12:03:00 +0000 (08:03 -0400)]
Framework for killing by CTL.

10 years agoFlesh out reactions for virus reproduction (with mutation) and death.
Dariusz Murakowski [Thu, 9 Apr 2015 05:10:37 +0000 (01:10 -0400)]
Flesh out reactions for virus reproduction (with mutation) and death.

10 years agoStart of Gillespie test.
Dariusz Murakowski [Wed, 8 Apr 2015 20:48:00 +0000 (16:48 -0400)]
Start of Gillespie test.

10 years agoctags -a -R
Dariusz Murakowski [Fri, 20 Mar 2015 18:26:11 +0000 (14:26 -0400)]
ctags -a -R

10 years agoctags
Dariusz Murakowski [Fri, 20 Mar 2015 18:26:00 +0000 (14:26 -0400)]
ctags

10 years agoCode to read Potts coupling parameters and calculate energy, from John Barton 20150218.
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.

10 years agoActually do (and document) multiple runs without epitope.... And use initial populati...
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....

10 years ago(cosmetic) Personalized RunParameters for stochastic Gillespie simulation (SS).
Dariusz Murakowski [Thu, 20 Nov 2014 21:51:58 +0000 (16:51 -0500)]
(cosmetic) Personalized RunParameters for stochastic Gillespie simulation (SS).

10 years agoMonte Carlo simulation of Boltzmann-distributed energy. Start Gillespie code. More...
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.

10 years agoFix sorted_vector compile errors (presumably due to gcc vs MSVC differences).
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).

10 years agoSTL compliant sorted vector class (std::map replacement) from CodeProject.
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.

11 years agoCommand line parameter for bonus/penalty applied to each epitope or total immune...
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.

11 years agoPrint supplementary output file (*.sum) with CSV sequence.
Dariusz Murakowski [Thu, 17 Apr 2014 02:03:15 +0000 (22:03 -0400)]
Print supplementary output file (*.sum) with CSV sequence.

11 years agoDetect when escape from *all* epitopes (vs *any* immune pressure).
Dariusz Murakowski [Thu, 17 Apr 2014 01:47:20 +0000 (21:47 -0400)]
Detect when escape from *all* epitopes (vs *any* immune pressure).

11 years agoGSL {headers,libraries} on lc2 are in default search path: {/usr/include,/usr/lib64}.
Dariusz Murakowski [Thu, 17 Apr 2014 01:04:26 +0000 (21:04 -0400)]
GSL {headers,libraries} on lc2 are in default search path: {/usr/include,/usr/lib64}.

11 years agoAllow calculating energy without including epitope bonus.
Dariusz Murakowski [Thu, 17 Apr 2014 00:53:21 +0000 (20:53 -0400)]
Allow calculating energy without including epitope bonus.

11 years agoUpdate unit tests. Add new one with simple two-site parameters.
Dariusz Murakowski [Fri, 11 Apr 2014 21:48:03 +0000 (17:48 -0400)]
Update unit tests. Add new one with simple two-site parameters.

11 years agoPrint sequence as CSV (comma-separated).
Dariusz Murakowski [Fri, 11 Apr 2014 18:27:12 +0000 (14:27 -0400)]
Print sequence as CSV (comma-separated).

11 years agoUpdate unit tests.
Dariusz Murakowski [Thu, 10 Apr 2014 22:51:26 +0000 (18:51 -0400)]
Update unit tests.

11 years agoSpread total immune pressure strength uniformly over targeted epitopes.
Dariusz Murakowski [Thu, 20 Mar 2014 22:51:12 +0000 (18:51 -0400)]
Spread total immune pressure strength uniformly over targeted epitopes.

11 years agoStart of Monte Carlo (static epitope calculation), copy WF code.
Dariusz Murakowski [Thu, 13 Mar 2014 23:07:53 +0000 (19:07 -0400)]
Start of Monte Carlo (static epitope calculation), copy WF code.

11 years agoDon't fflush population-writing each time.
Dariusz Murakowski [Thu, 13 Mar 2014 23:06:04 +0000 (19:06 -0400)]
Don't fflush population-writing each time.

11 years agoPrint generation number on each line. (Need to update unit tests.)
Dariusz Murakowski [Thu, 6 Mar 2014 20:41:08 +0000 (15:41 -0500)]
Print generation number on each line. (Need to update unit tests.)

11 years agoTest all one- and two-epitope cases of WT/mut site combinations.
Dariusz Murakowski [Mon, 17 Feb 2014 22:39:24 +0000 (17:39 -0500)]
Test all one- and two-epitope cases of WT/mut site combinations.

11 years agoMore comprehensive test framework.
Dariusz Murakowski [Mon, 17 Feb 2014 22:37:46 +0000 (17:37 -0500)]
More comprehensive test framework.

11 years agoCorrectly parse multiple epitopes per file (using C++ streams), regardless of WT...
Dariusz Murakowski [Mon, 17 Feb 2014 22:33:15 +0000 (17:33 -0500)]
Correctly parse multiple epitopes per file (using C++ streams), regardless of WT/mut.

11 years agoUnit test for multiple-epitope input file.
Dariusz Murakowski [Mon, 17 Feb 2014 14:23:27 +0000 (09:23 -0500)]
Unit test for multiple-epitope input file.

11 years agoMultiple epitopes; one per line in .ep file. All have same penalty for now.
Dariusz Murakowski [Mon, 17 Feb 2014 14:18:30 +0000 (09:18 -0500)]
Multiple epitopes; one per line in .ep file. All have same penalty for now.

11 years agoUse '|' as epitope mut/WT field list separator (on single line).
Dariusz Murakowski [Mon, 17 Feb 2014 11:52:07 +0000 (06:52 -0500)]
Use '|' as epitope mut/WT field list separator (on single line).

11 years agoUpdate unit tests for separate .st and .ep files.
Dariusz Murakowski [Mon, 17 Feb 2014 10:38:15 +0000 (05:38 -0500)]
Update unit tests for separate .st and .ep files.

11 years agoRead population state and epitopes from separate files.
Dariusz Murakowski [Mon, 17 Feb 2014 10:36:56 +0000 (05:36 -0500)]
Read population state and epitopes from separate files.

11 years agoExtra output and tests for debugging.
Dariusz Murakowski [Thu, 13 Feb 2014 17:14:27 +0000 (12:14 -0500)]
Extra output and tests for debugging.

11 years agoStart framework for targeting multiple epitopes.
Dariusz Murakowski [Thu, 13 Feb 2014 17:05:02 +0000 (12:05 -0500)]
Start framework for targeting multiple epitopes.

11 years agoBasic unit testing framework.
Dariusz Murakowski [Tue, 4 Feb 2014 22:19:43 +0000 (17:19 -0500)]
Basic unit testing framework.