<commit_before>## Installation

### Automated

We provide an automated script that installs third party analysis tools, required genome data and python library dependencies for running human variant and RNA-seq analysis, bundled into an isolated directory or virtual environment:
```shell
wget https://raw.githubusercontent.com/bcbio/bcbio-nextgen/master/scripts/bcbio_nextgen_install.py
python bcbio_nextgen_install.py /usr/local/share/bcbio --tooldir=/usr/local \
    --genomes GRCh37 --aligners bwa --aligners bowtie2
```
bcbio should install cleanly on Linux systems. For Mac OSX, we suggest trying [bcbio-vm](https://github.com/bcbio/bcbio-nextgen-vm) which runs bcbio on [Cloud](cloud) or isolates all the third party tools inside a Docker container. bcbio-vm is still a work in progress but not all of the dependencies bcbio uses install cleanly on OSX.

With the command line above, indexes and associated data files go in `/usr/local/share/bcbio-nextgen` and tools are in `/usr/local`. If you don't have write permissions to install into the `/usr/local` directories you can install in a user directory like `~/local` or use `sudo chmod` to give your standard user permissions. Please don't run the installer with sudo or as the root user. Do not use directories with `:` in the name, it is not POSIX compliant and will cause installation failures.

The installation is highly customizable, and you can install additional software and data later using `bcbio_nextgen.py upgrade`. Run `python bcbio_nextgen_install.py` with no arguments to see options for configuring the installation process. Some useful arguments are:
* `--isolate` Avoid updating the user's `~/.bashrc` if installing in a non-standard PATH. This facilitates creation of isolated modules without disrupting the user's environmental setup. Manually edit your `~/.bashrc` to allow bcbio runs with:
    ```shell
    export PATH=/path_to_bcbio/bin:$PATH
    ```
* `--nodata` Do not install genome data.

The machine will need to have some basic requirements for installing and running bcbio:
* Python 2.7, Python 3.x, or Python 2.6 plus the argparse dependency.
* Basic system setup for unpacking files: tar, gzip, unzip, bzip2, xz-utils.
* The git version control system (<https://git-scm.com/>)
* wget for file retrieval (<https://www.gnu.org/software/wget/>)

Optional tool specific requirements:
* Java 1.7, needed when running GATK < 3.6 or MuTect. This must be available in your path so typing `java -version` resolves a 1.7 version. bcbio distributes Java 8 as part of the Anaconda installation for recent versions of GATK and MuTect2. You can override the Java 8 installed with bcbio by setting `BCBIO_JAVA_HOME=/path/to/your/javadir` if you have the Java you want in `/path/to/your/javadir/bin/java`.
* An OpenGL library, like [Mesa](https://www.mesa3d.org/) (On Ubuntu/deb systems: `libglu1-mesa`, On RedHat/rpm systems: `mesa-libGLU-devel`). This is only required for cancer heterogeneity analysis with BubbleTree.
* The Pisces tumor-only variant callers requires the [Microsoft .NET runtime](https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-managers).

The [bcbio-nextgen Dockerfile](https://github.com/bcbio/bcbio-nextgen/blob/master/Dockerfile#L5) contains the packages needed to install on bare Ubuntu systems.

The automated installer creates a fully integrated environment that allows simultaneous updates of the framework, third party tools and biological data. This offers the advantage over manual installation of being able to manage and evolve a consistent analysis environment as algorithms continue to evolve and improve. Installing this way is as isolated and self-contained as possible without virtual machines or
lightweight system containers like [Docker](https://www.docker.com/). The [On a Virtual Machine](#on-a-virtual-machine) section has additional documentation on including additional genome data for supported bcbio genomes. For genome builds not included in the defaults, see the documentation on [adding custom genomes](contents/configuration:adding%20custom%20genomes).
Following installation, you should edit the pre-created system configuration file in `/usr/local/share/bcbio-nextgen/galaxy/bcbio_system.yaml` to match your local system or cluster configuration (see [tuning core and memory usage](contents/parallel:tuning%20core%20and%20memory%20usage)).

### On a Virtual Machine

If you are looking to quickly try out bcbio-nextgen on your personal machine before installing it on your cluster, installing bcbio-nextgen on a virtual machine is easy using [Vagrant](https://www.vagrantup.com/).

#### macOS

* Install [Git](https://git-scm.com/download/mac), [VirtualBox](https://download.virtualbox.org/virtualbox/6.1.6/VirtualBox-6.1.6-137129-OSX.dmg), and [Vagrant](https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.dmg)
* Download bcbio-nextgen and provision Vagrant VM:
    ```shell
    git clone git@github.com:bcbio/bcbio-nextgen.git
    cd bcbio-nextgen
    vagrant up
    ```<commit_msg>Fix typo in vagrant documentation<commit_after>## Installation

### Automated

We provide an automated script that installs third party analysis tools, required genome data and python library dependencies for running human variant and RNA-seq analysis, bundled into an isolated directory or virtual environment:
```shell
wget https://raw.githubusercontent.com/bcbio/bcbio-nextgen/master/scripts/bcbio_nextgen_install.py
python bcbio_nextgen_install.py /usr/local/share/bcbio --tooldir=/usr/local \
    --genomes GRCh37 --aligners bwa --aligners bowtie2
```
bcbio should install cleanly on Linux systems. For Mac OSX, we suggest trying [bcbio-vm](https://github.com/bcbio/bcbio-nextgen-vm) which runs bcbio on [Cloud](cloud) or isolates all the third party tools inside a Docker container. bcbio-vm is still a work in progress but not all of the dependencies bcbio uses install cleanly on OSX.

With the command line above, indexes and associated data files go in `/usr/local/share/bcbio-nextgen` and tools are in `/usr/local`. If you don't have write permissions to install into the `/usr/local` directories you can install in a user directory like `~/local` or use `sudo chmod` to give your standard user permissions. Please don't run the installer with sudo or as the root user. Do not use directories with `:` in the name, it is not POSIX compliant and will cause installation failures.

The installation is highly customizable, and you can install additional software and data later using `bcbio_nextgen.py upgrade`. Run `python bcbio_nextgen_install.py` with no arguments to see options for configuring the installation process. Some useful arguments are:
* `--isolate` Avoid updating the user's `~/.bashrc` if installing in a non-standard PATH. This facilitates creation of isolated modules without disrupting the user's environmental setup. Manually edit your `~/.bashrc` to allow bcbio runs with:
    ```shell
    export PATH=/path_to_bcbio/bin:$PATH
    ```
* `--nodata` Do not install genome data.

The machine will need to have some basic requirements for installing and running bcbio:
* Python 2.7, Python 3.x, or Python 2.6 plus the argparse dependency.
* Basic system setup for unpacking files: tar, gzip, unzip, bzip2, xz-utils.
* The git version control system (<https://git-scm.com/>)
* wget for file retrieval (<https://www.gnu.org/software/wget/>)

Optional tool specific requirements:
* Java 1.7, needed when running GATK < 3.6 or MuTect. This must be available in your path so typing `java -version` resolves a 1.7 version. bcbio distributes Java 8 as part of the Anaconda installation for recent versions of GATK and MuTect2. You can override the Java 8 installed with bcbio by setting `BCBIO_JAVA_HOME=/path/to/your/javadir` if you have the Java you want in `/path/to/your/javadir/bin/java`.
* An OpenGL library, like [Mesa](https://www.mesa3d.org/) (On Ubuntu/deb systems: `libglu1-mesa`, On RedHat/rpm systems: `mesa-libGLU-devel`). This is only required for cancer heterogeneity analysis with BubbleTree.
* The Pisces tumor-only variant callers requires the [Microsoft .NET runtime](https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-managers).

The [bcbio-nextgen Dockerfile](https://github.com/bcbio/bcbio-nextgen/blob/master/Dockerfile#L5) contains the packages needed to install on bare Ubuntu systems.

The automated installer creates a fully integrated environment that allows simultaneous updates of the framework, third party tools and biological data. This offers the advantage over manual installation of being able to manage and evolve a consistent analysis environment as algorithms continue to evolve and improve. Installing this way is as isolated and self-contained as possible without virtual machines or
lightweight system containers like [Docker](https://www.docker.com/). The [On a Virtual Machine](#on-a-virtual-machine) section has additional documentation on including additional genome data for supported bcbio genomes. For genome builds not included in the defaults, see the documentation on [adding custom genomes](contents/configuration:adding%20custom%20genomes).
Following installation, you should edit the pre-created system configuration file in `/usr/local/share/bcbio-nextgen/galaxy/bcbio_system.yaml` to match your local system or cluster configuration (see [tuning core and memory usage](contents/parallel:tuning%20core%20and%20memory%20usage)).

### On a Virtual Machine

If you are looking to quickly try out bcbio-nextgen on your personal machine before installing it on your cluster, installing bcbio-nextgen on a virtual machine is easy using [Vagrant](https://www.vagrantup.com/).

#### macOS

* Install [Git](https://git-scm.com/download/mac), [VirtualBox](https://download.virtualbox.org/virtualbox/6.1.6/VirtualBox-6.1.6-137129-OSX.dmg), and [Vagrant](https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.dmg)
* Download bcbio-nextgen and provision Vagrant VM:
    ```shell
    
    git clone <EMAIL>:bcbio/bcbio-nextgen.git
    cd bcbio-nextgen/scripts/vm
    vagrant up
    ```
{'fraction_non_alphanumeric': 0.08533333333333333, 'fraction_numerical': 0.010864197530864197, 'mean_word_length': 4.743618831537153, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, 'https://': 24, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 1, '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': '3686349', 'n_tokens_mistral': 2995, 'n_tokens_neox': 2810, 'n_words': 1184}