mecfs_bio.build_system.task.mixer.bivariate_mixer_task
Classes:
-
BivariateMixerTask–Bivariate (cross-trait) MiXeR analysis.
Attributes:
-
MIXER_BIVARIATE_FIT_JSON_PATTERN– -
MIXER_BIVARIATE_FIT_PREFIX_PATTERN– -
MIXER_BIVARIATE_TEST_JSON_PATTERN– -
MIXER_BIVARIATE_TEST_PREFIX_PATTERN– -
logger–
MIXER_BIVARIATE_FIT_JSON_PATTERN
module-attribute
MIXER_BIVARIATE_FIT_PREFIX_PATTERN
module-attribute
MIXER_BIVARIATE_TEST_JSON_PATTERN
module-attribute
MIXER_BIVARIATE_TEST_PREFIX_PATTERN
module-attribute
BivariateMixerTask
Bases: Task
Bivariate (cross-trait) MiXeR analysis.
Runs fit2 and (optionally) test2 steps, which require completed univariate fit1 results for both traits. Each BivariateMixerTask handles a single rep.
See: O.Frei et al., Bivariate causal mixture model quantifies polygenic overlap between complex traits beyond genetic correlation, Nature Communications, 2019.
Added with help from Claude
Methods:
Attributes:
-
apply_extract_to_test(bool) – -
bim_file_pattern(str) – -
chr_to_use_arg(str | None) – -
deps(list[Task]) – -
extra_args(Sequence[str]) – -
extract_file_pattern_gen(Callable[[int], str] | None) – -
include_test(bool) – -
ld_file_pattern(str) – -
meta(Meta) – -
reference_data_directory_task(Task) – -
rep(int) – -
threads(int) – -
trait_1_source(MixerDataSource | PreformattedMixerDataSource) – -
trait_1_univariate_task(MixerTask) – -
trait_2_source(MixerDataSource | PreformattedMixerDataSource) – -
trait_2_univariate_task(MixerTask) –
bim_file_pattern
class-attribute
instance-attribute
ld_file_pattern
class-attribute
instance-attribute
create
classmethod
create(
asset_id: str,
trait_1_source: MixerDataSource
| PreformattedMixerDataSource,
trait_2_source: MixerDataSource
| PreformattedMixerDataSource,
ref_data_directory_task: Task,
trait_1_univariate_task: MixerTask,
trait_2_univariate_task: MixerTask,
extract_file_pattern_gen: Callable[[int], str]
| None = default_mixer_extract_file_pattern_gen,
extra_args: Sequence[str] = tuple(),
chr_args: str | None = None,
ld_file_pattern: str = "1000G_EUR_Phase3_plink/1000G.EUR.QC.@.run4.ld",
bim_file_pattern: str = "1000G_EUR_Phase3_plink/1000G.EUR.QC.@.bim",
threads: int = 4,
apply_extract_to_test: bool = False,
include_test: bool = True,
)
Source code in mecfs_bio/build_system/task/mixer/bivariate_mixer_task.py
execute
Source code in mecfs_bio/build_system/task/mixer/bivariate_mixer_task.py
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 | |