Coloc
gentropy.method.colocalisation.Coloc
¶
Calculate bayesian colocalisation based on overlapping signals from credible sets.
Based on the R COLOC package, which uses the Bayes factors from the credible set to estimate the posterior probability of colocalisation. This method makes the simplifying assumption that only one single causal variant exists for any given trait in any genomic region.
Hypothesis | Description |
---|---|
H0 | no association with either trait in the region |
H1 | association with trait 1 only |
H2 | association with trait 2 only |
H3 | both traits are associated, but have different single causal variants |
H4 | both traits are associated and share the same single causal variant |
Bayes factors required
Coloc requires the availability of Bayes factors (BF) for each variant in the credible set (logBF
column).
Attributes:
Name | Type | Description |
---|---|---|
PSEUDOCOUNT |
float
|
Pseudocount to avoid log(0). Defaults to 1e-10. |
Source code in src/gentropy/method/colocalisation.py
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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|
colocalise(overlapping_signals: StudyLocusOverlap, priorc1: float = 0.0001, priorc2: float = 0.0001, priorc12: float = 1e-05) -> Colocalisation
classmethod
¶
Calculate bayesian colocalisation based on overlapping signals.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overlapping_signals |
StudyLocusOverlap
|
overlapping peaks |
required |
priorc1 |
float
|
Prior on variant being causal for trait 1. Defaults to 1e-4. |
0.0001
|
priorc2 |
float
|
Prior on variant being causal for trait 2. Defaults to 1e-4. |
0.0001
|
priorc12 |
float
|
Prior on variant being causal for traits 1 and 2. Defaults to 1e-5. |
1e-05
|
Returns:
Name | Type | Description |
---|---|---|
Colocalisation |
Colocalisation
|
Colocalisation results |
Source code in src/gentropy/method/colocalisation.py
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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|