Skip to content

Commit

Permalink
bugfix wex again
Browse files Browse the repository at this point in the history
  • Loading branch information
eaton-lab committed Dec 16, 2024
1 parent 75dba24 commit c9debbd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ipyrad/analysis/window_extracter.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,11 @@ def _write_to_nex(self):
def get_sample_stats(self):
"""Return dataframe with nsites and %missing per sample."""
# hack: select an appropriate sorted list of names after some may have been dropped
if len(self.scaffold_idxs) == 1:
names = self._names
else:
if isinstance(self.scaffold_idxs, (list, tuple, np.ndarray, range)):
names = self.names
else:
names = self._names

data = pd.DataFrame(index=names, columns=["nsites", "percent_missing"])
data["nsites"] = np.sum(self.seqarr != 78, axis=1)
data["percent_missing"] = 1 - round(data["nsites"] / self.seqarr.shape[1], 5)
Expand Down

0 comments on commit c9debbd

Please sign in to comment.