Hi Darrell
to process multiple files you can use a wrapper file.
Code:_rrOptions = {};
SetDialogPrompt ( "Provide a list of files to process:" );
fscanf (PROMPT_FOR_FILE, "Lines", _filesToProcess );
SetDialogPrompt ( "Provide a list of outgroups:" );
fscanf (PROMPT_FOR_FILE, "Lines", _outgroups );
_rrOptions ["00"] = "Nucleotide/Protein";
_rrOptions ["03"] = "HKY85";
_rrOptions ["04"] = "Global";
for ( _fileLine = 0; _fileLine < Columns ( _filesToProcess ); _fileLine = _fileLine + 1 ) {
_rrOptions ["01"] = _filesToProcess [ _fileLine ];
_rrOptions ["02"] = _outgroups [ -fileLine ];
ExecuteAFile ("/Applications/hyphy/HYPHY/TemplateBatchFiles/RelativeRate.bf", _rrOptions );
}
this file will require two input files: one with the exact paths to the files to process, and another with the outgroups for each of the input files. Obviously these need to be in the same order. To get the first you could use the unix find command.
Code: find `pwd` -name "*.nex" > nexus.files
If the outgroup is the same for all the files you could remove the second fscanf in the wrapper and simply hardcode the name of the outgroup with
Code: _rrOptions ["02"] = "myoutgroup";
and remove the corresponding line from the for loop.
You will also need to edit the location of the batch file in the ExecuteAFile command.
I think that answers your third question.
re the others
1. you need to set the ti/tv parameter to global.
in the case of HKY85 we use
Code:global R=0.3250146192987597;HKY85={4,4};
HKY85[0][1]:=R*a;
HKY85[0][2]:=a;
HKY85[0][3]:=R*a;
HKY85[1][0]:=R*a;
HKY85[1][2]:=R*a;
HKY85[1][3]:=a;
HKY85[2][0]:=a;
HKY85[2][1]:=R*a;
HKY85[2][3]:=R*a;
HKY85[3][0]:=R*a;
HKY85[3][1]:=a;
HKY85[3][2]:=R*a;
here R represents the ti:tv and is shared across all branches. a is a branch length parameter independent for each branch.
2. I'm not sure we have a syn and non-syn relative rates implementation. if you look at the result from ExportLikelihoodFunction there are constraints placed on the branches.
Code:constrained3TaxaTree.Ingroup2.a=0.05138303096204919;
constrained3TaxaTree.OutGroup.a=0.3247689253900513;
constrained3TaxaTree.Ingroup1.a:=constrained3TaxaTree.Ingroup2.a;
in order to do syn and non-syn relative rates tests, you would need to
i. set up a codon model
ii. have separate branch length parameters for syn and nonsyn rates
iii. place constraints on syn and nonsyn rate independently
something like
Code:constrained3TaxaTree.Ingroup2.synrate=0.05138303096204919;
constrained3TaxaTree.OutGroup.synrate=0.3247689253900513;
constrained3TaxaTree.Ingroup1.synrate:=constrained3TaxaTree.Ingroup2.synrate;
It wouldn't be too difficult to implement, but may be duplication if it is already done. Sergei is on leave till Monday. Let me bounce it off him when he returns.
hope this helps somewhat
cheers ./w