From 59718087b5423bf679857a1355bb32a2f05e3afa Mon Sep 17 00:00:00 2001 From: Siavash Mirarab Date: Mon, 11 Jul 2016 18:20:24 -0700 Subject: [PATCH] Version 4.10.7 --- CHANGELOG.md | 3 ++- main/phylonet/coalescent/CommandLine.java | 4 ++++ main/phylonet/coalescent/SpeciesMapper.java | 3 +++ main/phylonet/coalescent/WQInference.java | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd50c2b9..54939149d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ - version 4.10.7: - - Small bug fix: with `-a` scoring using `-q` didn't work + - Small bug fix: with `-a` scoring using `-q` didn't work. Also, output both gene tree labels and the species tree labels. - Bug fix: effective N and quartet scores were not correctly printed out with -t X options if gene trees had polytomies. posterior values were correctly computed. + - Warning for low `EN` values. - Some spell checking on prompts - version 4.10.6: diff --git a/main/phylonet/coalescent/CommandLine.java b/main/phylonet/coalescent/CommandLine.java index c5b9f9dca..ed7ac90f4 100644 --- a/main/phylonet/coalescent/CommandLine.java +++ b/main/phylonet/coalescent/CommandLine.java @@ -383,6 +383,10 @@ public static void main(String[] args) throws Exception{ bestTree.add(tr); } + if (!GlobalMaps.taxonNameMap.getSpeciesIdMapper().isSingleIndividual()) { + System.err.println("Scored tree with gene names:\n"+tr.toNewickWD()); + } + GlobalMaps.taxonNameMap.getSpeciesIdMapper().gtToSt((MutableTree) tr); if (options.getBranchannotation() != 12) { diff --git a/main/phylonet/coalescent/SpeciesMapper.java b/main/phylonet/coalescent/SpeciesMapper.java index e604f0b79..469ffe407 100644 --- a/main/phylonet/coalescent/SpeciesMapper.java +++ b/main/phylonet/coalescent/SpeciesMapper.java @@ -235,4 +235,7 @@ public void gtToSt(MutableTree st) { } } + public boolean isSingleIndividual() { + return taxonIdToSpeciesId.length == speciesIdtoTaxonId.size(); + } } \ No newline at end of file diff --git a/main/phylonet/coalescent/WQInference.java b/main/phylonet/coalescent/WQInference.java index b80cfa606..9ff1584ce 100644 --- a/main/phylonet/coalescent/WQInference.java +++ b/main/phylonet/coalescent/WQInference.java @@ -226,6 +226,15 @@ public double scoreBranches(Tree st) { nd.mainfreq = s.qs; nd.effn = s.effn; + + if (nd.effn < 20) { + if (!GlobalMaps.taxonNameMap.getSpeciesIdMapper().isSingleSP(cluster.getBitSet())) + System.err.println("You may want to ignore posterior probabilities and other statistics related to the following " + + "branch branch because the effective number of genes impacting it is only "+ nd.effn + + ". h:\n\t" + + GlobalMaps.taxonNameMap.getSpeciesIdMapper().getSTClusterForGeneCluster(cluster)); + } + Quadrapartition[] threequads = new Quadrapartition [] {quad, null,null}; quad = weightCalculator2.new Quadrapartition