Skip to content

Commit

Permalink
Add check for executable of structure binary
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacovercast committed Oct 4, 2021
1 parent ad33d81 commit 9a59482
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ipyrad/analysis/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
conda install structure clumpp -c ipyrad
"""

MISSING_ACCESS = """
One of the binaries necessary for running the structure
module are not executable. Please change the mode of the binary
to allow execution, e.g.:
chmod 777 {}
"""

_IMPORT_VCF_INFO = """
Converting vcf to HDF5 using default ld_block_size: {}
Typical RADSeq data generated by ipyrad/stacks will ignore this value.
Expand Down Expand Up @@ -194,6 +202,8 @@ def _check_binaries(self):
for binary in [self.STRUCTURE, self.CLUMPP]:
if not os.path.exists(binary):
raise IPyradError(MISSING_IMPORTS)
if not os.access(binary, os.X_OK):
raise IPyradError(MISSING_ACCESS.format(binary))


def _setup_dirs(self):
Expand Down

0 comments on commit 9a59482

Please sign in to comment.