SBRG / ssbio

A Python framework for structural systems biology
http://ssbio.readthedocs.io/en/latest/
MIT License
101 stars 28 forks source link

Issues running the tutorial #45

Open bkellman opened 6 years ago

bkellman commented 6 years ago

https://github.com/SBRG/ssbio/blob/6f41652f716681a64f2f57aa3cc47eb1953e4ae4/docs/tutorials.ipynb#L7

There are two issues I've found running this code: 1) I think shutil.which is only availible for python3 but the ipython notbook defaults to opening in python2. I switched to using subprocess and it works fine

def check_path(path):
    """Check if the specified program is in the PATH and can be run in a shell."""
    import subprocess

    checker = subprocess.check_output(['which',path])
    if checker:
        print('SUCCESS: {} found!'.format(path))
        return checker
    else:
        raise OSError('FAILURE: unable to find {}'.format(path))

2) fatcat and scratch install instructions do not create mononyms for these programs. This is easily resolved:

sudo ln -s /<path>/biojava-protein-comparison-tool-4.0.0/runFATCAT.sh /usr/bin/fatcat
sudo ln -s /media/<path>/SCRATCH-1D_1.1/bin/run_SCRATCH-1D_predictors.sh /usr/bin/scratch
nmih commented 6 years ago

Thanks! Will implement that