Calculate the rates of non-synonymous and synonymous polymorphism for genes across environmetns using the output of anvi-gen-variability-profile..
🔙 To the main page of anvi’o programs and artifacts.
contigs-db variability-profile-txt
This program calculates the pN/pS ratio for each gene in a contigs-db and outputs it as a pn-ps-data artifact.
The pN/pS ratio (first described in Schloissnig et al. 2012) is the ratio of 2 rates: the rates of non-synonymous (pN) and synonymous (pS) polymorphism. It is analogous to dN/dS, which is the ratio of rates between non-synonymous (dN) and synonymous substitutions between two strains. We calculate pN/pS from allele frequency obtained through SCVs and SAAVs. See the study by Kiefl et al. 2023 for additional information, and this reproducible workflow associated with that study to see use cases.
First, you will need to run anvi-gen-variability-profile using the flag --engine CDN
to get a variability-profile-txt for SCVs (single codon variants), which we’ll name SCVs.txt
in this example.
Then you can run this program like so:
anvi-get-pn-ps-ratio -V SCVs.txt \ -c contigs-db \ -o output_dir
A pN/pS value is calculated for each gene x sample combo. This will result in a directory called output_dir
that contains several tables that describe each of your genes. See pn-ps-data for more information.
This program has some default filtering choices that you should pay mind to. You can tune these filter options with the following variables:
--min-departure-from-consensus
).--min-departure-from-reference
).--minimum-num-variants
).--min-coverage
).Edit this file to update this information.
Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__
tag in this file to see an example.