Difference between revisions of "RAxML"

From wiki
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
Standard usage
 
Standard usage
  
  raxml -m GTRGAMMA -s <alignment_of_sequences> -n <chosen_postfix_for_results_filename> -t <sequence_alignment_tree>
+
  raxml -m GTRGAMMA -s <alignment_of_sequences> -n <extension_label_suffixed_to_outputfiles> -p  -t <sequence_alignment_tree>  
  
 
When using SNPs as input, the following command-line will work:
 
When using SNPs as input, the following command-line will work:
  
  raxmlHPC -m ASC_GTRGAMMA --asc-corr=lewis -s out_report3.fasta -p 12345 -n OR3
+
  raxmlHPC -m ASC_GTRGAMMA --asc-corr=lewis -s <snps_as_fasta_file> -p <your_number_for_random_seed> -n <extension_label_suffixed_to_outputfiles>
 +
 
 +
<ins>Explanation</a>:
 +
* ASC refers to ascertainment bias (known in the original Paul Lewis paper as acquisition bias) accounts for the fact that all the sites are variable, as opposed to other types of alignments which include all the constant or common characters).
 +
 
 +
Note: the capital t option "-T" refers to CPUs/threads. This is to be expected though there can be some confusion with the tree option "-t"
 +
 
 +
= Program code =
 +
 
 +
Because the ascertainment bias section of the manual is not terribly comprehensive, here is the relevant part of the source ocde (the c module '''evaluateGenericSpecial.c''') for the different types of ascertainment bias:
 +
 
 +
correction = evaluateCatAsc(ex1_asc, ex2_asc, x1_start_asc, x2_start_asc, tr->partitionData[model].tipVector,
 +
                  tip, ascWidth, diagptable, ascWidth, &accumulator, weightVector, tr->partitionData[model].dataType,
 +
                  tipNodeNumber, &goldmanAccumulator);
 +
}
 +
break;
 +
  case GAMMA:
 +
correction = evaluateGammaAsc(ex1_asc, ex2_asc, x1_start_asc, x2_start_asc, tr->partitionData[model].tipVector,
 +
                  tip, ascWidth, diagptable, ascWidth, &accumulator, weightVector, tr->partitionData[model].dataType,
 +
                  tipNodeNumber, &goldmanAccumulator);
 +
break;
 +
  default:
 +
assert(0);
 +
  }
 +
 +
  switch(tr->ascertainmentCorrectionType) {
 +
  case LEWIS_CORRECTION:
 +
partitionLikelihood = partitionLikelihood - (double)w * LOG(1.0 - correction);
 +
break;
 +
  case STAMATAKIS_CORRECTION:
 +
partitionLikelihood += accumulator;
 +
break;
 +
  case FELSENSTEIN_CORRECTION:
 +
partitionLikelihood += tr->partitionData[model].invariableWeight * LOG(correction);
 +
break;
 +
  case GOLDMAN_CORRECTION_1:
 +
partitionLikelihood += ((correction * (double)w * LOG(correction)) / (1.0 - correction));
 +
break;
 +
  case GOLDMAN_CORRECTION_2:
 +
//printf("Goldman acc: %f\n", goldmanAccumulator);
 +
partitionLikelihood += (((double)w / (1.0 - correction)) * goldmanAccumulator);
 +
break;
 +
  case GOLDMAN_CORRECTION_3:
 +
partitionLikelihood += ((tr->partitionData[model].invariableWeight / correction) * goldmanAccumulator);
 +
break;
 +
  default:
 +
assert(0);
 +
  }
 +
 
 +
= Links =
 +
* [https://academic.oup.com/sysbio/article/50/6/913/1628902/A-Likelihood-Approach-to-Estimating-Phylogeny-from This] is a link to the Paul Lewis paper.

Latest revision as of 12:18, 8 March 2017

Introduction

Alexis Stamatakis' phylogenetic tree builder.

RAxML, like many phylogeny programs is adamant about orthology, and expects to see a high confidence alignment. In practice, this means poor performance with long alignments, and better peformance with gene-level alignments,

Part of this is due to the pitfall of long branch attraction, an phenomenon whereby very dissimilar sequences are grouped together in a phylogeny.

Example usage

Standard usage

raxml -m GTRGAMMA -s <alignment_of_sequences> -n <extension_label_suffixed_to_outputfiles> -p  -t <sequence_alignment_tree> 

When using SNPs as input, the following command-line will work:

raxmlHPC -m ASC_GTRGAMMA --asc-corr=lewis -s <snps_as_fasta_file> -p <your_number_for_random_seed> -n <extension_label_suffixed_to_outputfiles>

Explanation</a>:

  • ASC refers to ascertainment bias (known in the original Paul Lewis paper as acquisition bias) accounts for the fact that all the sites are variable, as opposed to other types of alignments which include all the constant or common characters).

Note: the capital t option "-T" refers to CPUs/threads. This is to be expected though there can be some confusion with the tree option "-t"

Program code

Because the ascertainment bias section of the manual is not terribly comprehensive, here is the relevant part of the source ocde (the c module evaluateGenericSpecial.c) for the different types of ascertainment bias:

correction = evaluateCatAsc(ex1_asc, ex2_asc, x1_start_asc, x2_start_asc, tr->partitionData[model].tipVector,
                  tip, ascWidth, diagptable, ascWidth, &accumulator, weightVector, tr->partitionData[model].dataType,
                  tipNodeNumber, &goldmanAccumulator);
}
break;
  case GAMMA:
correction = evaluateGammaAsc(ex1_asc, ex2_asc, x1_start_asc, x2_start_asc, tr->partitionData[model].tipVector,
                  tip, ascWidth, diagptable, ascWidth, &accumulator, weightVector, tr->partitionData[model].dataType,
                  tipNodeNumber, &goldmanAccumulator);
break;
  default:
assert(0);
  }

 switch(tr->ascertainmentCorrectionType) {
  case LEWIS_CORRECTION:
partitionLikelihood = partitionLikelihood - (double)w * LOG(1.0 - correction);
break;
  case STAMATAKIS_CORRECTION:
partitionLikelihood += accumulator;
break;
  case FELSENSTEIN_CORRECTION:
partitionLikelihood += tr->partitionData[model].invariableWeight * LOG(correction);
break;
  case GOLDMAN_CORRECTION_1:
partitionLikelihood += ((correction * (double)w * LOG(correction)) / (1.0 - correction));
break;
  case GOLDMAN_CORRECTION_2:
//printf("Goldman acc: %f\n", goldmanAccumulator);
partitionLikelihood += (((double)w / (1.0 - correction)) * goldmanAccumulator);
break;
  case GOLDMAN_CORRECTION_3:
partitionLikelihood += ((tr->partitionData[model].invariableWeight / correction) * goldmanAccumulator);
break;
  default:
assert(0);
  }

Links

  • This is a link to the Paul Lewis paper.