diff --git a/lib/galaxy/tools/util/hyphy_util.py b/lib/galaxy/tools/util/hyphy_util.py index 08d9dccc21b..7164feeaf2b 100644 --- a/lib/galaxy/tools/util/hyphy_util.py +++ b/lib/galaxy/tools/util/hyphy_util.py @@ -368,143 +368,281 @@ function _processAGene (_geneID, nwk_file, ps_file) BranchLengthsMF = """ VERBOSITY_LEVEL = -1; + fscanf (PROMPT_FOR_FILE, "Lines", inLines); + + _linesIn = Columns (inLines); + + /*---------------------------------------------------------*/ + + _currentGene = 1; + _currentState = 0; + geneSeqs = ""; + geneSeqs * 128; + + for (l=0; l<_linesIn; l=l+1) + { + if (Abs(inLines[l]) == 0) + { + if (_currentState == 1) + { + geneSeqs * 0; + DataSet ds = ReadFromString (geneSeqs); + _processAGene (_currentGene); - geneSeqs * 128; + + geneSeqs * 128; + _currentGene = _currentGene + 1; + } + } + else + { + if (_currentState == 0) + { + _currentState = 1; + } + geneSeqs * inLines[l]; + geneSeqs * "\\n"; + } + } + + if (_currentState == 1) + { + geneSeqs * 0; + if (Abs(geneSeqs)) + { + DataSet ds = ReadFromString (geneSeqs); + _processAGene (_currentGene); + } + } + + fprintf (resultFile,CLOSE_FILE); + + /*---------------------------------------------------------*/ + + function _processAGene (_geneID) + { + DataSetFilter filteredData = CreateFilter (ds,1); + if (_currentGene == 1) + { + SelectTemplateModel (filteredData); + - SetDialogPrompt ("Tree file"); + + SetDialogPrompt ("Tree file"); + fscanf (PROMPT_FOR_FILE, "Tree", givenTree); + fscanf (stdin, "String", resultFile); + + /* do sequence to branch map */ + + validNames = {}; + taxonNameMap = {}; + + for (k=0; k