<commit_before># NEED:
# - pip : https://pip.pypa.io/en/stable/installing/
# - virtualenv: https://virtualenv.pypa.io/en/stable/installation/

## Setup your software directory
mkdir -p $HOME/software
cd $HOME/software

## Create virtual environment
virtualenv $HOME/.virtualenvs/km
source $HOME/.virtualenvs/km/bin/activate

## Download and install jellyfish
wget https://github.com/gmarcais/Jellyfish/releases/download/v2.2.6/jellyfish-2.2.6.tar.gz
tar zxvf jellyfish-2.2.6.tar.gz
cd jellyfish-2.2.6
# General case
./configure --prefix=$VIRTUAL_ENV --enable-python-binding
# For user which install python with macport
# ./configure --prefix=$HOME/.virtualenvs/km --enable-python-binding PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error"  LDFLAGS="-L/opt/local/lib `python-config --ldflags` `python-config --libs`"
make -j 4
make install

## Download and install km
cd ..
# TODO: replace this part with a release when it's ready
git clone https://github.com/iric-soft/km.git
cd km
python setup.py install

## Execute km on a small example
# Need to reload the virtual environment each time you open a new terminal
# with: source $HOME/.virtualenvs/km/bin/activate
km find_mutation ./data/catalog/GRCh38/NPM1_4ins_exons_10-11utr.fa ./data/jf/02H025_NPM1.jf | km find_report -t ./data/catalog/GRCh38/NPM1_4ins_exons_10-11utr.fa<commit_msg>fix path and MacOS<commit_after># NEED:
# - pip : https://pip.pypa.io/en/stable/installing/
# - virtualenv: https://virtualenv.pypa.io/en/stable/installation/

## Setup your software directory
mkdir -p $HOME/software
cd $HOME/software

## Create virtual environment
virtualenv $HOME/.virtualenvs/km
source $HOME/.virtualenvs/km/bin/activate

## Download and install jellyfish
curl -L https://github.com/gmarcais/Jellyfish/releases/download/v2.2.6/jellyfish-2.2.6.tar.gz --output jellyfish-2.2.6.tar.gz
tar zxvf jellyfish-2.2.6.tar.gz
cd jellyfish-2.2.6
# General case
./configure --prefix=$VIRTUAL_ENV --enable-python-binding
# For user which install python with macport
# ./configure --prefix=$HOME/.virtualenvs/km --enable-python-binding PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error"  LDFLAGS="-L/opt/local/lib `python-config --ldflags` `python-config --libs`"
make -j 4
make install

## Download and install km
cd $HOME/software
# TODO: replace this part with a release when it's ready
git clone https://github.com/iric-soft/km.git
cd km
python setup.py install

## Execute km on a small example
# Need to reload the virtual environment each time you open a new terminal
# with: source $HOME/.virtualenvs/km/bin/activate
km find_mutation $HOME/software/km/data/catalog/GRCh38/NPM1_4ins_exons_10-11utr.fa $HOME/software/km/data/jf/02H025_NPM1.jf | km find_report -t $HOME/software/km/data/catalog/GRCh38/NPM1_4ins_exons_10-11utr.fa
{'fraction_non_alphanumeric': 0.12936046511627908, 'fraction_numerical': 0.026526162790697673, 'mean_word_length': 4.223908918406072, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6922225', 'n_tokens_mistral': 1023, 'n_tokens_neox': 964, 'n_words': 232}