Clumping¶
Clumping is a commonly used post-processing method that allows for the identification of independent association signals from GWAS summary statistics and curated associations. This process is critical because of the complex linkage disequilibrium (LD) structure in human populations, which can result in multiple statistically significant associations within the same genomic region. Clumping methods help reduce redundancy in GWAS results and ensure that each reported association represents an independent signal.
We have implemented two clumping methods:
- Distance-based clumping: Uses genomic window to clump the significant SNPs into one hit.
- LD-based clumping: Uses genomic window and LD to clump the significant SNPs into one hit.
- Locus-breaker clumping: Applies a distance cutoff between baseline significant SNPs. Returns the start and end position of the locus as well.
The algorithmic logic is similar to classic clumping approaches from PLINK (Reference: PLINK Clump Documentation). See details below:
Distance-based clumping¶
gentropy.method.window_based_clumping.WindowBasedClumping
¶
Get semi-lead snps from summary statistics using a window based function.
Source code in src/gentropy/method/window_based_clumping.py
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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
|
clump(summary_statistics: SummaryStatistics, distance: int = WindowBasedClumpingStepConfig().distance, gwas_significance: float = WindowBasedClumpingStepConfig().gwas_significance) -> StudyLocus
staticmethod
¶
Clump significant signals from summary statistics based on window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
summary_statistics |
SummaryStatistics
|
Summary statistics to be used for clumping. |
required |
distance |
int
|
Distance in base pairs to be used for clumping. Defaults to 500_000. |
distance
|
gwas_significance |
float
|
GWAS significance threshold. Defaults to 5e-8. |
gwas_significance
|
Returns:
Name | Type | Description |
---|---|---|
StudyLocus |
StudyLocus
|
clumped summary statistics (without locus collection) |
StudyLocus
|
Check WindowBasedClumpingStepConfig object for default values |
Source code in src/gentropy/method/window_based_clumping.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
|
LD-based clumping:¶
gentropy.method.clump.LDclumping
¶
LD clumping reports the most significant genetic associations in a region in terms of a smaller number of “clumps” of genetically linked SNPs.
Source code in src/gentropy/method/clump.py
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 |
|
clump(associations: StudyLocus) -> StudyLocus
classmethod
¶
Perform clumping on studyLocus dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
associations |
StudyLocus
|
StudyLocus dataset |
required |
Returns:
Name | Type | Description |
---|---|---|
StudyLocus |
StudyLocus
|
including flag and removing locus information for LD clumped loci. |
Source code in src/gentropy/method/clump.py
65 66 67 68 69 70 71 72 73 74 75 |
|
Locus-breaker clumping¶
gentropy.method.locus_breaker_clumping.LocusBreakerClumping
¶
Locus-breaker clumping method.
Source code in src/gentropy/method/locus_breaker_clumping.py
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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
locus_breaker(summary_statistics: SummaryStatistics, baseline_pvalue_cutoff: float, distance_cutoff: int, pvalue_cutoff: float, flanking_distance: int) -> StudyLocus
staticmethod
¶
Identify GWAS associated loci based on the provided p-value and distance cutoff.
- The GWAS associated loci identified by this method have a varying width, and are separated by a distance greater than the provided distance cutoff.
- The distance is only calculted between single point associations that reach the baseline p-value cutoff.
- As the width of the selected genomic region dynamically depends on the loci, the resulting StudyLocus object will contain the locus start and end position.
- To ensure completeness, the locus is extended by a flanking distance in both ends.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
summary_statistics |
SummaryStatistics
|
Input summary statistics dataset. |
required |
baseline_pvalue_cutoff |
float
|
baseline significance we consider for the locus. |
required |
distance_cutoff |
int
|
minimum distance that separates two loci. |
required |
pvalue_cutoff |
float
|
the minimum significance the locus should have. |
required |
flanking_distance |
int
|
the distance to extend the locus in both directions. |
required |
Returns:
Name | Type | Description |
---|---|---|
StudyLocus |
StudyLocus
|
clumped study loci with locus start and end positions + lead variant from the locus. |
Source code in src/gentropy/method/locus_breaker_clumping.py
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 116 117 118 119 120 |
|
process_locus_breaker_output(lbc: StudyLocus, wbc: StudyLocus, large_loci_size: int) -> StudyLocus
staticmethod
¶
Process the locus breaker method result, and run window-based clumping on large loci.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lbc |
StudyLocus
|
StudyLocus object from locus-breaker clumping. |
required |
wbc |
StudyLocus
|
StudyLocus object from window-based clumping. |
required |
large_loci_size |
int
|
the size to define large loci which should be broken with wbc. |
required |
Returns:
Name | Type | Description |
---|---|---|
StudyLocus |
StudyLocus
|
clumped study loci with large loci broken by window-based clumping. |
Source code in src/gentropy/method/locus_breaker_clumping.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|