diff --git a/Dockerfile b/Dockerfile index 5d7c134..66b5e01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 COPY environment.yml . # Install miniconda @@ -45,12 +45,12 @@ RUN jbang export portable -O=RegenieValidateInput.jar RegenieValidateInput.java # Install regenie (not as conda package available) WORKDIR "/opt" -ENV REGENIE_VERSION="v3.3" +ENV REGENIE_VERSION="v3.4" RUN mkdir regenie && cd regenie && \ wget https://github.com/rgcgithub/regenie/releases/download/${REGENIE_VERSION}/regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \ - unzip -q regenie_v3.*.gz_x86_64_Linux.zip && \ - rm regenie_v3.*.gz_x86_64_Linux.zip && \ - mv regenie_v3.*.gz_x86_64_Linux regenie && \ + unzip -q regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \ + rm regenie_${REGENIE_VERSION}.gz_x86_64_Linux.zip && \ + mv regenie_${REGENIE_VERSION}.gz_x86_64_Linux regenie && \ chmod +x regenie -ENV PATH="/opt/regenie/:${PATH}" +ENV PATH="/opt/regenie/:${PATH}" \ No newline at end of file diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index f5284b9..994a9c4 100644 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -78,9 +78,14 @@ class WorkflowMain { exit 1, "Invalid config file. The 'write-mask' option does not work when building masks with 'sum'." } + if(params.genotypes_association_chunk_size > 0 ) { + //&& genotypes_association_format != 'bgen' ) { + exit 1, " Chunking is currently not available for gene-based tests (param: genotypes_association_chunk_size=0)." + } + //Check association file format for gene-based tests - if (genotypes_association_format != 'bed'){ - exit 1, "File format " + genotypes_association_format + " currently not supported for gene-based tests. Please use 'bed' input instead. " + if (genotypes_association_format != 'vcf' && genotypes_association_format != "bgen"){ + exit 1, "File format " + genotypes_association_format + " currently not supported for gene-based tests. Please use 'vcf' or 'bgen' input instead. " } } else { //Check if tests exists diff --git a/modules/local/regenie/regenie_step2_run_gene_tests.nf b/modules/local/regenie/regenie_step2_run_gene_tests.nf index e92a11f..e0cf85a 100644 --- a/modules/local/regenie/regenie_step2_run_gene_tests.nf +++ b/modules/local/regenie/regenie_step2_run_gene_tests.nf @@ -5,10 +5,11 @@ process REGENIE_STEP2_RUN_GENE_TESTS { input: path step1_out - tuple val(filename), path(genotyped_plink_file) + tuple val(filename), path(genotyped_plink_bim_file), path(genotyped_plink_bed_file), path(genotyped_plink_fam_file), val(range) val assoc_format path phenotypes_file path covariates_file + path sample_file path regenie_gene_anno_file path regenie_gene_setlist_file path regenie_gene_masks_file @@ -20,8 +21,9 @@ process REGENIE_STEP2_RUN_GENE_TESTS { path "${filename}_masks*" script: - def format = assoc_format == 'bed' ? "--bed" : '--bgen' + def format = assoc_format == 'bgen' ? "--bgen" : '--pgen' def extension = assoc_format == 'bgen' ? ".bgen" : '' + def bgen_sample = sample_file ? "--sample $sample_file" : '' def firthApprox = params.regenie_firth_approx ? "--approx" : "" def firth = params.regenie_firth ? "--firth $firthApprox" : "" def binaryTrait = params.phenotypes_binary_trait ? "--bt $firth " : "" @@ -65,6 +67,7 @@ process REGENIE_STEP2_RUN_GENE_TESTS { $predictions \ $apply_rint \ $geneTest \ + $bgen_sample \ $aaf \ $maxAaf \ $vcMACThr \ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations new file mode 100644 index 0000000..8d38db1 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations @@ -0,0 +1,500 @@ +mog_0 SET1 missense +mog_1 SET1 missense +mog_2 SET1 pLof +mog_3 SET1 pLof +mog_4 SET1 missense +mog_5 SET1 pLof +mog_6 SET1 pLof +mog_7 SET1 missense +mog_8 SET1 missense +mog_9 SET1 pLof +mog_10 SET1 missense +mog_11 SET1 pLof +mog_12 SET1 pLof +mog_13 SET1 missense +mog_14 SET1 missense +mog_15 SET1 missense +mog_16 SET1 pLof +mog_17 SET1 missense +mog_18 SET1 pLof +mog_19 SET1 pLof +mog_20 SET1 pLof +mog_21 SET1 pLof +mog_22 SET1 pLof +mog_23 SET1 pLof +mog_24 SET1 pLof +mog_25 SET1 pLof +mog_26 SET1 pLof +mog_27 SET1 missense +mog_28 SET1 pLof +mog_29 SET1 pLof +mog_30 SET1 pLof +mog_31 SET1 pLof +mog_32 SET1 missense +mog_33 SET1 missense +mog_34 SET1 pLof +mog_35 SET1 pLof +mog_36 SET1 missense +mog_37 SET1 pLof +mog_38 SET1 pLof +mog_39 SET1 pLof +mog_40 SET1 pLof +mog_41 SET1 pLof +mog_42 SET1 missense +mog_43 SET1 missense +mog_44 SET1 pLof +mog_45 SET1 missense +mog_46 SET1 missense +mog_47 SET1 pLof +mog_48 SET1 missense +mog_49 SET1 pLof +inf_0 SET1 pLof +inf_1 SET1 pLof +inf_2 SET1 pLof +inf_3 SET1 pLof +inf_4 SET1 pLof +inf_5 SET1 missense +inf_6 SET1 pLof +inf_7 SET1 pLof +inf_8 SET1 pLof +inf_9 SET1 missense +inf_10 SET1 missense +inf_11 SET1 pLof +inf_12 SET1 pLof +inf_13 SET1 pLof +inf_14 SET1 missense +inf_15 SET1 pLof +inf_16 SET1 pLof +inf_17 SET1 missense +inf_18 SET1 pLof +inf_19 SET1 pLof +inf_20 SET1 missense +inf_21 SET1 missense +inf_22 SET1 missense +inf_23 SET1 pLof +inf_24 SET1 pLof +inf_25 SET1 pLof +inf_26 SET1 pLof +inf_27 SET1 pLof +inf_28 SET1 pLof +inf_29 SET1 pLof +inf_30 SET1 pLof +inf_31 SET1 missense +inf_32 SET1 pLof +inf_33 SET1 pLof +inf_34 SET1 pLof +inf_35 SET1 missense +inf_36 SET1 pLof +inf_37 SET1 missense +inf_38 SET1 missense +inf_39 SET1 pLof +inf_40 SET1 pLof +inf_41 SET1 missense +inf_42 SET1 pLof +inf_43 SET1 pLof +inf_44 SET1 pLof +inf_45 SET1 missense +inf_46 SET1 missense +inf_47 SET1 pLof +inf_48 SET1 pLof +inf_49 SET1 pLof +inf_50 SET1 pLof +inf_51 SET1 pLof +inf_52 SET1 pLof +inf_53 SET1 pLof +inf_54 SET1 pLof +inf_55 SET1 pLof +inf_56 SET1 pLof +inf_57 SET1 pLof +inf_58 SET1 missense +inf_59 SET1 pLof +inf_60 SET1 pLof +inf_61 SET1 pLof +inf_62 SET1 pLof +inf_63 SET1 pLof +inf_64 SET1 pLof +inf_65 SET1 pLof +inf_66 SET1 pLof +inf_67 SET1 pLof +inf_68 SET1 pLof +inf_69 SET1 missense +inf_70 SET1 pLof +inf_71 SET1 missense +inf_72 SET1 pLof +inf_73 SET1 pLof +inf_74 SET1 pLof +inf_75 SET1 pLof +inf_76 SET1 pLof +inf_77 SET1 pLof +inf_78 SET1 pLof +inf_79 SET1 pLof +inf_80 SET1 pLof +inf_81 SET1 missense +inf_82 SET1 missense +inf_83 SET1 pLof +inf_84 SET1 pLof +inf_85 SET1 pLof +inf_86 SET1 missense +inf_87 SET1 missense +inf_88 SET1 pLof +inf_89 SET1 pLof +inf_90 SET1 pLof +inf_91 SET1 pLof +inf_92 SET1 pLof +inf_93 SET1 pLof +inf_94 SET1 missense +inf_95 SET1 missense +inf_96 SET1 missense +inf_97 SET1 missense +inf_98 SET1 pLof +inf_99 SET1 pLof +inf_100 SET1 pLof +inf_101 SET1 pLof +inf_102 SET1 pLof +inf_103 SET1 pLof +inf_104 SET1 missense +inf_105 SET1 pLof +inf_106 SET1 pLof +inf_107 SET1 pLof +inf_108 SET1 missense +inf_109 SET1 pLof +inf_110 SET1 pLof +inf_111 SET1 missense +inf_112 SET1 missense +inf_113 SET1 missense +inf_114 SET1 pLof +inf_115 SET1 missense +inf_116 SET1 pLof +inf_117 SET1 pLof +inf_118 SET1 missense +inf_119 SET1 missense +inf_120 SET1 missense +inf_121 SET1 pLof +inf_122 SET1 pLof +inf_123 SET1 pLof +inf_124 SET1 pLof +inf_125 SET1 pLof +inf_126 SET1 missense +inf_127 SET1 pLof +inf_128 SET1 pLof +inf_129 SET1 pLof +inf_130 SET1 pLof +inf_131 SET1 missense +inf_132 SET1 missense +inf_133 SET1 pLof +inf_134 SET1 pLof +inf_135 SET1 missense +inf_136 SET1 pLof +inf_137 SET1 pLof +inf_138 SET1 pLof +inf_139 SET1 pLof +inf_140 SET1 missense +inf_141 SET1 pLof +inf_142 SET1 missense +inf_143 SET1 pLof +inf_144 SET1 pLof +inf_145 SET1 pLof +inf_146 SET1 pLof +inf_147 SET1 pLof +inf_148 SET1 missense +inf_149 SET1 pLof +inf_150 SET1 pLof +inf_151 SET1 pLof +inf_152 SET1 missense +inf_153 SET1 missense +inf_154 SET1 pLof +inf_155 SET1 missense +inf_156 SET1 pLof +inf_157 SET1 pLof +inf_158 SET1 pLof +inf_159 SET1 missense +inf_160 SET1 pLof +inf_161 SET1 pLof +inf_162 SET1 pLof +inf_163 SET1 pLof +inf_164 SET1 pLof +inf_165 SET1 pLof +inf_166 SET1 pLof +inf_167 SET1 pLof +inf_168 SET1 missense +inf_169 SET1 pLof +inf_170 SET1 pLof +inf_171 SET1 pLof +inf_172 SET1 pLof +inf_173 SET1 pLof +inf_174 SET1 pLof +inf_175 SET1 missense +inf_176 SET1 missense +inf_177 SET1 pLof +inf_178 SET1 missense +inf_179 SET1 pLof +inf_180 SET1 pLof +inf_181 SET1 pLof +inf_182 SET1 pLof +inf_183 SET1 missense +inf_184 SET1 missense +inf_185 SET1 pLof +inf_186 SET1 pLof +inf_187 SET1 pLof +inf_188 SET1 missense +inf_189 SET1 pLof +inf_190 SET1 missense +inf_191 SET1 pLof +inf_192 SET1 pLof +inf_193 SET1 pLof +inf_194 SET1 pLof +inf_195 SET1 pLof +inf_196 SET1 pLof +inf_197 SET1 pLof +inf_198 SET1 pLof +inf_199 SET1 missense +inf_200 SET2 pLof +inf_201 SET2 pLof +inf_202 SET2 pLof +inf_203 SET2 missense +inf_204 SET2 pLof +inf_205 SET2 missense +inf_206 SET2 pLof +inf_207 SET2 missense +inf_208 SET2 pLof +inf_209 SET2 pLof +inf_210 SET2 pLof +inf_211 SET2 missense +inf_212 SET2 pLof +inf_213 SET2 missense +inf_214 SET2 missense +inf_215 SET2 missense +inf_216 SET2 pLof +inf_217 SET2 pLof +inf_218 SET2 pLof +inf_219 SET2 pLof +inf_220 SET2 pLof +inf_221 SET2 pLof +inf_222 SET2 pLof +inf_223 SET2 pLof +inf_224 SET2 pLof +inf_225 SET2 missense +inf_226 SET2 pLof +inf_227 SET2 pLof +inf_228 SET2 pLof +inf_229 SET2 pLof +inf_230 SET2 pLof +inf_231 SET2 missense +inf_232 SET2 pLof +inf_233 SET2 pLof +inf_234 SET2 pLof +inf_235 SET2 missense +inf_236 SET2 pLof +inf_237 SET2 missense +inf_238 SET2 missense +inf_239 SET2 missense +inf_240 SET2 pLof +inf_241 SET2 pLof +inf_242 SET2 pLof +inf_243 SET2 missense +inf_244 SET2 pLof +inf_245 SET2 missense +inf_246 SET2 pLof +inf_247 SET2 pLof +inf_248 SET2 pLof +inf_249 SET2 pLof +inf_250 SET2 missense +inf_251 SET2 pLof +inf_252 SET2 pLof +inf_253 SET2 pLof +inf_254 SET2 missense +inf_255 SET2 pLof +inf_256 SET2 pLof +inf_257 SET2 missense +inf_258 SET2 missense +inf_259 SET2 pLof +inf_260 SET2 missense +inf_261 SET2 pLof +inf_262 SET2 missense +inf_263 SET2 pLof +inf_264 SET2 pLof +inf_265 SET2 missense +inf_266 SET2 pLof +inf_267 SET2 pLof +inf_268 SET2 pLof +inf_269 SET2 missense +inf_270 SET2 pLof +inf_271 SET2 pLof +inf_272 SET2 pLof +inf_273 SET2 pLof +inf_274 SET2 pLof +inf_275 SET2 pLof +inf_276 SET2 pLof +inf_277 SET2 pLof +inf_278 SET2 missense +inf_279 SET2 pLof +inf_280 SET2 pLof +inf_281 SET2 pLof +inf_282 SET2 pLof +inf_283 SET2 pLof +inf_284 SET2 pLof +inf_285 SET2 missense +inf_286 SET2 pLof +inf_287 SET2 pLof +inf_288 SET2 pLof +inf_289 SET2 pLof +inf_290 SET2 pLof +inf_291 SET2 pLof +inf_292 SET2 missense +inf_293 SET2 missense +inf_294 SET2 missense +inf_295 SET2 pLof +inf_296 SET2 pLof +inf_297 SET2 missense +inf_298 SET2 pLof +inf_299 SET2 pLof +inf_300 SET2 missense +inf_301 SET2 pLof +inf_302 SET2 pLof +inf_303 SET2 pLof +inf_304 SET2 pLof +inf_305 SET2 missense +inf_306 SET2 missense +inf_307 SET2 pLof +inf_308 SET2 pLof +inf_309 SET2 missense +inf_310 SET2 missense +inf_311 SET2 pLof +inf_312 SET2 pLof +inf_313 SET2 pLof +inf_314 SET2 pLof +inf_315 SET2 pLof +inf_316 SET2 pLof +inf_317 SET2 pLof +inf_318 SET2 pLof +inf_319 SET2 pLof +inf_320 SET2 missense +inf_321 SET2 missense +inf_322 SET2 pLof +inf_323 SET2 missense +inf_324 SET2 missense +inf_325 SET2 pLof +inf_326 SET2 pLof +inf_327 SET2 missense +inf_328 SET2 pLof +inf_329 SET2 missense +inf_330 SET2 pLof +inf_331 SET2 pLof +inf_332 SET2 missense +inf_333 SET2 pLof +inf_334 SET2 pLof +inf_335 SET2 pLof +inf_336 SET2 pLof +inf_337 SET2 pLof +inf_338 SET2 missense +inf_339 SET2 pLof +inf_340 SET2 pLof +inf_341 SET2 missense +inf_342 SET2 pLof +inf_343 SET2 missense +inf_344 SET2 pLof +inf_345 SET2 pLof +inf_346 SET2 pLof +inf_347 SET2 pLof +inf_348 SET2 pLof +inf_349 SET2 pLof +inf_350 SET2 pLof +inf_351 SET2 pLof +inf_352 SET2 pLof +inf_353 SET2 pLof +inf_354 SET2 missense +inf_355 SET2 pLof +inf_356 SET2 pLof +inf_357 SET2 pLof +inf_358 SET2 pLof +inf_359 SET2 pLof +inf_360 SET2 missense +inf_361 SET2 pLof +inf_362 SET2 pLof +inf_363 SET2 pLof +inf_364 SET2 pLof +inf_365 SET2 pLof +inf_366 SET2 pLof +inf_367 SET2 pLof +inf_368 SET2 missense +inf_369 SET2 missense +inf_370 SET2 missense +inf_371 SET2 pLof +inf_372 SET2 pLof +inf_373 SET2 missense +inf_374 SET2 pLof +inf_375 SET2 missense +inf_376 SET2 missense +inf_377 SET2 pLof +inf_378 SET2 pLof +inf_379 SET2 pLof +inf_380 SET2 pLof +inf_381 SET2 pLof +inf_382 SET2 pLof +inf_383 SET2 pLof +inf_384 SET2 pLof +inf_385 SET2 pLof +inf_386 SET2 missense +inf_387 SET2 pLof +inf_388 SET2 pLof +inf_389 SET2 pLof +inf_390 SET2 pLof +inf_391 SET2 missense +inf_392 SET2 pLof +inf_393 SET2 pLof +inf_394 SET2 pLof +inf_395 SET2 pLof +inf_396 SET2 pLof +inf_397 SET2 pLof +inf_398 SET2 missense +inf_399 SET2 pLof +null_0 SET2 pLof +null_1 SET2 pLof +null_2 SET2 missense +null_3 SET2 pLof +null_4 SET2 missense +null_5 SET2 pLof +null_6 SET2 pLof +null_7 SET2 pLof +null_8 SET2 pLof +null_9 SET2 pLof +null_10 SET2 pLof +null_11 SET2 pLof +null_12 SET2 missense +null_13 SET2 pLof +null_14 SET2 pLof +null_15 SET2 pLof +null_16 SET2 pLof +null_17 SET2 pLof +null_18 SET2 pLof +null_19 SET2 missense +null_20 SET2 pLof +null_21 SET2 pLof +null_22 SET2 pLof +null_23 SET2 missense +null_24 SET2 pLof +null_25 SET2 pLof +null_26 SET2 missense +null_27 SET2 pLof +null_28 SET2 missense +null_29 SET2 pLof +null_30 SET2 pLof +null_31 SET2 pLof +null_32 SET2 pLof +null_33 SET2 missense +null_34 SET2 pLof +null_35 SET2 missense +null_36 SET2 pLof +null_37 SET2 missense +null_38 SET2 pLof +null_39 SET2 pLof +null_40 SET2 pLof +null_41 SET2 pLof +null_42 SET2 missense +null_43 SET2 missense +null_44 SET2 pLof +null_45 SET2 pLof +null_46 SET2 pLof +null_47 SET2 pLof +null_48 SET2 missense +null_49 SET2 pLof diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen new file mode 100644 index 0000000..16c5aea Binary files /dev/null and b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen differ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks new file mode 100644 index 0000000..19a2fb1 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks @@ -0,0 +1,3 @@ +M1 pLof +M2 pLof,missense,unknown1 +M3 unknown1,unknown2 diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample new file mode 100644 index 0000000..36f8df3 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample @@ -0,0 +1,502 @@ +ID_1 ID_2 missing sex PHENO1 +0 0 0 D P +1 1 0 NA -0.426776 +2 2 0 NA 0.553949 +3 3 0 NA -0.650162 +4 4 0 NA 0.665824 +5 5 0 NA 2.15353 +6 6 0 NA 1.60361 +7 7 0 NA 0.924509 +8 8 0 NA 0.166955 +9 9 0 NA -0.446781 +10 10 0 NA 0.913018 +11 11 0 NA -0.123653 +12 12 0 NA 0.451207 +13 13 0 NA -1.81342 +14 14 0 NA 0.10916 +15 15 0 NA 1.26067 +16 16 0 NA 0.553231 +17 17 0 NA 0.209452 +18 18 0 NA -0.513218 +19 19 0 NA 0.611907 +20 20 0 NA 1.53946 +21 21 0 NA -0.386504 +22 22 0 NA -2.51434 +23 23 0 NA 0.405703 +24 24 0 NA 0.51856 +25 25 0 NA 1.06115 +26 26 0 NA 0.195941 +27 27 0 NA -0.249796 +28 28 0 NA -0.267648 +29 29 0 NA 0.717794 +30 30 0 NA 1.18612 +31 31 0 NA 0.0862962 +32 32 0 NA -0.353043 +33 33 0 NA 0.23543 +34 34 0 NA 1.53045 +35 35 0 NA 0.457955 +36 36 0 NA 0.41183 +37 37 0 NA 1.01735 +38 38 0 NA -1.38481 +39 39 0 NA 1.75103 +40 40 0 NA 0.274954 +41 41 0 NA -1.9897 +42 42 0 NA -0.274423 +43 43 0 NA 1.42641 +44 44 0 NA 1.67944 +45 45 0 NA -1.97622 +46 46 0 NA 1.31329 +47 47 0 NA -1.23795 +48 48 0 NA -1.22309 +49 49 0 NA -0.208682 +50 50 0 NA 0.0465913 +51 51 0 NA 0.645466 +52 52 0 NA -0.336671 +53 53 0 NA -1.42514 +54 54 0 NA -1.74041 +55 55 0 NA -0.989992 +56 56 0 NA -0.681306 +57 57 0 NA 1.45234 +58 58 0 NA -0.143956 +59 59 0 NA -0.437836 +60 60 0 NA -0.151927 +61 61 0 NA -1.09187 +62 62 0 NA 0.118866 +63 63 0 NA -0.744682 +64 64 0 NA -0.351599 +65 65 0 NA -0.250524 +66 66 0 NA -1.14453 +67 67 0 NA 0.402101 +68 68 0 NA -0.269673 +69 69 0 NA -1.07104 +70 70 0 NA 0.54661 +71 71 0 NA 0.905989 +72 72 0 NA -0.930246 +73 73 0 NA -0.164935 +74 74 0 NA -0.259298 +75 75 0 NA -2.11448 +76 76 0 NA -0.607634 +77 77 0 NA 0.774801 +78 78 0 NA -2.09622 +79 79 0 NA -1.91166 +80 80 0 NA 1.03534 +81 81 0 NA 0.72945 +82 82 0 NA -0.0979342 +83 83 0 NA 0.245666 +84 84 0 NA 0.938673 +85 85 0 NA 1.73376 +86 86 0 NA 3.59655 +87 87 0 NA 0.10418 +88 88 0 NA 0.818146 +89 89 0 NA -0.471747 +90 90 0 NA 1.32639 +91 91 0 NA -0.616465 +92 92 0 NA -1.19637 +93 93 0 NA -2.52343 +94 94 0 NA -1.6776 +95 95 0 NA -1.32518 +96 96 0 NA 0.588294 +97 97 0 NA 1.23774 +98 98 0 NA -0.292771 +99 99 0 NA 2.21307 +100 100 0 NA 1.39079 +101 101 0 NA 0.348965 +102 102 0 NA -0.179652 +103 103 0 NA -1.71495 +104 104 0 NA -0.360643 +105 105 0 NA 0.255807 +106 106 0 NA 0.78485 +107 107 0 NA 2.50518 +108 108 0 NA -1.81684 +109 109 0 NA -0.0156569 +110 110 0 NA 0.704029 +111 111 0 NA -0.0113866 +112 112 0 NA -0.640498 +113 113 0 NA 2.07844 +114 114 0 NA -0.225493 +115 115 0 NA 0.00218799 +116 116 0 NA 0.453076 +117 117 0 NA 0.711156 +118 118 0 NA -7.92646e-05 +119 119 0 NA 1.27164 +120 120 0 NA 0.130916 +121 121 0 NA 0.960164 +122 122 0 NA -0.694627 +123 123 0 NA 1.20835 +124 124 0 NA -0.555829 +125 125 0 NA 0.408699 +126 126 0 NA 0.863283 +127 127 0 NA 0.864202 +128 128 0 NA -0.451513 +129 129 0 NA -0.191405 +130 130 0 NA -0.0376491 +131 131 0 NA 1.06995 +132 132 0 NA 0.733263 +133 133 0 NA -1.38596 +134 134 0 NA -0.168826 +135 135 0 NA 1.23416 +136 136 0 NA -0.130181 +137 137 0 NA -0.849622 +138 138 0 NA 1.65559 +139 139 0 NA -0.855749 +140 140 0 NA -0.591996 +141 141 0 NA 1.47661 +142 142 0 NA -1.76068 +143 143 0 NA 0.333135 +144 144 0 NA -1.3168 +145 145 0 NA 2.26584 +146 146 0 NA -0.585547 +147 147 0 NA 1.00424 +148 148 0 NA 0.595063 +149 149 0 NA -2.35898 +150 150 0 NA 1.02006 +151 151 0 NA -1.25786 +152 152 0 NA -0.0970053 +153 153 0 NA 0.336385 +154 154 0 NA 1.79728 +155 155 0 NA 0.270135 +156 156 0 NA -0.380863 +157 157 0 NA 0.0401893 +158 158 0 NA -0.396513 +159 159 0 NA 1.49365 +160 160 0 NA -1.29933 +161 161 0 NA 0.251928 +162 162 0 NA 0.691775 +163 163 0 NA 0.740751 +164 164 0 NA -0.310567 +165 165 0 NA -0.55526 +166 166 0 NA -1.00578 +167 167 0 NA 0.0545069 +168 168 0 NA -0.634928 +169 169 0 NA -0.669547 +170 170 0 NA -0.232261 +171 171 0 NA 0.703583 +172 172 0 NA -0.313278 +173 173 0 NA -0.249173 +174 174 0 NA -0.659208 +175 175 0 NA -0.947788 +176 176 0 NA 0.480091 +177 177 0 NA 0.47061 +178 178 0 NA -0.0650563 +179 179 0 NA -1.49593 +180 180 0 NA 0.540549 +181 181 0 NA 1.12327 +182 182 0 NA 0.00744181 +183 183 0 NA 0.663999 +184 184 0 NA -0.567857 +185 185 0 NA 0.229938 +186 186 0 NA -0.170762 +187 187 0 NA 0.34209 +188 188 0 NA -0.109504 +189 189 0 NA -0.068089 +190 190 0 NA -2.31449 +191 191 0 NA -1.07777 +192 192 0 NA -0.339403 +193 193 0 NA -1.5321 +194 194 0 NA 1.27784 +195 195 0 NA -0.618697 +196 196 0 NA 0.244838 +197 197 0 NA -0.0897247 +198 198 0 NA 0.285638 +199 199 0 NA 0.0266523 +200 200 0 NA -0.855846 +201 201 0 NA 0.103268 +202 202 0 NA -0.46838 +203 203 0 NA -0.0396295 +204 204 0 NA 0.501029 +205 205 0 NA -1.61463 +206 206 0 NA -0.822108 +207 207 0 NA -0.415433 +208 208 0 NA 0.192556 +209 209 0 NA -0.0136163 +210 210 0 NA -0.475529 +211 211 0 NA 0.10233 +212 212 0 NA 0.748894 +213 213 0 NA 0.441979 +214 214 0 NA 1.01881 +215 215 0 NA 1.18723 +216 216 0 NA 0.802298 +217 217 0 NA -0.477409 +218 218 0 NA -0.141978 +219 219 0 NA -0.174778 +220 220 0 NA 1.03133 +221 221 0 NA 0.094144 +222 222 0 NA 0.0786411 +223 223 0 NA -0.561197 +224 224 0 NA -0.617684 +225 225 0 NA -0.624781 +226 226 0 NA 0.72625 +227 227 0 NA 0.673668 +228 228 0 NA 1.20746 +229 229 0 NA -0.700091 +230 230 0 NA 1.01325 +231 231 0 NA 0.108613 +232 232 0 NA 1.53784 +233 233 0 NA -0.388645 +234 234 0 NA 0.58539 +235 235 0 NA 0.636149 +236 236 0 NA -2.37272 +237 237 0 NA -0.154652 +238 238 0 NA -0.453532 +239 239 0 NA 0.200597 +240 240 0 NA 1.67001 +241 241 0 NA 1.03037 +242 242 0 NA -0.208077 +243 243 0 NA 0.164049 +244 244 0 NA -0.288133 +245 245 0 NA 0.52305 +246 246 0 NA 0.307298 +247 247 0 NA 0.116519 +248 248 0 NA -0.00206642 +249 249 0 NA 0.655496 +250 250 0 NA -1.25415 +251 251 0 NA 0.00726571 +252 252 0 NA 2.6072 +253 253 0 NA 0.787332 +254 254 0 NA -0.573939 +255 255 0 NA 0.430139 +256 256 0 NA 0.498003 +257 257 0 NA -0.472708 +258 258 0 NA -2.11577 +259 259 0 NA -0.302791 +260 260 0 NA 0.135721 +261 261 0 NA 0.746283 +262 262 0 NA 1.05104 +263 263 0 NA -0.914336 +264 264 0 NA -1.98078 +265 265 0 NA 0.559037 +266 266 0 NA -1.42152 +267 267 0 NA 0.936689 +268 268 0 NA 0.380767 +269 269 0 NA 0.945328 +270 270 0 NA 0.0570358 +271 271 0 NA 1.47451 +272 272 0 NA -0.517474 +273 273 0 NA -1.55714 +274 274 0 NA -1.0888 +275 275 0 NA 1.23102 +276 276 0 NA -0.47694 +277 277 0 NA -0.224195 +278 278 0 NA -0.537571 +279 279 0 NA 0.019698 +280 280 0 NA 1.18258 +281 281 0 NA -0.781154 +282 282 0 NA -0.460112 +283 283 0 NA 0.703325 +284 284 0 NA -0.840924 +285 285 0 NA 0.557335 +286 286 0 NA -1.62788 +287 287 0 NA 1.65839 +288 288 0 NA -1.21203 +289 289 0 NA -0.972147 +290 290 0 NA -0.596574 +291 291 0 NA -1.23514 +292 292 0 NA 1.6419 +293 293 0 NA -0.421417 +294 294 0 NA 0.387531 +295 295 0 NA -1.07038 +296 296 0 NA -0.51778 +297 297 0 NA 1.15659 +298 298 0 NA -0.667902 +299 299 0 NA -0.970543 +300 300 0 NA -0.865546 +301 301 0 NA -1.07894 +302 302 0 NA -1.24408 +303 303 0 NA -1.04468 +304 304 0 NA -0.56958 +305 305 0 NA -0.847351 +306 306 0 NA -1.1901 +307 307 0 NA 1.02238 +308 308 0 NA -1.97905 +309 309 0 NA -1.52535 +310 310 0 NA 1.0894 +311 311 0 NA 0.696256 +312 312 0 NA 0.987405 +313 313 0 NA 0.112456 +314 314 0 NA -0.050028 +315 315 0 NA -0.871743 +316 316 0 NA 0.814679 +317 317 0 NA -0.552664 +318 318 0 NA 1.25739 +319 319 0 NA -1.26483 +320 320 0 NA 1.65303 +321 321 0 NA 1.3011 +322 322 0 NA -0.0201895 +323 323 0 NA -1.88367 +324 324 0 NA 1.42058 +325 325 0 NA -0.689172 +326 326 0 NA -0.304488 +327 327 0 NA -0.0852042 +328 328 0 NA 2.85163 +329 329 0 NA -1.15681 +330 330 0 NA 0.28258 +331 331 0 NA -1.95007 +332 332 0 NA -1.17526 +333 333 0 NA -1.33243 +334 334 0 NA 0.70641 +335 335 0 NA -0.438966 +336 336 0 NA -0.471986 +337 337 0 NA -0.196006 +338 338 0 NA -0.392692 +339 339 0 NA -1.25863 +340 340 0 NA -0.285722 +341 341 0 NA -0.821333 +342 342 0 NA 1.04067 +343 343 0 NA -0.386694 +344 344 0 NA -1.7091 +345 345 0 NA 0.567446 +346 346 0 NA 0.0171499 +347 347 0 NA 0.0977746 +348 348 0 NA 0.822231 +349 349 0 NA 0.396381 +350 350 0 NA -1.49853 +351 351 0 NA -0.02996 +352 352 0 NA -0.652866 +353 353 0 NA -0.121709 +354 354 0 NA 1.03003 +355 355 0 NA -0.166901 +356 356 0 NA 0.837773 +357 357 0 NA -0.388723 +358 358 0 NA 0.144514 +359 359 0 NA 1.60732 +360 360 0 NA 0.0795044 +361 361 0 NA 2.14972 +362 362 0 NA -0.304271 +363 363 0 NA -0.302592 +364 364 0 NA -0.439785 +365 365 0 NA 0.450396 +366 366 0 NA -0.847571 +367 367 0 NA 0.494386 +368 368 0 NA 1.78773 +369 369 0 NA 1.49287 +370 370 0 NA 1.00282 +371 371 0 NA -1.57948 +372 372 0 NA -1.41121 +373 373 0 NA -0.328791 +374 374 0 NA 0.633526 +375 375 0 NA 1.58844 +376 376 0 NA 0.23944 +377 377 0 NA 0.373054 +378 378 0 NA -0.231256 +379 379 0 NA 0.0411482 +380 380 0 NA 1.31482 +381 381 0 NA 0.415339 +382 382 0 NA -2.11904 +383 383 0 NA -0.73574 +384 384 0 NA -0.545852 +385 385 0 NA -1.26001 +386 386 0 NA 0.542966 +387 387 0 NA -0.248866 +388 388 0 NA 1.39359 +389 389 0 NA 0.765535 +390 390 0 NA 1.57434 +391 391 0 NA 0.283378 +392 392 0 NA -0.282155 +393 393 0 NA 0.326779 +394 394 0 NA -0.893343 +395 395 0 NA -0.306112 +396 396 0 NA -1.63278 +397 397 0 NA 0.983996 +398 398 0 NA -2.10943 +399 399 0 NA -0.0300423 +400 400 0 NA 0.267752 +401 401 0 NA 0.0244411 +402 402 0 NA -0.551821 +403 403 0 NA -0.0125597 +404 404 0 NA 0.78199 +405 405 0 NA 0.13319 +406 406 0 NA 0.484897 +407 407 0 NA 0.664244 +408 408 0 NA -0.803087 +409 409 0 NA -0.189584 +410 410 0 NA -0.803493 +411 411 0 NA 0.0918757 +412 412 0 NA 0.0292488 +413 413 0 NA -0.0153363 +414 414 0 NA 1.12808 +415 415 0 NA -0.206516 +416 416 0 NA -0.0512615 +417 417 0 NA -1.34343 +418 418 0 NA -0.185184 +419 419 0 NA -0.248441 +420 420 0 NA -0.069676 +421 421 0 NA 0.376647 +422 422 0 NA -0.256961 +423 423 0 NA 0.723303 +424 424 0 NA 1.11035 +425 425 0 NA -0.119456 +426 426 0 NA -0.639605 +427 427 0 NA 0.564345 +428 428 0 NA -0.344095 +429 429 0 NA -2.22653 +430 430 0 NA -0.956033 +431 431 0 NA -0.819189 +432 432 0 NA -2.44945 +433 433 0 NA -0.0670052 +434 434 0 NA -1.02125 +435 435 0 NA 1.56421 +436 436 0 NA -0.768685 +437 437 0 NA 0.901317 +438 438 0 NA 0.326158 +439 439 0 NA -0.139662 +440 440 0 NA 0.717582 +441 441 0 NA -1.29883 +442 442 0 NA -0.638025 +443 443 0 NA 1.3778 +444 444 0 NA 1.65038 +445 445 0 NA 0.586743 +446 446 0 NA -0.00589607 +447 447 0 NA 0.13319 +448 448 0 NA -1.26964 +449 449 0 NA -0.125181 +450 450 0 NA -1.24454 +451 451 0 NA -0.0661009 +452 452 0 NA 2.57404 +453 453 0 NA 0.928964 +454 454 0 NA 0.51064 +455 455 0 NA -1.32195 +456 456 0 NA 1.30567 +457 457 0 NA -0.742979 +458 458 0 NA -0.593598 +459 459 0 NA -1.24448 +460 460 0 NA -0.110278 +461 461 0 NA 0.159683 +462 462 0 NA 0.100157 +463 463 0 NA -1.6713 +464 464 0 NA 1.12242 +465 465 0 NA -0.88487 +466 466 0 NA -0.433884 +467 467 0 NA 0.233091 +468 468 0 NA -0.0685021 +469 469 0 NA -0.430799 +470 470 0 NA 0.680125 +471 471 0 NA 0.706294 +472 472 0 NA -1.01252 +473 473 0 NA 1.14022 +474 474 0 NA -0.0951276 +475 475 0 NA 1.20431 +476 476 0 NA -1.31014 +477 477 0 NA -1.01024 +478 478 0 NA 0.86817 +479 479 0 NA -1.13996 +480 480 0 NA 0.220533 +481 481 0 NA -0.585963 +482 482 0 NA 0.936588 +483 483 0 NA -1.58959 +484 484 0 NA 0.114516 +485 485 0 NA 0.275659 +486 486 0 NA 1.82381 +487 487 0 NA 0.919563 +488 488 0 NA 1.19923 +489 489 0 NA -0.287172 +490 490 0 NA -0.125564 +491 491 0 NA 0.76606 +492 492 0 NA 0.0485017 +493 493 0 NA 0.91911 +494 494 0 NA -0.0784911 +495 495 0 NA -1.60227 +496 496 0 NA -2.01618 +497 497 0 NA 1.34361 +498 498 0 NA -1.81712 +499 499 0 NA -0.463177 +500 500 0 NA -0.94339 diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist new file mode 100644 index 0000000..b76e4a5 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist @@ -0,0 +1,3 @@ +SET1 1 1 mog_0,mog_1,mog_2,mog_3,mog_4,mog_5,mog_6,mog_7,mog_8,mog_9,mog_10,mog_11,mog_12,mog_13,mog_14,mog_15,mog_16,mog_17,mog_18,mog_19,mog_20,mog_21,mog_22,mog_23,mog_24,mog_25,mog_26,mog_27,mog_28,mog_29,mog_30,mog_31,mog_32,mog_33,mog_34,mog_35,mog_36,mog_37,mog_38,mog_39 +SET2 3 500 null_20,null_21,null_22,null_23,null_24,null_25,null_26,null_27,null_28,null_29,null_30,null_31,null_32,null_33,null_34,null_35,null_36,null_37,null_38,null_39,null_40,null_41,null_42,null_43,null_44,null_45,null_46,null_47,null_48,null_49,rsidNull1 +SET4 3 23 rsidNull2,rsidNull3 diff --git a/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt b/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt new file mode 100644 index 0000000..931919b --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt @@ -0,0 +1,501 @@ +FID IID Y1 Y2 +1 1 1.64818554321186 2.2765234736685 +2 2 -2.67352013711554 -1.53680421614647 +3 3 0.217542851471485 0.437289912695016 +4 4 -1.0682692958554 -0.172344146164226 +5 5 -0.132812553179586 -0.156011181306344 +6 6 0.540099244934828 0.58172506850607 +7 7 0.200655325192179 -0.0628377394374 +8 8 -0.0459854613468314 0.265509522791825 +9 9 1.3307615630166 1.71743500320666 +10 10 0.912180962372195 0.187551558913078 +11 11 -0.534547354840137 0.127496169914245 +12 12 0.27896641757041 -1.42731255991967 +13 13 -1.53970463226097 -0.532864539532899 +14 14 -0.90082624741872 -1.56632086145511 +15 15 -0.820750086136125 -1.90758965913578 +16 16 -0.505187618648548 -0.18312079881002 +17 17 -0.89722597069202 -0.217412756332358 +18 18 -0.530246039837079 -0.514277172286367 +19 19 -1.11005552246422 -0.362149833733552 +20 20 0.135219961957339 1.10246617780573 +21 21 0.674908877044016 0.657896901326819 +22 22 -0.871416975041294 -0.114765123686352 +23 23 -1.15266855203515 -2.56052285573202 +24 24 -1.33078180898898 0.901847508702005 +25 25 -0.33689786864605 0.564196915751343 +26 26 1.28793604289375 -0.460800742311677 +27 27 -1.89614375166477 -2.16796161162642 +28 28 0.932225717344624 -0.993295429461682 +29 29 -1.43304637355045 -1.17580626345375 +30 30 -0.79692352468168 -0.0936092127952809 +31 31 -0.818843785975256 -0.53253698628974 +32 32 1.2087128520519 1.03501254726163 +33 33 0.633931435132684 0.44615886486519 +34 34 0.576237437022807 1.0904346633205 +35 35 2.42290456969191 1.43948290383436 +36 36 0.23103458500135 -0.0587673810762215 +37 37 -0.0251633689616453 -1.57102910327571 +38 38 -1.49850486580673 -2.05632349978027 +39 39 0.316565138599832 0.325314072043067 +40 40 -1.52502765452174 -0.213827394178769 +41 41 0.740940592283646 1.09893022241462 +42 42 1.78712212335387 1.19127592854588 +43 43 1.58192040703461 1.20206719830346 +44 44 -0.509715644341248 -1.14873512768313 +45 45 -0.830082090282309 0.228605478322461 +46 46 -0.0491164852343067 -0.137775954204466 +47 47 1.94157887063373 0.847918312742163 +48 48 1.20359097976829 -0.399549607806882 +49 49 -1.23913127708202 0.0150388307226249 +50 50 -0.966968307164566 -0.737477146954062 +51 51 -0.820430264709707 -1.6636201222228 +52 52 -2.40812671796387 -1.20651243686562 +53 53 -1.57969403761047 -0.0257757200489035 +54 54 -1.13320388228761 -0.751544439673961 +55 55 0.893631925732109 1.13746868718638 +56 56 1.20360529801521 2.79242866277356 +57 57 -0.0843877814729617 -1.28592741018806 +58 58 0.339837217622896 -0.541310610515075 +59 59 -0.385458384395854 -0.934702284494623 +60 60 0.468594330006473 -0.73016882826337 +61 61 -1.02043354926932 -1.60187469930237 +62 62 0.243972076651283 -0.563633473100453 +63 63 1.49199775918827 1.52568787191561 +64 64 1.13206847302443 1.3101469387406 +65 65 -0.716368601292129 -0.135512918841699 +66 66 -0.169108730249288 1.09575193085288 +67 67 1.15790001716763 1.1640397855604 +68 68 -0.688576811210818 -1.76869188869093 +69 69 0.14456018958467 -0.15378734253803 +70 70 1.64206973022781 1.18242742349138 +71 71 -1.08724554035947 -0.561082534301814 +72 72 -1.41116766250683 -0.255074407110056 +73 73 0.182430548153859 0.653581598797204 +74 74 -1.25394949287272 -0.508093610110444 +75 75 -1.53359611068566 -1.12886141633028 +76 76 -1.53800060087613 -1.27444991752437 +77 77 0.825952408418855 -0.279010226303386 +78 78 0.142438147648119 1.51511335052744 +79 79 -0.924303826504151 -0.729459474153155 +80 80 -1.40601321953547 0.593044606426811 +81 81 -0.801830843986271 0.338893590157569 +82 82 1.10825917004715 0.439870409850444 +83 83 0.24592028029576 -0.164772212550257 +84 84 1.79606838091344 1.3039822304618 +85 85 -1.22260977344593 -0.790503121154428 +86 86 -0.700220780811092 0.0328995754123342 +87 87 -0.578998772557048 0.392475781422545 +88 88 -1.69720729321778 -1.5698428789583 +89 89 1.16340862426281 0.792014175554376 +90 90 0.206954556715569 0.415456904166939 +91 91 1.70489999393387 2.09775597676056 +92 92 -1.33104685763959 -1.05475280759534 +93 93 0.645203760475826 0.926294471929944 +94 94 0.1423053293667 -0.216502503763709 +95 95 1.10221712348662 -0.32080884129509 +96 96 0.543348907607857 0.269892488144619 +97 97 1.04941909388814 0.982666978739268 +98 98 -0.258309955845433 0.183650733005576 +99 99 -0.492073649275113 0.0761496561256492 +100 100 0.338403199323624 -0.374239866716357 +101 101 -0.895668365919068 0.11336451596702 +102 102 0.437699897857805 -0.91352569239983 +103 103 0.456605590549223 -0.313164454606283 +104 104 1.40282753554395 0.610811431835396 +105 105 0.0495822014705532 -0.507000617846699 +106 106 1.2587777556985 1.66055013290369 +107 107 -1.40353930047844 -1.32895934946041 +108 108 -1.34550374507602 -1.57417300223271 +109 109 1.22996245176712 0.814167653438195 +110 110 0.311564106800903 -0.111390972866106 +111 111 -0.0587559633492112 -0.0121323250182511 +112 112 -0.436492819499775 0.162428164511859 +113 113 0.0791694982161289 -0.401198944858844 +114 114 1.10356302409986 0.969569111102586 +115 115 1.31474898137036 2.0940945724578 +116 116 -0.843413208640851 -0.0848682739314613 +117 117 0.202497366256568 0.0187349827693815 +118 118 -0.599625493377744 0.906427507141332 +119 119 1.8179555041733 1.3369461892012 +120 120 -0.854885536015852 -0.785095990071871 +121 121 -0.415877865867224 -0.166438439147711 +122 122 0.742162696858347 -1.28954626748198 +123 123 -0.972779674771823 -1.03927262494365 +124 124 1.46293183400694 -0.114484977863908 +125 125 1.00822090954253 0.681871812073643 +126 126 -1.34645832044921 -0.730195246217766 +127 127 -0.591561999406591 -2.12951882663727 +128 128 -0.934510817986235 -1.75494841647204 +129 129 -0.28369951969648 0.17692265891176 +130 130 -1.17614531868063 -0.12403839659914 +131 131 1.65461590969623 2.70192093415576 +132 132 -0.745615276587652 -0.417865474273032 +133 133 0.0738259684462418 1.21278114494829 +134 134 -0.96815375987633 -0.753301992358909 +135 135 -0.939813096800652 -0.0216214318733658 +136 136 -0.879803232355895 -0.0744910663374311 +137 137 0.743172411526409 0.21433313608583 +138 138 2.08195119549803 1.93621885516642 +139 139 0.927100100117178 1.5554541907711 +140 140 0.214045612674062 0.346353741568354 +141 141 -0.949431236638889 -0.305817193168958 +142 142 1.2666979721919 0.787777955161434 +143 143 1.01376904051764 1.12648365697115 +144 144 0.142555917554621 0.707233765426958 +145 145 1.62179916747734 0.885638229075908 +146 146 -1.00645219747244 -0.995434127819415 +147 147 -0.394602826813623 0.473657962928038 +148 148 -0.73982150411597 0.273299958780123 +149 149 -0.365184995360586 -0.452611626430038 +150 150 0.691097586326135 0.766691213629834 +151 151 -0.301611701858653 -1.33319111438154 +152 152 0.531222597236094 -1.60038997213879 +153 153 1.63012914542121 -0.100063647106269 +154 154 -1.34924073424189 -1.53664514984632 +155 155 0.177577385290678 1.78028934270584 +156 156 1.8760154081232 2.52387197823727 +157 157 -0.16113138252359 0.554611083217085 +158 158 0.622139846203371 -0.291011158963719 +159 159 0.188666359888691 0.257710421689275 +160 160 -0.836071049877044 -0.509251680504923 +161 161 -0.9363957038285 -0.786864007114868 +162 162 0.576850550394612 1.16180237778149 +163 163 1.53563335135132 2.39295406664206 +164 164 0.480251240792056 0.593367377417818 +165 165 0.816802232052774 1.22809833905884 +166 166 0.128093838306365 -0.696009541973336 +167 167 0.692166473072011 0.47598401037244 +168 168 -0.15467430169029 0.887623422309889 +169 169 1.85530898859882 1.34874265859183 +170 170 1.09585407339195 0.853399050828037 +171 171 1.08620951547742 0.222309525046723 +172 172 0.651399299000373 0.204610710960643 +173 173 -0.77205986349291 -1.38438918818234 +174 174 -0.44510199324887 -0.390092864365805 +175 175 0.924297817311385 0.15026757119897 +176 176 -0.185300859903109 -1.47662328084495 +177 177 -0.206992886353605 0.859401094995375 +178 178 -0.547073733586552 -2.31806176595107 +179 179 -1.04319780488037 -0.839081179843443 +180 180 -1.11295843904746 0.687100547210174 +181 181 1.57596863039491 0.655163984249925 +182 182 0.72747085312975 2.74321505256345 +183 183 -0.640180564559575 1.26100797049328 +184 184 0.942240481238108 0.688383995282273 +185 185 0.181892828507572 0.373068219547715 +186 186 0.358693183830045 -0.190608438843274 +187 187 -0.000910571279300776 -0.680961607498789 +188 188 0.919849570661649 1.00572232849211 +189 189 1.01006236214779 -0.190675450107784 +190 190 0.316481287087008 0.281269720213603 +191 191 -0.918286729336156 -0.477703257990269 +192 192 0.183452280040454 -0.0344651227327666 +193 193 2.12717634373411 0.997577554465131 +194 194 1.47020736764189 1.12795785888551 +195 195 -0.971309615501744 -1.18014880718682 +196 196 -0.157281269372447 -0.481653661616169 +197 197 0.646807492342463 0.979218813509775 +198 198 -0.578656676271822 -0.139221375128339 +199 199 0.229313404231838 -0.692324141138655 +200 200 1.20229702102537 1.10892733679558 +201 201 0.133632622403511 0.583256246184469 +202 202 -1.03246454473759 -1.451471999586 +203 203 -0.330370224331379 -0.425464803042189 +204 204 -1.75790734014916 -0.586614309361142 +205 205 -0.0371919747840802 -1.50684309284697 +206 206 1.26551340744515 1.47525772630116 +207 207 -0.0115076783573195 0.993713242482709 +208 208 -0.209351023351956 -0.0948866052629332 +209 209 0.948254398587786 0.148035769503489 +210 210 -0.645842405513505 -0.571836365758735 +211 211 -0.341295789839788 0.713244941767623 +212 212 0.662118020652933 -1.22995421423467 +213 213 -1.05857786323882 0.0897524096764291 +214 214 -0.778042671629221 -0.278468921484683 +215 215 1.22107687285223 1.21869820953845 +216 216 -1.21476298713056 -0.758578615621622 +217 217 1.30022895329161 1.36168696120916 +218 218 1.29409391113734 0.705917131098944 +219 219 -1.00259273604201 -1.07113678345588 +220 220 0.82759989331864 0.536929026455464 +221 221 -0.997619692500241 -1.73114849603647 +222 222 0.932630130413901 0.78082733464099 +223 223 -0.0568079370743356 0.306833710833381 +224 224 1.07078853863247 0.235644832856485 +225 225 -0.878845195403184 -0.262793896775195 +226 226 0.173927378306735 -0.388407346972015 +227 227 0.152001500987953 1.91286468229403 +228 228 -0.118029235005445 -1.10432942001368 +229 229 0.668677093920131 0.0682515661339391 +230 230 -0.986068075843878 -1.7924446101623 +231 231 -0.638189951124171 -0.52191017460648 +232 232 0.197008131055164 0.616574004663493 +233 233 0.0641541307571732 -0.633902784236753 +234 234 1.44314263446451 1.15961150166424 +235 235 -2.14144160123174 -2.2518725440883 +236 236 0.164937563582549 0.789070903671559 +237 237 -0.211441573032738 -1.37962886952607 +238 238 0.122209498375711 1.06401605887066 +239 239 0.404152731207434 0.360589609073474 +240 240 -0.661421846239432 0.172077306941891 +241 241 0.350246959829443 -1.60470497742995 +242 242 -0.102366085106328 -0.0709881642276646 +243 243 0.241955743295996 0.576852382824044 +244 244 -0.40473713391172 -1.07997472892628 +245 245 -0.572093717322186 0.100529726362697 +246 246 -1.0107055115864 -0.547988289844201 +247 247 1.45918006019184 0.660871721892713 +248 248 0.0290306485101474 -0.814784839126176 +249 249 -0.311786315045172 0.167922092543147 +250 250 0.159157749619645 -0.0782928496695848 +251 251 0.298597154717647 0.436117416649192 +252 252 0.727937895616386 0.00668361955307917 +253 253 0.255383276328498 0.503481625578282 +254 254 -1.14073218073273 -0.368151547937105 +255 255 0.62186689571353 0.6197590990651 +256 256 1.60754780729681 -0.230602646961016 +257 257 1.36612892184012 0.509177236220553 +258 258 -0.17835978703554 -1.22084401906767 +259 259 0.734318792628253 0.94835378968232 +260 260 -0.554150763377311 -2.83632688909111 +261 261 -1.34807262732901 -2.13520534222759 +262 262 -1.30602233938388 -1.36331046931889 +263 263 0.157552245303531 -0.945871858236152 +264 264 -0.378485119558589 -0.24846719242668 +265 265 -1.29759462322226 -1.28542417440431 +266 266 -0.112162859740148 -1.42400346960075 +267 267 0.0319028692133309 -0.143128209114543 +268 268 0.0329971668044517 -0.788254983707128 +269 269 -2.15328238033762 -0.602605195669155 +270 270 -0.268561460565615 0.255528693190225 +271 271 -0.37700865407203 0.123795636414963 +272 272 -0.647681343010691 -0.0873696471965655 +273 273 0.48085051264185 1.27886089783222 +274 274 -0.0863718720740099 -0.189965371237141 +275 275 -0.577723909217335 -0.459218791691393 +276 276 -0.0642922550342538 0.261575763198014 +277 277 0.283276349600993 -0.449390933664188 +278 278 -0.719999871944151 -1.21245981759747 +279 279 0.398917842857218 -0.687190068446156 +280 280 -0.585983681331922 -0.955004739381687 +281 281 0.632640074811404 1.1319661207624 +282 282 -0.332296300590307 -0.481474852783556 +283 283 1.24105669045869 1.39772599908205 +284 284 0.60411314341004 1.45030139833737 +285 285 -0.262533617238517 -1.29592042189868 +286 286 1.0782966724744 0.224757351161194 +287 287 0.375642795853784 0.865080603311589 +288 288 -0.635451819284519 -0.584950334594471 +289 289 -0.0794197303450192 -0.544824440342012 +290 290 -0.391647046085526 1.05466407410057 +291 291 0.746920858892639 0.141390319582209 +292 292 0.174757162932909 0.0431735424655879 +293 293 -1.88125948300107 -1.74328408616805 +294 294 -0.792933999764447 -0.859898846612656 +295 295 -1.97522103278445 -2.14003373808461 +296 296 0.947755627232544 -0.863782160598166 +297 297 1.43280466086758 0.971878727763115 +298 298 0.864435589061877 -0.0944046128667593 +299 299 -0.00918736103969609 -0.42457248714019 +300 300 -0.291134070040785 0.156895831614518 +301 301 -1.01793787032963 -1.13451805794859 +302 302 -2.41767296199479 -2.51027080485175 +303 303 0.90975365148871 -0.295416703422529 +304 304 0.00472194091889469 0.684227815501152 +305 305 0.757484536788318 -0.252724822707596 +306 306 2.68342594840941 3.22129555834226 +307 307 -1.47397795674507 0.0655794205012332 +308 308 -0.615122248015615 -0.747272395276123 +309 309 -0.763134711595199 0.479560083833197 +310 310 -0.282135287850453 -0.0734428079165186 +311 311 -0.523049782720623 -0.540763850960254 +312 312 0.310621119271665 -0.728862242403757 +313 313 0.133048454536538 1.50713613471873 +314 314 -0.653706464545025 -0.798806385558514 +315 315 -0.114236294075412 0.0546801088322116 +316 316 0.292020057364464 -0.631135873978695 +317 317 1.18938474823704 -0.39028550769223 +318 318 -0.0312650731831535 0.584947591213862 +319 319 0.00887339861556713 0.314512559170236 +320 320 -0.380929811867056 -1.70738447701585 +321 321 -0.52058291401555 -0.260867706649619 +322 322 -2.16053908474117 -1.28838966290168 +323 323 0.726713067234621 2.24691954684607 +324 324 -0.606561923596174 -0.0914334086129591 +325 325 0.544013014174095 -0.865107331509786 +326 326 0.955045058453847 0.203630981513071 +327 327 0.560592666217991 0.484825432668592 +328 328 -0.327752444014553 -0.842104917773965 +329 329 -1.59123845281852 -1.12021839176868 +330 330 -2.07483814869395 -1.79470709475569 +331 331 1.05244467218929 0.182000352523624 +332 332 -0.664191903404875 -0.186883124790877 +333 333 1.21008686273248 0.219592839108128 +334 334 0.413022019819573 -0.268098837611482 +335 335 0.0422280336978795 -0.179623002537761 +336 336 0.477120730310813 -0.446762180563648 +337 337 -0.568223885079031 -1.51167377356618 +338 338 0.519928383814578 -0.0391126750678009 +339 339 -2.00309717324039 -1.08186232237306 +340 340 -0.433534755849648 1.17327729178832 +341 341 -0.00378810769496557 1.23024602577198 +342 342 2.31053344424751 1.59313832899737 +343 343 1.80889515476201 0.0998280113430569 +344 344 -0.271006937008757 1.26456200258843 +345 345 -1.13765326547872 -1.9266689414778 +346 346 0.966578134757589 1.89681338904382 +347 347 0.0266319999198697 0.12947094522922 +348 348 -0.64417803887998 -1.21725478837165 +349 349 -0.848704931186809 -1.0790489589685 +350 350 -0.789348470705069 -0.56855290765307 +351 351 0.0568787682696287 0.778941309946098 +352 352 -0.404167121170396 0.261426782843497 +353 353 0.599169489486594 -0.251353186284818 +354 354 -1.64392413329453 -1.41435768483274 +355 355 -1.61030044520426 -1.9082486009141 +356 356 -1.41648068460129 -1.20293527150969 +357 357 -1.98524086037857 -1.36431496381439 +358 358 -1.16234995642306 -1.50505401496676 +359 359 0.906014336241588 0.883254683920683 +360 360 -0.120663318433096 -1.06230400849685 +361 361 -0.404735456099786 -0.0827256299965876 +362 362 2.28415232253025 2.43185831726563 +363 363 -0.277750113149245 -1.09564243491786 +364 364 -1.43759960759041 -1.91927954999413 +365 365 0.517492255903491 0.163452435167785 +366 366 0.0409231818719817 0.82466451440847 +367 367 0.607080685056537 -0.0116689613015914 +368 368 0.346303068348099 0.963784166003815 +369 369 0.799888006661189 1.15922046221216 +370 370 -0.200658067955632 -0.777948063573182 +371 371 -0.838552588394187 0.436409291416985 +372 372 1.23010938197522 0.633037531507123 +373 373 0.451186523228701 1.30706174499908 +374 374 -0.270558948178047 1.07548009305743 +375 375 -1.11030125107289 -0.613917996247648 +376 376 0.99867624624863 0.43248481571298 +377 377 -0.944635733669833 -2.57000960039567 +378 378 -0.345150360564216 -0.262612324483112 +379 379 0.231225309396651 -0.148069994302184 +380 380 1.19488394763505 0.407445818725747 +381 381 0.421237213096837 1.29168791564525 +382 382 -1.17224093491159 -1.65030352659117 +383 383 -0.150362722343577 0.664688399394185 +384 384 -0.911942086647952 -1.29935956493263 +385 385 -0.550435701050605 0.00996277569490833 +386 386 -0.503452926922047 -0.977572202467078 +387 387 -0.840437479519366 -1.24690421568669 +388 388 2.72565962844896 2.16469111759104 +389 389 -0.342084855015524 -0.891313460113479 +390 390 -0.0981646867577042 1.66825888406037 +391 391 -0.300238776909948 -0.0323886291964357 +392 392 -0.445814191574771 -0.451543558138376 +393 393 -2.35159528945653 -2.09382102637383 +394 394 0.771347458438544 0.632248517764153 +395 395 1.51073283708396 -0.332959071293271 +396 396 0.0966520620608959 0.435762577755818 +397 397 -0.318708566172272 0.0792983338274879 +398 398 -0.205588999330254 -0.899203470644444 +399 399 1.02270253018406 2.52010320454192 +400 400 0.176860283634206 0.99581811996131 +401 401 1.41839609903773 0.471544708439966 +402 402 1.55159790192982 -0.173816204502474 +403 403 1.93445877775084 1.56420930381227 +404 404 1.36456851123372 -0.286294743401895 +405 405 -0.6945847993009 0.147099044069608 +406 406 1.56216890070534 0.251227211152395 +407 407 1.36800089619423 1.81218092067337 +408 408 -0.263676614327316 -0.111685103193269 +409 409 0.0179108059498879 -0.919265891275284 +410 410 -0.307261985899011 -2.23149808636095 +411 411 -0.163969947581505 -0.236523608175905 +412 412 -0.120449337781418 0.896576482064549 +413 413 0.0739026611409629 1.06472909089829 +414 414 1.10867285753491 0.785042317541263 +415 415 1.46298257470589 1.41564218144868 +416 416 1.16431140493005 0.670593830253462 +417 417 1.17529765650528 0.817968052859188 +418 418 -0.814854327992495 -0.418607403904381 +419 419 2.47723943340456 2.49031917643836 +420 420 -0.0244212103557031 0.312995467662414 +421 421 0.806638213205707 0.356370937482444 +422 422 -1.62405579119699 -0.537954266398098 +423 423 0.957904112604383 0.291943665966988 +424 424 -0.812805871869217 -1.1582721319521 +425 425 -0.996674982917241 -0.655419374338246 +426 426 0.113649695666726 -0.366980808329557 +427 427 0.894610854068111 1.1136191426835 +428 428 1.20288685709081 0.638884320637003 +429 429 -1.13683741901365 -0.36027044117294 +430 430 -0.129060905564338 -0.180888444348373 +431 431 0.425381045801254 -0.295400589763373 +432 432 1.89515871261082 1.49062217238053 +433 433 0.233818384451627 -0.972204780435252 +434 434 -0.28595441088866 -1.35168392568458 +435 435 0.2703210749173 -0.444959487771617 +436 436 -1.56414434282183 -0.0863816258062674 +437 437 2.04419819063683 1.91366743170003 +438 438 0.84728785689777 1.34007526149256 +439 439 -0.476344798814009 -0.415780404846241 +440 440 0.00590700828159529 0.0815516311831695 +441 441 0.083078642301709 1.23675983324076 +442 442 -1.6028594029328 -1.60925772902573 +443 443 0.681131471138643 2.20895277775767 +444 444 -0.234861802575625 0.0901511911648287 +445 445 0.424684341700282 0.434940188281203 +446 446 -0.835902000254762 0.0397065459202534 +447 447 1.11036363363419 0.216098787738172 +448 448 -1.12099310415726 -1.07651593723548 +449 449 1.6340049762297 2.04681289330294 +450 450 0.998408676587167 1.00481750170249 +451 451 0.413689828973942 -0.514524722457101 +452 452 -1.44558897330313 0.129757035586368 +453 453 1.20796668073352 0.567121006271089 +454 454 -1.29743961756537 -0.375012816916177 +455 455 -0.565344622118762 -0.731344444270503 +456 456 -0.0856730764892192 -0.366819526081972 +457 457 0.428172094069993 0.0273966031800197 +458 458 0.186470987165479 0.760848872452122 +459 459 0.259371700050186 -0.501625551500019 +460 460 -1.64360010971628 -1.5828290417955 +461 461 0.734163267878191 0.642535470348961 +462 462 1.03827780061464 1.72965834140257 +463 463 -0.548596685640441 -0.318234975328041 +464 464 0.593701471751184 0.493491384986627 +465 465 -0.845456340462967 0.0420851950366854 +466 466 0.218498725360759 0.246976588078252 +467 467 -1.42799921095182 -1.377473806456 +468 468 -0.690670805163897 1.14500512746399 +469 469 -1.37016414798422 0.471825842492376 +470 470 -2.16041725986498 -1.59664099346357 +471 471 1.33905008715574 0.432270114438061 +472 472 0.163608946537458 -0.690435257310719 +473 473 0.935034634622461 1.52887578295159 +474 474 -0.395808329051314 -0.115243233858534 +475 475 2.04696381576314 2.05384325934844 +476 476 -0.907980731362225 -1.18512743230553 +477 477 0.503297960174636 0.0187769439792987 +478 478 -1.48550762425544 -1.47956369843223 +479 479 0.0666068333457948 1.35033923857239 +480 480 0.920664330425592 0.888008561134299 +481 481 -1.69266858919314 -0.204902976272 +482 482 0.427795287676371 -0.396576743545858 +483 483 -1.64292333261635 -1.13354208818298 +484 484 -0.701072352663313 -0.597049529192512 +485 485 0.112547088195915 1.06099877308249 +486 486 -0.74472232004593 -0.377658612540862 +487 487 1.12383483725755 0.560401527099076 +488 488 -1.42854840668183 -0.243672850363049 +489 489 0.607078625074716 1.18692220136358 +490 490 -0.274271192221796 0.848095718841269 +491 491 1.32274201252664 0.38412405018288 +492 492 -0.0233621288703684 0.272238343116884 +493 493 1.89704044055135 1.07767259562204 +494 494 -0.541441306194392 0.0771998886816035 +495 495 0.833091178133436 -0.708760130304379 +496 496 0.44386192196959 -1.12413404785683 +497 497 0.926963710431585 0.875564184000742 +498 498 -0.671209470055134 0.0950948055928938 +499 499 0.236038898960188 -0.865160384289287 +500 500 -1.30064654680219 0.0686997377448884 diff --git a/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt:Zone.Identifier b/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt:Zone.Identifier new file mode 100644 index 0000000..1bf0b28 --- /dev/null +++ b/tests/input/pipeline/gene_based_tests_regenie/phenotype.txt:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://github.com/ diff --git a/tests/main.nf.test b/tests/main.nf.test index 20e8d9f..ca97d59 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -3,6 +3,40 @@ nextflow_pipeline { name "Test Workflow main.nf" script "main.nf" + test("Should execute gene-based test pipeline with bgen files") { + + when { + + params { + project = 'test-gene-based-test' + association_build = 'hg19' + regenie_skip_predictions = true + genotypes_association = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen" + regenie_sample_file = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample" + genotypes_association_format = 'bgen' + phenotypes_filename = "$projectDir/tests/input/pipeline/phenotype_bin.txt" + phenotypes_binary_trait = true + phenotypes_columns = 'Y1,Y2' + regenie_run_gene_based_tests = true + regenie_gene_anno = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations" + regenie_gene_setlist = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist" + regenie_gene_masks = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks" + regenie_gene_test = 'skat' + regenie_gene_aaf = 0.01 + regenie_gene_vc_max_aaf = 100 + regenie_gene_vc_mac_thr = 10 + regenie_gene_build_mask = 'max' + regenie_write_bed_masks = true + rsids_filename = "$projectDir/tests/input/pipeline/rsids.tsv.gz" + } + } + + then { + assert workflow.success + } + + } + test("Should execute gene-based test pipeline with specified parameters with sum") { @@ -12,8 +46,8 @@ nextflow_pipeline { project = 'test-gene-based-test' genotypes_build = 'hg19' genotypes_prediction = "$projectDir/tests/input/pipeline/example.{bim,bed,fam}" - genotypes_association = "$projectDir/tests/input/pipeline/example.{bim,bed,fam}" - genotypes_association_format = 'bed' + genotypes_association = "$projectDir/tests/input/pipeline/example.vcf.gz" + genotypes_association_format = 'vcf' phenotypes_filename = "$projectDir/tests/input/pipeline/phenotype_bin.txt" phenotypes_binary_trait = true phenotypes_columns = 'Y1,Y2' @@ -48,8 +82,8 @@ test("Should execute gene-based test pipeline") { project = 'test-gene-based-test' genotypes_build = 'hg19' genotypes_prediction = "$projectDir/tests/input/pipeline/example.{bim,bed,fam}" - genotypes_association = "$projectDir/tests/input/pipeline/example.{bim,bed,fam}" - genotypes_association_format = 'bed' + genotypes_association = "$projectDir/tests/input/pipeline/example.vcf.gz" + genotypes_association_format = 'vcf' phenotypes_filename = "$projectDir/tests/input/pipeline/phenotype_bin.txt" phenotypes_binary_trait = true phenotypes_columns = 'Y1,Y2' diff --git a/tests/modules/local/regenie_step2_gene_tests.nf.test b/tests/modules/local/regenie_step2_gene_tests.nf.test new file mode 100644 index 0000000..bbed71a --- /dev/null +++ b/tests/modules/local/regenie_step2_gene_tests.nf.test @@ -0,0 +1,62 @@ +nextflow_process { + + name "Test Process REGENIE_STEP2_GENE_BASED_TESTS" + script "modules/local/regenie/regenie_step2_run_gene_tests.nf" + process "REGENIE_STEP2_RUN_GENE_TESTS" + + test("Should execute regenie step2 without predictions") { + + when { + params { + //set required phenotypes_column + phenotypes_columns = 'Y1,Y2' + regenie_test = 'additive' + regenie_skip_predictions = true + outdir = "$outputDir" + regenie_gene_test = 'skat' + regenie_gene_aaf = 0.01 + regenie_gene_vc_max_aaf = 100 + regenie_gene_vc_mac_thr = 10 + regenie_gene_build_mask = 'max' + regenie_write_bed_masks = true + } + process { + """ + input[0] = Channel.fromPath("$projectDir/tests/input/regenie_step2/regenie_step1_out*") + input[1] = Channel.fromPath("$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.bgen") + .map { tuple(it.baseName, it, file('dummy_a'), file('dummy_b'), -1) } + input[2] = 'bgen' + input[3] = file("$projectDir/tests/input/pipeline/phenotype.txt") + input[4] = [] + input[5] = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.sample" + input[6] = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.annotations" + input[7] = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.setlist" + input[8] = "$projectDir/tests/input/pipeline/gene_based_tests_regenie/example_3chr.masks" + input[9] = [] + + """ + } + } + + then { + assert process.success + //check amount of processes + assert process.trace.tasks().size() == 1 + + with(process.out) { + + + with(regenie_step2_out.get(0)){ + + // access second element of first tuple + def lines = path(get(1)[0]).readLinesGzip() + //check amount of lines + assert lines.size() == 10 + } + + } + } + + } + +} diff --git a/tests/modules/local/regenie_step2_gene_tests.nf.test.snap b/tests/modules/local/regenie_step2_gene_tests.nf.test.snap new file mode 100644 index 0000000..46cde72 --- /dev/null +++ b/tests/modules/local/regenie_step2_gene_tests.nf.test.snap @@ -0,0 +1,14 @@ +{ + "Should execute regenie step2 without predictions": { + "content": [ + [ + "example_3chr", + [ + "example_3chr_Y1.regenie.gz:md5,1175e6eaac296ef126cfc56004dcfa04", + "example_3chr_Y2.regenie.gz:md5,934ee2a4df77ea864c24289146c9795f" + ] + ] + ], + "timestamp": "2023-12-15T11:14:20.549264" + } +} \ No newline at end of file diff --git a/workflows/gene_based_tests.nf b/workflows/gene_based_tests.nf index 1c3bba3..22bc11e 100644 --- a/workflows/gene_based_tests.nf +++ b/workflows/gene_based_tests.nf @@ -43,8 +43,21 @@ workflow GENE_BASED_TESTS { imputed_plink2_ch = IMPUTED_TO_PLINK2.out.imputed_plink2 } else { - imputed_plink2_ch = Channel.fromFilePairs(genotypes_association, size: 3) - + // imputed_plink2_ch = Channel.fromFilePairs(genotypes_association, size: 3) + /*println "ERR: We do not support plink files anymore!!!" + exit 1 + */ + // NB the chunking here is just needed to support bgen files + imputed_files_ch + .map { tuple(it.baseName, it, [], [], -1) } + .set {imputed_plink2_ch} + + /* CHUNKING ( + imputed_files_ch + ) + imputed_plink2_ch = CHUNKING.out.imputed_plink2_ch + */ + } genotyped_final_ch = Channel.empty() diff --git a/workflows/regenie/regenie_step2_gene_tests.nf b/workflows/regenie/regenie_step2_gene_tests.nf index 62bfa56..44b6d4f 100644 --- a/workflows/regenie/regenie_step2_gene_tests.nf +++ b/workflows/regenie/regenie_step2_gene_tests.nf @@ -15,6 +15,11 @@ workflow REGENIE_STEP2_GENE_TESTS { regenie_anno_file = file(params.regenie_gene_anno, checkIfExists: true) regenie_setlist_file = file(params.regenie_gene_setlist, checkIfExists: true) regenie_masks_file = file(params.regenie_gene_masks, checkIfExists: true) + if (!params.regenie_sample_file) { + sample_file = [] + } else { + sample_file = file(params.regenie_sample_file, checkIfExists: true) + } REGENIE_STEP2_RUN_GENE_TESTS ( regenie_step1_out_ch.collect(), @@ -22,6 +27,7 @@ workflow REGENIE_STEP2_GENE_TESTS { genotypes_association_format, phenotypes_file_validated, covariates_file_validated, + sample_file, regenie_anno_file, regenie_setlist_file, regenie_masks_file,