---
# System prepended metadata

title: Orthopox analysis computer setup

---

# Orthopox analysis computer setup

## Basic computer setup 

**Amazon AWS configuration**

- 8 cpus
- 32GB ram
- 100GB disk

**Connection** 

    # Connect with key 
    # Run a command to prepare the key 
    
        $ chmod 400 step-up-megh.pem
    
    # Connect as the Ubuntu user
    # Key must be in the working directory 
    # Change the command to reflect the IP
    
        $ ssh -i "step-up-megh.pem" ubuntu@AWSIPADDRESS
    
    # Connection is successful when your prompt looks something like
    # ubuntu@ip-AWS-IP-ADDRESS:~$ 
    
**Basic Tools**
 - Install conda
      
          # Move to /opt directory and switch to su (adminisrative) user
          
              $ cd /opt 
              $ sudo su
          
          # Download and install anaconda
          
              $ wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
          
              $ bash Anaconda3-2022.05-Linux-x86_64.sh -b -p /opt/anaconda3
              # During installation choose /opt/anaconda3 as the install directory

\* You will need to type `exit` to logoff administrative user and disconnect/reconnect from the machine. When you reconnect your prompt should look like 

**Link conda tools to path-searchable folders**

    # make sure all conda packages will be in path by symbolic links to /bin
    # this step is a bit of a hack and you may get some warnings about
    # symbolic links that cannot be created - it's ok.
    
        $ ln -s /opt/anaconda3/pkgs/*/bin/* /bin
        
        $ ln -s /opt/anaconda3/pkgs/*/lib/* /usr/lib

**Configure Bioconda**

This will help make installations smoother and the `-c bioconda` and smiliar commands won't be needed. 

    /opt/anaconda3/bin/conda config --add channels defaults
    /opt/anaconda3/bin/conda config --add channels bioconda
    /opt/anaconda3/bin/conda config --add channels conda-forge
    /opt/anaconda3/bin/conda config --set channel_priority strict


**Confgure and Run Jupyter**

Setup a password for the server

    jupyter notebook password

Intsall the bash kernel 

    pip install bash_kernel
    python -m bash_kernel.install

Start at tmux session so that this program can run in the background 

    tmux new-session -n jupyter

Run the command to start the Jupyter server

    jupyter lab --no-browser --allow-root --ip=0.0.0.0 --port=8001 --NotebookApp.token='' --notebook-dir='/home/ubuntu'

To leave the tmux screen hit `CNTRL`+`b` and then `d` this key combination is the "detatch" command. See [tmux docs]().

**Analysis tools** 

[NCBI Datasets](https://www.ncbi.nlm.nih.gov/datasets/docs/v1/download-and-install/#install-using-conda)

    conda create -y --name ncbi_datasets ncbi-datasets-cli


[Liftoff](https://github.com/agshumate/Liftoff)

    conda create -y --name liftoff liftoff

[minimap2](https://bioconda.github.io/recipes/minimap2/README.html?highlight=minimap2#package-package%20&#x27;minimap2&#x27;) - installed globally not as an enviornment

    curl -L https://github.com/lh3/minimap2/releases/download/v2.24/minimap2-2.24_x64-linux.tar.bz2 | tar -jxvf -./minimap2-2.24_x64-linux/minimap2
    
    ln -s /opt/minimap2-2.24_x64-linux/minimap2 /bin
    

[bcftools](https://bioconda.github.io/recipes/bcftools/README.html?highlight=bcftools#package-package%20&#x27;bcftools&#x27;)

    conda create -y --name bcftools bcftools

[nextclade](https://docs.nextstrain.org/projects/nextclade/en/stable/user/nextclade-cli.html)

    
    conda create -y --name nextclade nextclade


[ViralMSA](https://github.com/niemasd/ViralMSA)

    cd /opt
    wget "https://raw.githubusercontent.com/niemasd/ViralMSA/master/ViralMSA.py"
    chmod a+x ViralMSA.py
    
    # optional step to install globally
    
    sudo mv ViralMSA.py /usr/local/bin/ViralMSA.py 
    

[Jbrowse2](https://jbrowse.org/jb2/docs/combined/)

Install nodjs using [nvm](https://github.com/nvm-sh/nvm)
    
    cd /opt
    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
    
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Install nodejs 

    nvm install node 

Install [JBrowse2](https://jbrowse.org/jb2/docs/quickstart_web/)

    npm install -g @jbrowse/cli
    npm install -g npm@8.15.1 

[MEGA command line](https://www.megasoftware.net/)

You must download the .deb file from the MEGA website and transfer to the instance. 


    
    
----


**Data Transfertools**

FileZilla: [https://filezilla-project.org/](https://filezilla-project.org/)

Connection instructions 

 Import key file to Filezilla.

    Edit-> Settings -> Connection -> SFTP
    Click on "Add Keyfile" button.
    Browse to the location of your key file (.pem file provided by Amazon).
    Convert the .pem file to the supported format.

For connecting to Amazon EC2 Instance.

    Go to Site manager -> New site
    Fill in the following information
        Host: DNS name of EC2 instance.
        File transfer protocol: SFTP-SSH.
        Logon Type: Normal.
        User: Your default username.
        Password: Leave it as empty.
        Click Connect button. 

**Potential analysis tools**

ViralMSA: [https://github.com/niemasd/ViralMSA](https://github.com/niemasd/ViralMSA)