Why are the allele percentages in my Allele Plot different than the values in the accompanying Allele Table? #370
kclem
started this conversation in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Problem
You may have noticed that the allele percentages and counts in your allele plot (
9.Alleles_frequency_table_around_gRNA.pdf
) don't exactly match the values reported in the accompanying data table (Alleles_frequency_table_around_gRNA.txt
). This is due to some differences in collapsing alleles for visualization, and can sometimes arise when you provide multiple guides or your quantification window is larger than your plotting window size.Quick Solution
If you want to have the values on the allele plot match the values in the allele table, you can run CRISPResso with the parameter
--expand_allele_plots_by_quantification
. However, to understand why this isn't the default behavior, and why the numbers in your allele plot don't exactly match the numbers in your allele table, read on.Explanation
When alleles are reported in the
Alleles_frequency_table_around_gRNA.txt
file, alleles are defined by:When alleles are plotted, alleles collapsed based only on the read sequence and the reference sequence (1 and 2 above). This collapses several alleles that might otherwise have different values for the other properties (3-6 above). For this reason, the numbers in the allele plot are always the same or greater than the values in the allele table (because the allele table has un-collapsed alleles that are summed together in the allele plot). We chose to do this because the allele plot doesn't represent the other properties (3-6 above), so it could be considered misleading or confusing to plot two alleles with the same sequence on two different rows in the plot.
Verification
You can verify the allele plot counts by collapsing the alleles in the allele table by sequence using the following code. Replace the
Alleles_frequency_table_around_gRNA.txt
file with the path to your allele table.Demo
You can explore the allele-collapsing behavior yourself using the following code:
First, get some demo data and run CRISPResso.
To get the allele frequency table above, I ran the following short demo analysis:
The allele plot shows:
Now, compare these values to those in the allele table.
Note that the most frequent allele has a frequency of 24.12% (the allele is shown as 24.18% in the allele plot above).
Now, the most-frequent allele sequence has an allele frequency of 24.18, which matches the allele plot above 😤.
Demo using
--expand_allele_plots_by_quantification
We could also run the original command with the flag
--expand_allele_plots_by_quantification
to produce an allele plot with the same counts as the allele table.This produces the output plot with counts that match the allele table.
I hope that clears things up!
Beta Was this translation helpful? Give feedback.
All reactions