Hi, I’ve checked your script against our internal code for the figure and identified four differences. The first two are the likely culprits for the discrepancy:
-
Correlation Calculation: You are calculating the Pearson r per interval and taking the mean. The paper computes a single global Pearson r by concatenating all bases across all regions.
-
Evaluation Window: Your code evaluates over the full variable-length BED intervals, whereas we evaluate on a 1,000 bp window centered at the peak.
-
Reverse Complementing: We used reverse-complementing TTA to compute the metrics. This involves running the prediction twice (forward strand and reverse-complement strand) and averaging the predictions.
-
Pseudo-count: We use a Jensen-Shannon distance pseudo-count of 1e-16.
As you noted, the TFRecord dataset we released cannot be queried by interval. However, because each record in the dataset contains the associated interval, you can use this to verify whether you have correctly reproduced our data preprocessing as described in the paper’s methods section.