dae.backends.cnv package
Submodules
dae.backends.cnv.flexible_cnv_loader module
- dae.backends.cnv.flexible_cnv_loader.flexible_cnv_loader(filepath_or_buffer: Union[str, pathlib.Path, TextIO], families: dae.pedigrees.family.FamiliesData, genome: dae.genomic_resources.reference_genome.ReferenceGenome, regions: List[dae.utils.regions.Region], cnv_chrom: Optional[str] = None, cnv_start: Optional[str] = None, cnv_end: Optional[str] = None, cnv_location: Optional[str] = None, cnv_person_id: Optional[str] = None, cnv_family_id: Optional[str] = None, cnv_best_state: Optional[str] = None, cnv_variant_type: Optional[str] = None, cnv_plus_values: Optional[List[str]] = None, cnv_minus_values: Optional[List[str]] = None, cnv_sep: str = '\t', add_chrom_prefix: Optional[str] = None, del_chrom_prefix: Optional[str] = None, **_kwargs) Generator[Dict[str, Any], None, None] [source]
Load variants from CNVs input and transform them into DataFrames.
This function uses flexible variant loader infrastructure to load variants from a CNVs data input and transform them into a pandas DataFrame.
dae.backends.cnv.loader module
Defines CNV loader class and helpers.
Copy Number Variants (CNV) loader CNVLoader
This modules provides a class CNVLoader
to facilitate loading CNVs
specified in various input formats.
There are three groups of input parameters that could be configured by the CNVLoader parameters:
location of the variant - VCF-like vs CSHL-like of the variant position;
variant genotype - list of person_ids vs CSHL-like family/best state description of the genotype for given family
variant type - flexible CNV+/CNV- variant type description.
To configure the CNVLoader
you need to pass params dictionary
to the constructor of the class.
Parameters that are used to configure input data colums are:
Location of the CNVs
cnv_location - column name, that is interpreted as variant location
cnv_chrom - column name, interpreted as the chromosome
cnv_start - column name, interpreted as the start position of the CNVs
cnv_end - column name, interpreted as the end position of the CNVs
Genotype of the CNVs
cnv_family_id - column name, specifying the family for the CNVs
cnv_best_state - column name, specifying the best state fore the CNVs
cnv_person_id - column name, specifying a person, that has given CNV
Variant type for CNVs
cnv_variant_type - column name, specifying the CNV variant type
cnv_plus_values - list of the values in column cnv_variant_type that are interpreted as CNV+
cnv_minus_values - list of values in column cnv_variant_type that are interpreted as CNV-
Additional parameters
Additional parameters, that configure the behavior of the CNVLoader
are:
cnv_sep - separator character, that split columns in the lines of the input file
cnv_transmission_type - the CNV loader is used mostly for importing de Novo variants. In rare cases when we use this loader to import transmitted CNV variants we should pass this parameter to specify that the varirants are not denovo.
- class dae.backends.cnv.loader.CNVLoader(families: dae.pedigrees.family.FamiliesData, cnv_filename: str, genome: dae.genomic_resources.reference_genome.ReferenceGenome, regions: Optional[List[str]] = None, params: Optional[Dict[str, Any]] = None)[source]
Bases:
dae.backends.raw.loader.VariantsGenotypesLoader
Defines CNV loader class.