We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aa7700 commit 8d615beCopy full SHA for 8d615be
smcpp/data_filter.py
@@ -113,11 +113,12 @@ def run(self, c):
113
np.all(c.data[:, 2::3] == c.data[:, 3::3], axis=1) &
114
np.any(c.data[:, 3::3] > 0, axis=1))
115
if np.any(nonseg):
116
- logger.error("In file %s, observations %s:", c.fn, np.where(nonseg)[0])
117
- logger.error("Data set contains sites where every "
118
- "individual is homozygous for the derived allele. "
119
- "Please recode these as non-segregating (homozygous ancestral).")
120
- raise RuntimeError("data validation failed")
+ logger.debug("In file %s, observations %s:", c.fn, np.where(nonseg)[0])
+ logger.debug("Data set contains sites where every "
+ "individual is homozygous for the derived allele.")
+ a = c.data[nonseg, 1::3]
+ a[a >= 0] = 0
121
+ c.data[nonseg, 2::3] = 0
122
bad = (c.data[:, 0] <= 0 |
123
np.any(c.data[:, 1::3] > c.a[None, :], axis=1) |
124
np.any(c.data[:, 2::3] > c.data[:, 3::3], axis=1) |
0 commit comments