mecfs_bio.asset_generator.annovar_37_basic_rsid_assignment
Asset generator for assigning rsIDs to genome build-37 GWAS datasets.
Classes:
-
RSIDAssignmentTaskGroup–Collection of tasks used to assign rsIDs by joining with an existing dataframe of SNPs
Functions:
-
annovar_37_basic_rsid_assignment–Asset generator that creates a chain of tasks to assign rsIDs to existing build 37
RSIDAssignmentTaskGroup
Collection of tasks used to assign rsIDs by joining with an existing dataframe of SNPs
Attributes:
-
harmonize_task(Task) – -
join_task(Task) – -
pre_harmonization_table_task(Task) –
annovar_37_basic_rsid_assignment
annovar_37_basic_rsid_assignment(
sumstats_task: Task,
base_name: str,
panel_ancestry: GnomadV2Group,
use_gwaslab_rsids_convention: bool = False,
drop_palindromic_ambiguous: bool = True,
filter_indels_in_harmonized: bool = False,
) -> RSIDAssignmentTaskGroup
Asset generator that creates a chain of tasks to assign rsIDs to existing build 37 sumstats datasets using the annovar dbSNP reference data.
The gwaslab Sumstats object is dumped to a table and oriented by genome-reference harmonization against the UCSC hg19 FASTA and the gnomAD v2.1.1 genomes panel (the rehosted copy, so no 14 h build is needed).
panel_ancestry is the gnomAD group whose allele frequencies resolve palindromes and ambiguous indels. It has no default: choose the group that best matches the GWAS cohort, for example nfe_nwe for UK Biobank or other north-western European cohorts, and nfe for cohorts spread across Europe. The codes are spelled out in mecfs_bio/constants/allele_frequency_panel_constants.py.
Set drop_palindromic_ambiguous to False to keep palindromic SNVs whose strand cannot be resolved. Ambiguous indels are never kept on that basis.
Set filter_indels_in_harmonized to drop indels before harmonization. This suits datasets with very long structural-variant alleles that the downstream SNP-based analyses (LDSC genetic correlation, MAGMA) do not use.