Skip to content

Commit b2caab0

Browse files
committed
Plotting AlStructure now works
1 parent 5dd9429 commit b2caab0

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

structure_threader/plotter/structplot.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -303,21 +303,20 @@ def _parse_maverick(self):
303303
dtype="|U20",
304304
skip_header=1).T[1].T)
305305

306-
def _parse_alstructure(self):
307-
"""
308-
Parses the meanQ array of a single ALStructure output file
309-
Sets the qvals array, the number of individual taxa (nind)
310-
and number of clusters (k)
311-
"""
312-
313-
self.qvals = np.genfromtxt(self.file_path)
314-
self.qvals = np.delete(self.qvals, 0, 0)
315-
self.qvals = np.delete(self.qvals, 0, 1)
316-
317-
try:
318-
self.nind, self.k = self.qvals.shape
319-
except ValueError:
320-
self.k = 1
306+
def _parse_alstructure(self):
307+
"""
308+
Parses the meanQ array of a single ALStructure output file
309+
Sets the qvals array, the number of individual taxa (nind)
310+
and number of clusters (k)
311+
"""
312+
313+
self.qvals = np.genfromtxt(self.file_path, skip_header=1, delimiter=",")
314+
self.qvals = np.delete(self.qvals, 0, 1)
315+
316+
try:
317+
self.nind, self.k = self.qvals.shape
318+
except ValueError:
319+
self.k = 1
321320

322321

323322
class PlotList(AuxSanity):

0 commit comments

Comments
 (0)