Bias model training and quality check report

Preprocessing report

The image below should look closely like a Tn5 or DNase bias enzyme motif.

Training report

The val loss (validation loss) will decrease and saturate after a few epochs.

Bias model performance in peaks and non-peaks

Counts Metrics: The pearsonr in non-peaks should be greater than 0 (higher the better). The pearsonr in peaks should be greater than -0.3 (otherwise the bias model could potentially be capturing AT bias). MSE (Mean Squared Error) will be high in peaks.

Profile Metrics: Median JSD (Jensen Shannon Divergence between observed and predicted) lower the better. Median norm JSD is median of the min-max normalized JSD where min JSD is the worst case JSD i.e JSD of observed with uniform profile and max JSD is the best case JSD i.e 0. Median norm JSD is higher the better. Both JSD and median norm JSD are sensitive to read-depth. Higher read-depth results in better metrics.

What to do if your pearsonr in peaks is less than -0.3? In the range of -0.3 to -0.5 please be wary of your chrombpnet_wo_bias.h5 (that wil potentially be trained with this bias model) TFModisco showing lots of GC rich motifs (> 3 in the top-10). If this is not the case you can continue using the chrombpnet_wo_bias.h5. If you end up seeing a lot of GC rich motifs it is likely that bias model has learnt a different GC distribution than your GC-content in peaks. You might benefit from increasing the bias_threshold_factor argument input to the chrombpnet bias pipeline or chrombpnet bias train command used in training the bias model and retrain a new bias model. For more intuition about this argument refer to the FAQ section in wiki. If the value is less than -0.5 the chrombpnet training will automatically throw an error.

nonpeaks.pearsonr nonpeaks.mse peaks.pearsonr peaks.mse
counts_metrics -0.0 0.68 -0.49 6.75
nonpeaks.median_jsd nonpeaks.median_norm_jsd peaks.median_jsd peaks.median_norm_jsd
profile_metrics 0.64 0.15 0.5 0.26

TFModisco motifs learnt from bias model (bias.h5) model

TFModisco motifs generated from profile contribution scores of the bias model. cwm_fwd, cwm_rev are the forward and reverse complemented consolidated motifs from contribution scores in subset of random peaks. These CWM motifs should be free from any Transcription Factor (TF) motifs and should contain either only bias motifs or random repeats. For each of these motifs, we use TOMTOM to find the top-3 closest matches (match_0, match_1, match_2) from a database consisting of both MEME TF motifs and heterogenous enzyme bias motifs that we have repeatedly seen in our datasets. The qvals (qval0,qval1,qval2) should be high (> 0.0001) if the closest hit is a TF motif (i.e indicating that the closest match is not the correct match) - this is also generally verifiable by eye as the closest match will look nothing like the CWMs. The qvals should be low if the closest hit is enzyme bias motif and generally verifiable that the top match looks like the CWM. The first 3-5 motifs in the list below should look like enzyme bias motif.

What to do if you find an obvious TF motif in the list?
Do not use this bias model as it will regress the contribution of the TF motifs (along with bias motifs) from the chrombpnet_nobias.h5. Reduce the bias_threshold_factor argument input to the chrombpnet bias pipeline or chrombpnet bias train command used in training the bias model and retrain a new bias model. For more intuition about this argument refer to the FAQ section in wiki.

What to do if you are unsure if a given CWM motif is resembling the match_0 logo for example?
Get marginal footprint on the match_0 motif logo (using the command chrombpnet footprints and make sure that the bias models footprint is closer to that of controls with no motif inserted - for examples look at FAQ )

pattern NumSeqs cwm_fwd cwm_rev match0 qval0 match0_logo match1 qval1 match1_logo match2 qval2 match2_logo
pos__0 8519 TN5_1 2.343550e-09 TN5_2 1.714920e-08 TN5_7 0.000100
pos__1 6312 TN5_4 2.034240e-02 TN5_5 2.034240e-02 TN5_8 0.027068
pos__2 4140 TN5_1 5.084640e-07 TN5_3 3.240360e-06 TN5_2 0.003034
pos__3 3654 TN5_3 9.636770e-15 TN5_4 2.155130e-03 TN5_5 0.002155
pos__4 3416 TN5_3 1.164160e-01 TN5_4 1.164160e-01 TN5_5 0.116416
pos__5 2918 TN5_3 8.388180e-05 TN5_7 3.430450e-04 TN5_1 0.001952
pos__6 2794 TN5_2 3.645640e-17 TN5_4 4.788040e-06 TN5_5 0.000005
pos__7 796 TN5_3 4.789920e-07 TN5_1 9.746420e-04 TBX1_TBX_4 0.084708
pos__8 223 POU3F4_POU_2 1.000000e+00 NFAC2_HUMAN.H11MO.0.B 1.000000e+00 NFAC2_MOUSE.H11MO.0.C 1.000000
pos__9 146 ZNF384_MA1125.1 5.454130e-02 PRDM6_HUMAN.H11MO.0.C 6.609230e-02 STAT1_MOUSE.H11MO.0.A 0.114602
pos__10 139 FOXD2_forkhead_1 1.000000e+00 NFATC1_NFAT_1 1.000000e+00 CPEB1_RRM_1 1.000000
pos__11 125 ZNF384_MA1125.1 2.832720e-02 PRDM6_HUMAN.H11MO.0.C 2.832720e-02 FOXJ3_HUMAN.H11MO.0.A 0.165850
pos__12 95 DNASE_2 2.608540e-01 ZNF384_MA1125.1 1.000000e+00 LHX3_HUMAN.H11MO.0.C 1.000000
pos__13 85 NFATC2_MA0152.1 5.288450e-01 NFATC1_NFAT_1 5.288450e-01 PRDM6_HUMAN.H11MO.0.C 0.703003
pos__14 74 LIN54_MA0619.1 1.000000e+00 ONECUT3_CUT_1 1.000000e+00 ONECUT3_MA0757.1 1.000000
pos__15 72 EGR2_HUMAN.H11MO.0.A 1.000000e+00 EGR1_HUMAN.H11MO.0.A 1.000000e+00 RREB1_MA0073.1 1.000000
pos__16 64 TN5_8 9.999990e-01 RORA_HUMAN.H11MO.0.C 9.999990e-01 RORA_MOUSE.H11MO.0.C 0.999999
pos__17 42 TN5_3 4.137570e-04 TN5_4 2.010910e-01 TN5_5 0.201091
pos__18 33 TN5_1 1.252380e-01 TN5_3 1.252380e-01 TN5_2 0.125238
pos__19 20 TN5_6 4.466370e-08 DNASE_5 3.976190e-01 PAX5_HUMAN.H11MO.0.A 0.419224

TFModisco motifs generated from counts contribution scores of the bias model. cwm_fwd, cwm_rev are the forward and reverse complemented consolidated motifs from contribution scores in subset of random peaks. These motifs should be free from any Transcription Factor (TF) motifs and should contain motifs either weakly related to bias motifs or random repeats. For each of these motifs, we use TOMTOM to find the top-3 closest matches (match_0, match_1, match_2) from a database consisting of both MEME TF motifs and heterogenous enzyme bias motifs that we have repeatedly seen in our datasets. The qvals should be high (> 0.0001) if the closest hit is a TF motif (i.e indicating that the closest match is not the correct match, this is also generally verifiable by eye and making sure the closest match looks nothing like the CWMs).

What to do if you find an obvious TF motif in the list?
Do not use this bias model as it will regress the contribution of the TF motifs (along with bias motifs) from the chrombpnet_nobias.h5. Reduce the bias_threshold_factor argument input to the chrombpnet bias pipeline or chrombpnet bias train command used in training the bias model and retrain a new bias model. For more intuition about this argument refer to the FAQ section in wiki.

What to do if you are unsure if a given CWM motif is resembling the match_0 logo for example?
Get marginal footprint on the match_0 motif logo (using the command chrombpnet footprints and make sure that the bias models footprint is closer to that of controls with no motif inserted - for examples look at FAQ )

pattern NumSeqs cwm_fwd cwm_rev match0 qval0 match0_logo match1 qval1 match1_logo match2 qval2 match2_logo
pos__0 673 PRDM6_HUMAN.H11MO.0.C 7.910040e-02 ZNF384_MA1125.1 1.981690e-01 ZFP28_HUMAN.H11MO.0.C 5.613390e-01
pos__1 264 TFAP2A_TFAP_3 2.722730e-02 THA_HUMAN.H11MO.0.C 2.722730e-02 SP1_HUMAN.H11MO.0.A 2.722730e-02
pos__2 219 POU3F4_POU_2 1.000000e+00 MAFK_bZIP_1 1.000000e+00 MAFK_bZIP_3 1.000000e+00
pos__3 196 TN5_1 4.496060e-01 TN5_7 4.496060e-01 TN5_3 5.659470e-01
pos__4 159 ZFX_HUMAN.H11MO.0.A 1.000000e+00 ZBT14_HUMAN.H11MO.0.C 1.000000e+00 Barhl1.mouse_homeodomain_1 1.000000e+00
pos__5 121 NRF1_MA0506.1 3.822950e-01 MXI1_HUMAN.H11MO.0.A 3.822950e-01 MXI1_MOUSE.H11MO.0.A 3.822950e-01
pos__6 117 TBX21_TBX_6 5.989840e-01 TN5_7 1.000000e+00 TBX21_TBX_3 1.000000e+00
pos__7 114 MYC_MOUSE.H11MO.0.A 1.197670e-01 MXI1_HUMAN.H11MO.0.A 1.197670e-01 MXI1_MOUSE.H11MO.0.A 1.197670e-01
pos__8 96 TN5_7 1.000000e+00 ZN667_HUMAN.H11MO.0.C 1.000000e+00 PRDM4_C2H2_1 1.000000e+00
pos__9 85 SP2_HUMAN.H11MO.0.A 1.204860e-04 SP2_MOUSE.H11MO.0.B 1.204860e-04 ZFX_MOUSE.H11MO.0.B 3.991010e-04
pos__10 84 SRBP2_HUMAN.H11MO.0.B 7.350690e-01 SRBP2_MOUSE.H11MO.0.B 7.350690e-01 RARG_nuclearreceptor_5 1.000000e+00
pos__11 73 SP2_HUMAN.H11MO.0.A 2.121730e-05 SP2_MOUSE.H11MO.0.B 2.121730e-05 SP3_HUMAN.H11MO.0.B 1.744830e-04
pos__12 46 TEAD1_TEA_2 2.406170e-01 NR1I3_HUMAN.H11MO.0.C 4.311910e-01 NR1I3_MOUSE.H11MO.0.C 4.311910e-01
pos__13 45 SP2_HUMAN.H11MO.0.A 2.209150e-05 SP2_MOUSE.H11MO.0.B 2.209150e-05 SP1_HUMAN.H11MO.0.A 1.149740e-04
pos__14 31 SP2_HUMAN.H11MO.0.A 1.235400e-04 SP2_MOUSE.H11MO.0.B 1.235400e-04 SP1_MOUSE.H11MO.0.A 2.509420e-04
pos__15 27 SP2_HUMAN.H11MO.0.A 2.615610e-05 SP2_MOUSE.H11MO.0.B 2.615610e-05 SP1_HUMAN.H11MO.0.A 3.504480e-05
pos__16 20 Uncx.mouse_homeodomain_1 1.000000e+00 UNCX_homeodomain_1 1.000000e+00 Gfi1_MA0038.1 1.000000e+00