Unmodifiable Conditional Analysis pipeline
Summary
Unmodifiable pipelines are predefined workflows that cannot be modified by the user. The advantage of running unmodifiable pipelines compared to modifiable pipelines is that you will get results directly to the green library and the User results PheWeb browser. No download requests are needed, because results of unmodifiable pipeline have been verified not to contain any individual-level data. Running the finemapping unmodifiable pipeline is very similar to running finemapping in the modifiable pipelines, with some small restrictions. The unmodifiable finemapping pipeline can be accessed in the sandbox from The pipelines app -> unmodifable workflow -> Unmodifiable Conditional (DF13/14). For more information about the Pipelines tool, check the Pipelines tool documentation.
This pipeline version (from R14) combines in a single wdl the previous two separate wdls for finemapped regions and custom regions alike.
How it Works
The pipeline can run in two modes, chosen automatically from the number of columns in pheno_region_input:
1 column (list of endpoints): the pipeline selects regions automatically based on variant p-values (see Region discovery below).
4 columns (endpoint/region/variant combinations): the pipeline does conditional analysis on the listed regions.
Binary/quant automatic detection
The pipeline now automatically detects whether a phenotype is binary or quantiative and applies the matching regenie parameters accordingly. This means that users can now pass as inputs mixed phenotypes in one place without needing separate inputs and separate runs. Firth correction is applied automatically to variants with p-value below firth_thres (default 0.01) when the endpoint is binary.
Region discovery
Region discovery (1-column input only). For each endpoint, candidate regions are built around the lead variants with p-value below 5e-8 in the summary statistics, using the same region definition as the finemapping pipeline (window set by finemap_regions.window, overlapping regions merged, maximum width 10 Mb, MHC excluded). If add_hla is true, the HLA region (chr6:29-34 Mb) is added as an extra region. Only regions on the chromosomes listed in chroms are kept. Within each region, the most significant variant becomes the starting point of a conditional chain, but only if its -log10(p) is above locus_mlogp_threshold; regions with no such variant are skipped.
Minimum sample size
Before any analysis, the pipeline checks that each endpoint has enough samples with complete covariate data (no NA in any of the listed covariates). Binary endpoints need at least 5 cases and 5 controls; quantitative endpoints need at least 5 samples with a non-missing value. Adding phenotypes of this type will cause the whole pipeline to fail.
Method
Each region is then analysed independently with regenie, using only the variants inside the region. In the first step, the analysis is conditioned on the starting variant(s). If the most significant remaining variant has -log10(p) above conditioning_mlogp_threshold, it is added to the set of conditioning variants and regenie is run again, now conditioning on all of them. This repeats until no variant passes the threshold or max_steps steps have been run. Each variant added this way is reported as an independent signal in the outputs, with its effect size and p-value both before and after conditioning.
Summary of inputs
regenie_conditional_merged_sb.pheno_region_input: The endpoint input,tab-separated, no header. This can be either:A list of endpoints, one per line, to be analysed. For each endpoint, the pipeline will automatically extract the regions based on the variants' p-values.
A tab-separated file with endpoint-region pairs. There should be 4 columns. The columns should contain, in order:
The endpoint name
The chromosome of the region, numerical (23 for X)
The region, in format "chromosome:start-end"
The variants to condition on, comma-separated in format chr_pos_ref_alt (e.g. chr6_35376598_G_A; use chrX for chromosome 23
regenie_conditional_merged_sb.sumstats_root: path to the summary statistics (bgzipped, with tabix index .tbi in the same folder).PHENOwill be replaced by the phenotype names. All summary statistic files have to be in the same folder. The files must have the standard FinnGen column names (#chrom, pos, ref, alt, pval, mlogp, beta, sebeta, af_alt).regenie_conditional_merged_sb.null_root: path to the endpoint step 1 null model files, i.e. the LOCO prediction files (*.loco.gz).PHENOwill be replaced by the phenotype names. Note that all files have to be in the same folder. The null model must come from a step 1 run of the same trait type (binary/quantitative) that the pipeline will detect for the endpoint.regenie_conditional_merged_sb.add_hla: Include HLA region or notregenie_conditional_merged_sb.prefix: the prefix of the outputregenie_conditional_merged_sb.pheno_file: Endpoint cases&controls file, in same format as e.g. analysis covariates fileregenie_conditional_merged_sb.cov_file: covariates file, in same format as e.g. analysis covariates fileregenie_conditional_merged_sb.covariates: Comma-separated list of covariates to include in the analysis, e.g. "SEX_IMPUTED,AGE_AT_DEATH_OR_END_OF_FOLLOWUP,PC{1:10}". All covariates must exist in cov_file. For each endpoint, the pipeline drops covariates with fewer than 10 non-zero values among the samples with that endpoint (e.g. a batch covariate with no samples in the endpoint), to prevent regenie from failing.regenie_conditional_merged_sb.chroms: Comma-separated list of chromosomes to include, e.g. "1,2,3,...,22,23" (23 for X). Only used with the 1-column input (region discovery); regions supplied in a 4-column input are always analysed, whatever their chromosome.regenie_conditional_merged_sb.regenie_conditional.max_steps: Maximum number of conditioning steps per region (default 10). The chain stops at this point even if significant variants remain.regenie_conditional_merged_sb.regenie_conditional.min_mac: Minor allele count (MAC) filter for variants, variants with MAC less than threshold will not be included in output.regenie_conditional_merged_sb.regenie_conditional.min_info: INFO filter for variants; variants with INFO below this threshold are not tested and will not be included in the output.regenie_conditional_merged_sb.regenie_conditional.firth_thres: P-value threshold for Firth correction (default 0.01). Only applies to binary endpoints: variants with p-value below this threshold are Firth-corrected. Has no effect on quantitative endpoints.regenie_conditional_merged_sb.locus_mlogp_threshold: -log10(p) threshold for the starting variant of each region (1-column input only). A region is analysed only if its most significant variant is above this threshold.regenie_conditional_merged_sb.conditioning_mlogp_threshold: -log10(p) threshold for continuing the conditional chain. After each step, the most significant remaining variant is added to the conditioning set only if it is above this threshold; otherwise the chain stops.
These are options for the region selection algorithm. They can be changed for users who are familiar with the pipeline, but we recommend not touching them
regenie_conditional_merged_sb.finemap_regions.rsid_col: ""regenie_conditional_merged_sb.finemap_regions.x_chromosome: "true"regenie_conditional_merged_sb.finemap_regions.window: "1500000"regenie_conditional_merged_sb.finemap_regions.scale_se_by_pval: "false"regenie_conditional_merged_sb.finemap_regions.p_threshold: "0.00000005"regenie_conditional_merged_sb.finemap_regions.max_region_width: "10000000"regenie_conditional_merged_sb.finemap_regions.window_shrink_ratio: "0.9"
Outputs
There are seven outputs, the first two of which are of interest for viewing them and the last 3 are for importing the data to userresults pheweb browser.
all_hits. One file per endpoint (.independent_snps.txt) containing all conditional chains for that endpoint. Each chain starts with the starting variant of the region, followed by one row per independent signal found by conditioning. Columns:VARIANT: the variant
BETA,SE,MLOG10P: its values in the original (unconditioned) summary statistics
BETA_cond,SE_cond,MLOG10P_cond: its values after conditioning (NA for the starting variant)
VARIANT_cond: the variants it was conditioned on (NA for the starting variant)
chr1_17381854_G_A
-0.0371
0.0064
8.2425
nan
nan
nan
nan
chr2_161145756_T_A
-0.0429
0.0073
8.3533
nan
nan
nan
nan
chr2_196338002_G_A
0.059
0.0095
9.2624
nan
nan
nan
nan
chr3_18633152_A_C
0.044
0.0067
10.3279
nan
nan
nan
nan
chr3_16811234_G_A
-0.0367
0.0065
7.7032
-0.0328
0.0066
6.1828
chr3_18633152_A_C
chr3_43656252_G_A
0.0759
0.01
13.5747
nan
nan
nan
nan
chr3_44176307_AAAG_A
0.7812
0.1679
5.4822
0.9816
0.1974
6.1793
chr3_43656252_G_A
chr3_158237129_A_G
0.0388
0.0065
8.6487
nan
nan
nan
nan
chr3_177171295_G_A
0.0843
0.0133
9.588
nan
nan
nan
nan
chr4_59388159_A_G
-0.0403
0.0071
7.8402
nan
nan
nan
nan
chr5_104451467_A_C
0.0383
0.0066
8.1869
nan
nan
nan
nan
chr5_120730291_A_G
-0.0437
0.0066
10.5128
nan
nan
nan
nan
chr5_121149217_A_C
0.6199
0.1257
6.086
0.7808
0.1422
7.3998
chr5_120730291_A_G
chr5_144466903_T_C
0.0374
0.0065
8.1641
nan
nan
nan
nan
chr5_153777668_A_C
-0.0381
0.0065
8.3132
nan
nan
nan
nan
chr5_153129992_T_G
-0.0329
0.0065
6.3568
-0.032
0.0065
6.0592
chr5_153777668_A_C
chr6_51715850_T_C
-0.0567
0.0103
7.4145
nan
nan
nan
nan
chr6_151880872_T_C
-0.0474
0.0065
12.4306
nan
nan
nan
nan
chr6_164751626_G_A
-0.038
0.0063
8.717
nan
nan
nan
nan
chr9_36999372_C_T
0.0348
0.0063
7.419
nan
nan
nan
nan
chr9_95537395_T_A
0.0565
0.0102
7.4833
nan
nan
nan
nan
chr10_21600368_A_AAC
-0.0515
0.0085
8.819
nan
nan
nan
nan
chr10_104842738_C_CT
-0.0411
0.007
8.2919
nan
nan
nan
nan
chr11_28582122_A_G
-0.0389
0.0066
8.3234
nan
nan
nan
nan
chr11_99647795_T_C
0.0431
0.0069
9.5016
nan
nan
nan
nan
chr11_113324873_A_G
-0.038
0.0064
8.5837
nan
nan
nan
nan
chr11_115118275_G_A
-0.0407
0.007
8.312
-0.0398
0.007
7.9104
chr11_113324873_A_G
chr11_113050349_C_T
0.0364
0.0064
7.8798
0.0331
0.0064
6.5628
chr11_113324873_A_G,chr11_115118275_G_A
chr12_60397384_T_A
-0.0372
0.0065
8.0402
nan
nan
nan
nan
chr14_70749996_T_C
-0.227
0.0359
9.5829
nan
nan
nan
nan
chr15_73812581_C_A
-0.0584
0.0105
7.6144
nan
nan
nan
nan
chr16_21667465_T_C
0.0434
0.0073
8.6185
nan
nan
nan
nan
chr16_65751219_A_G
0.0357
0.0064
7.614
nan
nan
nan
nan
chr16_72134342_T_G
0.0485
0.0063
13.8185
nan
nan
nan
nan
chr16_71324662_TCTGCTAATAGGAGTGA_T
0.0829
0.0128
10.054
0.0728
0.0131
7.582
chr16_72134342_T_G
chr18_53199573_T_C
0.0497
0.0063
14.3777
nan
nan
nan
nan
chr18_55212207_T_C
0.0778
0.0148
6.843
0.0759
0.015
6.3537
chr18_53199573_T_C
chr18_76052843_T_C
0.0474
0.0085
7.6577
nan
nan
nan
nan
chr19_49457409_G_T
0.0795
0.0136
8.3038
nan
nan
nan
nan
chrX_93697357_A_G
0.4882
0.0889
7.3997
nan
nan
nan
nan
chrX_93934138_A_G
0.7061
0.1479
5.7454
1.0262
0.1883
7.2998
chrX_93697357_A_G
chr3_18633152_A_C is the first hit to have a valid conditional chain with the secondary hit chr3_16811234_G_A, for which BETA, SE and MLOG10P are provided both for the original (input) sumstats and the conditioned one. In this case, one can see that the values did not change significantly after conditioning, but it can happen that variants go from being non significant to significant or that betas change considerably.
all_chains. The same chains as all_hits, but one file per region instead of merged per endpoint.all_outputs. This file is simply the collection of all regenie outputs and it's meant for debugging in case something went wrongall_logs. The regenie logs of all conditioning steps, combined per endpoint. Meant for debugging in case something went wrong.metadata: metadata file for identifying an existing already imported result in userresults pheweb browser.sql_import: File for importing the results to userresults pheweb browserimport_conditional_files: conditional results to be imported into the userresults PheWeb browser
Last updated
Was this helpful?