Skip to content

Commit

Permalink
Merge pull request #714 from veg/beta
Browse files Browse the repository at this point in the history
2.3.8
  • Loading branch information
stevenweaver authored Dec 15, 2017
2 parents b579403 + 95cc992 commit a9fb747
Show file tree
Hide file tree
Showing 26 changed files with 3,445 additions and 2,782 deletions.
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.0)
project(HyPhy)
cmake_policy(VERSION 3.0.0)
cmake_policy(SET CMP0026 OLD)
cmake_policy(SET CMP0026 NEW)

set(CMAKE_CONFIGURATION_TYPES Release)

Expand Down Expand Up @@ -277,7 +277,6 @@ install(DIRECTORY res/ DESTINATION lib/hyphy)
#-------------------------------------------------------------------------------
add_executable(
HYPHYMP
EXCLUDE_FROM_ALL
${SRC_COMMON} ${SRC_UNIXMAIN}
)

Expand Down Expand Up @@ -306,12 +305,6 @@ if(${OPENCL_FOUND})
include_directories(${OPENCL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/ocl)
target_link_libraries(HYPHYOCL ${DEFAULT_LIBRARIES} ${OPENCL_LIBRARIES})

install(
TARGETS HYPHYOCL
RUNTIME DESTINATION bin
OPTIONAL
)

add_custom_target(OCL DEPENDS HYPHYOCL)
set_property(
TARGET HYPHYOCL
Expand Down Expand Up @@ -345,7 +338,6 @@ if(${MPI_FOUND})

add_executable(
HYPHYMPI
EXCLUDE_FROM_ALL
${SRC_COMMON} ${SRC_UNIXMAIN}
)

Expand Down
288 changes: 202 additions & 86 deletions res/TemplateBatchFiles/LEISR.bf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/SelectionAnalyses/MEME.bf
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ lfunction meme.handle_a_site (lf_fel, lf_bsrel, filter_data, partition_index, pa
^"meme.site_alpha" = 1;
^"meme.site_beta_plus" = 1;
^"meme.site_beta_nuisance" = 1;

Optimize (results, ^lf_fel);

fel = estimators.ExtractMLEs (lf_fel, model_mapping);
Expand Down
21 changes: 12 additions & 9 deletions res/TemplateBatchFiles/SelectionAnalyses/RELAX.bf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ utility.SetEnvVariable ("ASSUME_REVERSIBLE_MODELS", TRUE);

/*------------------------------------------------------------------------------*/

relax.json = { terms.json.input: {},
relax.analysis_description = {
terms.io.info : "RELAX (a random effects test of selection relaxation) uses a random effects branch-site model framework to test whether a set of 'Test' branches evolves under relaxed selection relative to a set of 'Reference' branches (R), as measured by the relaxation parameter (K).",
terms.io.version : "2.0",
terms.io.reference : "RELAX: Detecting Relaxed Selection in a Phylogenetic Framework (2015). Mol Biol Evol 32 (3): 820-832",
terms.io.authors : "Sergei L Kosakovsky Pond, Ben Murrell, Steven Weaver and Temple iGEM / UCSD viral evolution group",
terms.io.contact : "[email protected]",
terms.io.requirements : "in-frame codon alignment and a phylogenetic tree, with at least two groups of branches defined using the {} notation (one group can be defined as all unlabeled branches)"
};

relax.json = { terms.json.analysis: relax.analysis_description,
terms.json.input: {},
terms.json.fits : {},
terms.json.timers : {},
terms.json.test_results : {}
Expand Down Expand Up @@ -70,14 +80,7 @@ relax.display_orders = {terms.original_name: -1,
/*------------------------------------------------------------------------------*/


relax.analysis_description = {
terms.io.info : "RELAX (a random effects test of selection relaxation) uses a random effects branch-site model framework to test whether a set of 'Test' branches evolves under relaxed selection relative to a set of 'Reference' branches (R), as measured by the relaxation parameter (K).",
terms.io.version : "2.0",
terms.io.reference : "RELAX: Detecting Relaxed Selection in a Phylogenetic Framework (2015). Mol Biol Evol 32 (3): 820-832",
terms.io.authors : "Sergei L Kosakovsky Pond, Ben Murrell, Steven Weaver and Temple iGEM / UCSD viral evolution group",
terms.io.contact : "[email protected]",
terms.io.requirements : "in-frame codon alignment and a phylogenetic tree, with at least two groups of branches defined using the {} notation (one group can be defined as all unlabeled branches)"
};


io.DisplayAnalysisBanner ( relax.analysis_description );

Expand Down
28 changes: 13 additions & 15 deletions res/TemplateBatchFiles/SimmondsAI.bf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ SetDialogPrompt ("Load a nucleotide sequence file:");

DataSet ds = ReadDataFile (PROMPT_FOR_FILE);
leafCount = ds.species;
DataSetFilter filteredData = Bootstrap (ds,1);

fprintf (stdout, "Read file: ", ds,"\n");

Expand Down Expand Up @@ -251,7 +252,7 @@ fprintf (stdout, "Using ", treeIt, " tree bootstraps and ", shuffleIt, " relabel
treeAVL = givenTree^0;
treeAVL2 = givenTree^1;

baseD = runATreeSample (0);
baseD = runATreeSample ();
fprintf (stdout, "\nBaseline d = ", baseD[0], "\n");

totalRes = {treeIt,3};
Expand All @@ -265,22 +266,21 @@ meanO = baseD[0];
meanS = baseD[1];
sigB = (propSig < baseD[2]);

for (it = 0; it < treeIt-1; it = it + 1)
{
for (it = 0; it < treeIt-1; it += 1) {
DataSetFilter filteredData = Bootstrap (ds,1);
ts = InferTreeTopology (0);
ts = InferTreeTopology (0);
Tree givenTree = ts;
ts = RerootTree (givenTree, choiceMatrix);
Tree givenTree = ts;
treeAVL = givenTree^0;
treeAVL2 = givenTree^1;
simD = runATreeSample (0);
simD = runATreeSample ();
totalRes[it+1][0] = simD[0];
totalRes[it+1][1] = simD[1];
totalRes[it+1][2] = simD[2];
meanO = meanO + simD[0];
meanS = meanS + simD[1];
sigB = sigB + (propSig < simD[2]);
meanO += simD[0];
meanS += simD[1];
sigB += (propSig < simD[2]);
}

fprintf (stdout, "\n\nAssociation Index: ", meanO/meanS, "\nBootstrap significance :" , sigB, "/", treeIt, "\n");
Expand Down Expand Up @@ -310,8 +310,9 @@ ACCEPT_ROOTED_TREES = 0;

/*************************************************************************************************/

function runATreeSample (dummy)
{
function runATreeSample () {


mapVec = {1,leafCount}["_MATRIX_ELEMENT_COLUMN_"];
myLeafAlloc = {1,leafCount};
for (_k = 0; _k < leafCount; _k = _k + 1)
Expand All @@ -326,11 +327,8 @@ function runATreeSample (dummy)
{
treeAVL = givenTree^0;
rsD = computeSimmondsD (myLeafAlloc, Random(mapVec,0), kindCount);
if (rsD > baseD)
{
gte = gte +1;
}
meanRat = meanRat + rsD;
gte += (rsD > baseD);
meanRat += rsD;
}
outMx = {{baseD, meanRat/shuffleIt, gte/shuffleIt}};
return outMx;
Expand Down
21 changes: 11 additions & 10 deletions res/TemplateBatchFiles/libv3/models/protein.bf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ models.protein.alphabet = {{"A","C","D","E","F","G","H","I","K","L","M","N","P",


/* Available empirical models */
models.protein.empirical_models = {{"LG", "Empirical model of protein evolution from Le and Gascuel (2008). Ref: https://doi.org/10.1093/molbev/msn067"},
{"WAG", "Empirical model of protein evolution from Whelan and Goldman (2001). Ref: https://doi.org/10.1093/oxfordjournals.molbev.a003851"},
{"JTT", "Empirical model of protein evolution from Jones, Taylor, and Thornton (1996). Ref: https://doi.org/10.1093/bioinformatics/8.3.275"},
{"JC69", "Empirical model of protein evolution with equal exchangeability rates among all amino acids, also known as JC69."},
{"mtMAM", "Empirical model of protein evolution for mammalian mitochondrial genomes from Yang N, Nielsen R, and Hasegawa M. (1998). Ref: http://dx.doi.org/10.1093/oxfordjournals.molbev.a025888"},
{"cpREV", "Empirical model of protein evolution for chloroplast genomes from from Adachi et al. (2000). Ref: https://www.ncbi.nlm.nih.gov/pubmed/10795826"},
{"HIVBm", "Empirical model of protein evolution for between-host HIV sequences from Nickle et al. (2007). Ref: https://doi.org/10.1371/journal.pone.0000503"},
{"HIVWm", "Empirical model of protein evolution for within-host HIV sequences from Nickle et al. (2007). Ref: https://doi.org/10.1371/journal.pone.0000503"},
{"AB", "Empirical model of protein evolution for antibody sequences from Mirsky et al. (2015). Ref: https://doi.org/10.1093/molbev/msu340"}
models.protein.empirical_models = {{"LG", "Generalist empirical model of protein evolution from Le and Gascuel (2008). Ref: https://doi.org/10.1093/molbev/msn067"},
{"WAG", "Generalist empirical model of protein evolution from Whelan and Goldman (2001). Ref: https://doi.org/10.1093/oxfordjournals.molbev.a003851"},
{"JTT", "Generalist empirical model of protein evolution from Jones, Taylor, and Thornton (1996). Ref: https://doi.org/10.1093/bioinformatics/8.3.275"},
{"JC69", "Generalist empirical model of protein evolution with equal exchangeability rates among all amino acids, also known as JC69."},
{"mtMet", "Specialist empirical model of protein evolution for metazoan mitochondrial genomes from Le, Dang, and Le. (2017). Ref: 10.1186/s12862-017-0987-y"},
{"mtVer", "Specialist empirical model of protein evolution for vertebrate mitochondrial genomes from Le, Dang, and Le. (2017). Ref: 10.1186/s12862-017-0987-y"},
{"mtInv", "Specialist empirical model of protein evolution for invertebrate mitochondrial genomes from Le, Dang, and Le. (2017). Ref: 10.1186/s12862-017-0987-y"},
{"gcpREV", "Specialist empirical model of protein evolution for green plant chloroplast genomes from from Cox and Foster (2013). Ref: https://doi.org/10.1016/j.ympev.2013.03.030"},
{"HIVBm", "Specialist empirical model of protein evolution for between-host HIV sequences from Nickle et al. (2007). Ref: https://doi.org/10.1371/journal.pone.0000503"},
{"HIVWm", "Specialist empirical model of protein evolution for within-host HIV sequences from Nickle et al. (2007). Ref: https://doi.org/10.1371/journal.pone.0000503"}
};


Expand All @@ -37,7 +38,7 @@ function models.protein.generic.Time (option) {




/* Function below relocated to protein/empirical.bf and protein/REV.bf, each.
/**
* @name models.protein.generic.DefineQMatrix
* @param {Dictionary} modelSpec
Expand Down
Loading

0 comments on commit a9fb747

Please sign in to comment.