LD annotator
Class to annotate linkage disequilibrium (LD) operations from GnomAD.
Source code in src/otg/method/ld.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
annotate_associations_with_ld(associations_df, ld_index)
classmethod
Annotate linkage disequilibrium (LD) information to a set of associations.
We first join the associations dataframe with the LD index. Then, we add the population size of the study to each rValues entry in the ldSet to calculate the relative r between lead/tag for that study. Finally, we aggregate the weighted R information using ancestry proportions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
associations_df | DataFrame | Study locus DataFrame with a | required |
ld_index | LDIndex | Dataset with LD information for every variant present in gnomAD LD matrix | required |
Returns:
Name | Type | Description |
---|---|---|
DataFrame | DataFrame | Following the same schema as the input DataFrame, but with LD annotations ( |
Source code in src/otg/method/ld.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
annotate_variants_with_ld(variants_df, ld_index)
classmethod
Annotate linkage disequilibrium (LD) information to a set of variants.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variants_df | DataFrame | Input DataFrame with a | required |
ld_index | LDIndex | LD index | required |
Returns:
Name | Type | Description |
---|---|---|
DataFrame | DataFrame | DataFrame with LD annotations |
Source code in src/otg/method/ld.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|