Link Search Menu Expand Document

INPUT FILES

PHRAPL requires two input files: an assignment file (e.g. cladeAssignments.txt) and a file with phylogenetic trees in newik format (e.g. trees.tre). All files must have the same taxon names (labels) across all loci.

You can have missing data. PHRAPL does not require gene trees to include all individuals/alleles per population/species/group.

You can include both haploid and diploid data in the same analyses using the argument popScaling in the GridSearch function.


Gene trees

PHRAPL requires one file with gene trees (locus1_tree; locus2_tree; locus3_tree; locusn_tree;) in newick format.

## Example of file with phylogenetic trees (3 loci)
((ind6,(ind4,ind5),ind11),(ind3,ind9),(((ind12,(ind10,ind7)),ind8),(ind1,ind2)));
(((((ind10,ind7,ind1),ind12),ind6),((ind11,ind2,ind9),ind8)),(ind3,(ind4,ind5)));
(((ind10,ind11),(((ind1,ind12,ind3),(ind2,ind4,ind8,(ind5,ind6))),ind9)),ind7);

Estimate gene trees in PHRAPL (using RaxML)

Note that PHRAPL includes a function for inferring gene trees from sequence alignments using RAxML (type ?RunRaxml for more information on using this function). If your sequence data is in nexus format, there is also a function for converting your data to phylip format, which is the required format for running RAxML (type ?RunSeqConverter to read more about this function). This function calls up a perl script written by Olaf R.P. Bininda-Emonds.

Merge all trees into one file

If the tree files are separated, there are two options to merge all the trees in one file:

  • In the shell (in your working directory):
    cat *.tre >> trees.tre
    
  • In PHRAPL use the function MergeTrees:
    library(phrapl)
    MergeTrees(treePath="/path_to_tree_files/")