/* SetDialogPrompt ("Select file containing paths:"); fscanf (PROMPT_FOR_FILE, "Lines", paths); */ fscanf ("/home/art/wip/swenson/dutch_v3/hyphy/_paths.txt", "Lines", paths); /* path_to_trees = "/Users/apoon/wip/swenson/dutch_v2/reconstruct"; */ _path_to_trees = "/home/art/wip/swenson/dutch_v3/hyphy"; for (_path = 0; _path < Columns(paths); _path = _path+1) { /* it is VERY important to use NEXUS files because these have been screened for stop codons!!! */ indices = paths[_path]$"/[A-Za-z0-9_]+\.nex"; prefix = (paths[_path])[indices[0]][indices[1]]; treefile = prefix^{{"\.nex"}{".nwk"}}; outfile = prefix^{{"\.nex"}{".out"}}; stdinRedirect = {}; stdinRedirect["00"] = "Universal"; /* Genetic code */ stdinRedirect["01"] = paths[_path]; stdinRedirect["02"] = "Global"; /* Model options */ stdinRedirect["03"] = "012345"; /* GTR */ stdinRedirect["04"] = _path_to_trees+treefile; /* file containing trees */ stdinRedirect["05"] = "100"; /* number of samples */ stdinRedirect["06"] = _path_to_trees+outfile; fprintf (stdout, stdinRedirect, "\n"); ExecuteAFile ("mpi_codon_model.bf", stdinRedirect); }