mendelian: Tools to filter inherited CNVs

mendelian.get_inherited(cnvs, twins_ro, parents_ro, doc_lower_bound=-inf, doc_upper_bound=inf)[source]

Filters the input CNV list to detect and count the inherited variants.

Parameters:
  • cnvs (dict) – A dict of CNVs from a same algorithm and family to filter for inherited CNVs (of the usual form: sample, chromosome, cnvs.
  • twins_ro (float) – Minimum reciprocal overlap value to consider two CNVs to be the same between twins.
  • parents_ro (float) – Minimum reciprocal overlap value to consider two CNVs to be the same between a twin and a parent.
  • doc_lower_bound (float) – Minimum doc parameter for the filtered CNVs, only used in very specific cases.
  • doc_upper_bound (float) – Maximum doc parameter for the filtered CNVs, only used in very specific cases.
Returns:

A tuple representing the list of inherited CNVs and a dictionary informations about the frequency of specific scenarios for display to the user.

Return type:

tuple

CNVs are considered to be inherited if they are shared between the two twins and at least one parent, with respect to the ro parameters. DOC values are allowed for filtering of CNVs with respect to the values in the CNV’s object doc attribute.

mendelian.main(args)[source]

Displays statistics about the rate of inherited CNVs for a particular algorithm and write a pickle file containing those variants.

The statistics are the following:

  • The proportion of twin-overlapping CNVs: The proportion of CNVs which are shared between both twins (The closer to 1 the better as the twins have identical genomes, when neglecting somatic de novo variations).
  • The proportion of twin-overlapping CNVs that are inherited: The proportion of CNVs that are shared with a parent, when considering only CNVs that are shared between both twins. This expected to be a value close to one as Mendelian inheritance dictates that CNVs that are in the twins are inherited from the parents (if we neglect the de novo rate).
  • The proportion of inherited CNVs: The proportion of CNVs which are shared amongst both twins and at least one parent.

Note

The script’s --help option will show the user how to customize the reciprocal overlap thresholds for comparison of CNVs between twins and with their parents.

Previous topic

generate_cnv_graph a data structure to handle different CNV signatures in a family

Next topic

merge_cnvs: Merges adjacent variants (fragmentation)

This Page