# Clock Deviation

**URL:** <https://nextstrain.discourse.group/t/clock-deviation/1112>\
**Category:** Uncategorized\
**Created:** [May 16, 2022, 8:11pm UTC](https://nextstrain.discourse.group/t/clock-deviation/1112 "2022-05-16T20:11:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbosmeny](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@mbosmeny](https://nextstrain.discourse.group/u/mbosmeny)\
**Post date:** [May 16, 2022, 8:11pm UTC](https://nextstrain.discourse.group/t/clock-deviation/1112/1 "2022-05-16T20:11:44Z")

</div>

Hello, I’m getting some odd results from my newest runs of Nextstrain, and I’m wondering if I have a bad setting somewhere that’s causing this. My setup is using the newest versions of the Nextstrain CLI and related programs, but some of my profile files are left over from previous versions, so it’s possible that’s what’s tripping me up.

My basic setup is that I have ~70,000 sequences and metadata, and I’m trying to pull roughly 12,000 of these at random, from the beginning of the pandemic to now, and make a nextstrain for them. This always worked before, but now I’m generating results that only show ~7000 samples.

Digging into my Results files a bit, it appears the remaining ~5000 subsampled strains are getting thrown out because of clock\_deviation. If I filter metadata\_with\_nextstrain\_qc.tsv to only show strains with a clock\_deviation of \< -20, roughly 5000 samples are shown. This seems in error. As I understand it, clock\_deviation is meant to filter out samples with bad date data, like omicron samples that are incorrectly labelled January 2021 instead of January 2022, using the expected clock frequency of mutations over time. But I can’t believe that 40% of my dataset are correctly being flagged as wrong. These are all GISAID samples, and a cursory glance through makes this data seem fine, date-wise.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/nextstrain/original/1X/1ac348d28c019d42dbd890eedca5d25efcb3ef9f.jpeg)

If I sort by clock\_deviation, the “worst” offenders are all 20J (Gamma, V3) samples, for some reason.

My guess is that I have some profile setting somewhere that is causing incorrect calculations of clock\_frequency. Any ideas? Thank you for your time.
