SeekDeep
  • Home
  • Installing
    • Mac OS
    • Ubuntu
    • Windows
    • Vagrant/virtual image (any system)
  • Code
    • Github
  • Usages

    • Pipeline
    • extractor/extractorPairedEnd
    • makeSampleDirectories
    • qluster
    • processClusters
    • popClusteringViewer

    • Pipeline Wrapper
    • setupTarAmpAnalysis

    • Utilities
    • genTargetInfoFromGenomes
    • SeekDeep control mixture benchmarking
    • SeekDeep Variant Calling
  • Tutorials

    • Single End
    • Ion Torrent with MIDs

    • Illumina Paired End
    • Paired End No MIDs/Barcodes
    • Paired End With MIDs/Barcodes
  • Misc Info
    • Illumina Paired End Info
  • References
    • versions
    • References

    Contents

    • Installing with vagrant and virtualbox
      • Installing vagrant and virtualbox Ubuntu
      • Installing vagrant and virtualbox with Brew
      • Getting the SeekDeep image and set up
      • Vagrant helpful tips
        • Setting RAM and CPUs for the image
        • Shutting down the image
          • Full Shut Down
          • Shut down, save state

    • Show All Code
    • Hide All Code

    • View Source

    If you are attempting to install on a much older machine or on a machine where you can’t change much in the global environment due to numerous reason installing a virtual image which already has SeekDeep installed might work much better for you.

    Installing with vagrant and virtualbox

    back to top
    SeekDeep can also be used by downloading a virtual image with it already installed. This is done with vagrant and virtualbox.

    Installing vagrant and virtualbox Ubuntu

    back to top

    The newest vagrant is not in the Ubuntu default repositories or any ppa’s that I’m aware of so here’s how to install the deb by hand

    Code
    wget https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.deb
    sudo dpkg -i vagrant_2.2.19_x86_64.deb

    Virtual box can be installed with the usual apt-get

    Code
    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install virtualbox
    sudo apt-get install vagrant  

    Installing vagrant and virtualbox with Brew

    If you don’t have sudo rights or you can installing on Mac brew can also install vagrant and virtual box

    Code
    brew update 
    brew upgrade
    brew install vagrant
    brew install virtualbox

    Getting the SeekDeep image and set up

    back to top
    I would suggest making a directory to hold vagrant images. The SeekDeep Vagrantfile can be modified to mount a directory next to the directory where you downloaded the image where you can store the data you will be analyzing called SeekDeepData though analyzing data in this mounted directory is slow and not recommend. Instead you should analyze data in another directory.

    Code
    cd ~
    mkdir vagrantImages
    cd vagrantImages
    
    #copy data that you will be analyzing into the SeekDeepData folder 
    mkdir SeekDeepData
    cd SeekDeepData
    wget http://seekdeep.brown.edu/data/SeekDeepTutorialData/ver2_5_0/Multiplex_IT_Tutorial_Materials.tar.gz
    cd ..
    
    #create directory for the vagrant virtual image
    mkdir SeekDeep
    cd SeekDeep
    vagrant init nickjhathaway/SeekDeep
    vagrant up

    Now the above will install the base image nickjhathaway/SeekDeep and start up a machine using that image. To go into that image from within the SeekDeep directory called vagrant ssh and you will ssh into the machine and SeekDeep should be already there and ready to use. There you will also see a directory in the home directory called data. This is a shared folder with the local host and will contain everything in the SeekDeepData directory. This is a dynamically shared resource between the virtual machine and the local host so changes made on either machine will instantly change in the other location.

    Code
    cd ~/vagrantImages/SeekDeep
    vagrant ssh
    Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-40-generic x86_64)
    ....
    ....
    ....
    ....
    vagrant@SeekDeep:~$
    Code
    vagrant@SeekDeep:~$ SeekDeep
    SeekDeep
    1) extractor
    2) makeSampleDirectories
    3) processClusters
    4) qluster
    5) sffExtractor
    SeekDeepUtils
    1) dryRunQualityFiltering
    2) genProjectConfig
    3) popClusteringViewer
    4) runMultipleCommands

    You can now navigate to the data directory where the data you copied into the SeekDeepData directory will be

    Code
    vagrant@SeekDeep:~$ ls
    data
    Code
    vagrant@SeekDeep:~$ cd data
    vagrant@SeekDeep:~$ ls
    Multiplex_IT_Tutorial_Materials.tar.gz

    Also calling vagrant ssh is like sshing into any machine, once you are done with your work you can just call exit to get out of the machine and the machine will continue to run until you call vagrant halt or vagrant suspend (See below for details).

    Vagrant helpful tips

    You can see full vagrant usage here. Below are some helpful tips.

    Setting RAM and CPUs for the image

    By default the SeekDeep image will be use 4 CPUs and 8GB of RAM. To change this simply edit the Vagrantfile within the SeekDeep vagrant directory. To set the RAM and CPUs add the following any where after Vagrant.configure(2) do |config| before the last end. The file is written in ruby if you are familiar with that language.

    Code
    ....
       config.vm.provider "virtualbox" do |vb|
         vb.memory = "12288"
         vb.cpus = 8
       end
    ....

    The amount of memory is in MB so the above would allow the machine to use 8 CPUs and 12GB of RAM.
    To apply these changes to the image, first shut it down if it is running and call vagrant up again

    Code
    #Should be called within the directory initialized with the image you want to stop and restart
    cd ~/vagrantImages/SeekDeep
    #make changes to the Vagrantfile here
    vagrant halt
    vagrant up
    vagrant ssh

    Shutting down the image

    There are two different ways to shut down a running vagrant virtual image using vagrant halt and vagrant suspend. These commands should be called within the directory where the image you intend to stop was initialized in. vagrant halt will cause a full shut down without saving any sort of state information where as vagrant suspend will cause vagrant to save everything that is currently happening.

    Full Shut Down

    vagrant halt will shut down the machine and is similar to how you normally just shut down a computer

    Code
    #Should be called within the directory initialized with the image you want to stop
    cd ~/vagrantImages/SeekDeep
    vagrant halt
    ==> default: Attempting graceful shutdown of VM...

    To start up the image again just call vagrant up again

    Code
    #Should be called within the directory initialized with the image you want to start
    cd ~/vagrantImages/SeekDeep
    vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Checking if box 'nickjhathaway/SeekDeep' is up to date...
    ==> default: Clearing any previously set forwarded ports...
    ....
    ....
    ....

    Stopping the machine will cause it to no longer eat up RAM.

    Shut down, save state

    To save the current state of the image use vagrant susepnd. This could end up saving a large amount of disk space as the RAM currently being used by the virtual machine will have to be saved.

    Code
    #Should be called within the directory initialized with the image you want to stop
    cd ~/vagrantImages/SeekDeep
    vagrant suspend
    ==> default: Saving VM state and suspending execution...

    To restart a suspended image in the state saved use vagrant resume

    Code
    #Should be called within the directory initialized with the image you want to start
    cd ~/vagrantImages/SeekDeep
    vagrant resume
    ==> default: Resuming suspended VM...
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2200
        default: SSH username: vagrant
        default: SSH auth method: private key
        default: Warning: Connection refused. Retrying...
    ==> default: Machine booted and ready!

    The benefit of doing this is saving the current state of the machine but it will no longer eat up RAM.

    Source Code
    If you are attempting to install on a much older machine or on a machine where you can't change much in the global environment due to numerous reason installing a virtual image which already has SeekDeep installed might work much better for you.  
    
    # Installing with vagrant and virtualbox
    [back to top](#TOC)  
    SeekDeep can also be used by downloading a virtual image with it already installed.  This is done with [vagrant](https://www.vagrantup.com/downloads.html) and [virtualbox](https://www.virtualbox.org/wiki/Downloads).  
    
    ## Installing vagrant and virtualbox Ubuntu
    [back to top](#TOC)  
    
    The newest vagrant is not in the Ubuntu default repositories or any ppa's that I'm aware of so here's how to install the deb by hand
    ```{r, engine='bash',comment="",eval=FALSE}
    wget https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.deb
    sudo dpkg -i vagrant_2.2.19_x86_64.deb
    ```
    Virtual box can be installed with the usual apt-get 
    ```{r, engine='bash',comment="",eval=FALSE}
    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install virtualbox
    sudo apt-get install vagrant  
    
    ```
    
    ## Installing vagrant and virtualbox with Brew
    If you don't have sudo rights or you can installing on Mac brew can also install vagrant and virtual box
    
    ```{r, engine='bash',comment="",eval=FALSE}
    brew update 
    brew upgrade
    brew install vagrant
    brew install virtualbox
    ```
    
    ## Getting the SeekDeep image and set up
    [back to top](#TOC)  
    I would suggest making a directory to hold vagrant images.  The SeekDeep Vagrantfile can be modified to mount a directory next to the directory where you downloaded the image where you can store the data you will be analyzing called `SeekDeepData` though analyzing data in this mounted directory is slow and not recommend. Instead you should analyze data in another directory.    
    ```{r, engine='bash',comment="",eval=FALSE}
    cd ~
    mkdir vagrantImages
    cd vagrantImages
    
    #copy data that you will be analyzing into the SeekDeepData folder 
    mkdir SeekDeepData
    cd SeekDeepData
    wget http://seekdeep.brown.edu/data/SeekDeepTutorialData/ver2_5_0/Multiplex_IT_Tutorial_Materials.tar.gz
    cd ..
    
    #create directory for the vagrant virtual image
    mkdir SeekDeep
    cd SeekDeep
    vagrant init nickjhathaway/SeekDeep
    vagrant up
    ```
    Now the above will install the base image nickjhathaway/SeekDeep and start up a machine using that image.  To go into that image from within the SeekDeep directory called `vagrant ssh` and you will ssh into the machine and SeekDeep should be already there and ready to use.  There you will also see a directory in the home directory called data.  This is a shared folder with the local host and will contain everything in the SeekDeepData directory.  This is a dynamically shared resource between the virtual machine and the local host so changes made on either machine will instantly change in the other location.    
    ```{r, engine='bash',comment="",eval=FALSE}
    cd ~/vagrantImages/SeekDeep
    vagrant ssh
    ```
    
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-40-generic x86_64)
    ....
    ....
    ....
    ....
    vagrant@SeekDeep:~$"
    ```
    
    ```{r, engine='bash',comment="",eval=FALSE}
    vagrant@SeekDeep:~$ SeekDeep
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "SeekDeep
    1) extractor
    2) makeSampleDirectories
    3) processClusters
    4) qluster
    5) sffExtractor
    SeekDeepUtils
    1) dryRunQualityFiltering
    2) genProjectConfig
    3) popClusteringViewer
    4) runMultipleCommands"
    ```
    You can now navigate to the `data` directory where the data you copied into the `SeekDeepData` directory will be
    ```{r, engine='bash',comment="",eval=FALSE}
    vagrant@SeekDeep:~$ ls
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "data"
    ```
    ```{r, engine='bash',comment="",eval=FALSE}
    vagrant@SeekDeep:~$ cd data
    vagrant@SeekDeep:~$ ls
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "Multiplex_IT_Tutorial_Materials.tar.gz"
    ```
    Also calling vagrant ssh is like sshing into any machine, once you are done with your work you can just call exit to get out of the machine and the machine will continue to run until you call `vagrant halt` or `vagrant suspend` (See below for details).  
    
    ## Vagrant helpful tips
    You can see full vagrant usage [here](https://docs.vagrantup.com/v2/). Below are some helpful tips.  
    
    ### Setting RAM and CPUs for the image
    By default the SeekDeep image will be use 4 CPUs and 8GB of RAM.  To change this simply edit the `Vagrantfile` within the SeekDeep vagrant directory.  To set the RAM and CPUs add the following any where after `Vagrant.configure(2) do |config|` before the last `end`.  The file is written in ruby if you are familiar with that language.  
    ```{r, engine='ruby',comment="",eval=FALSE}
    ....
       config.vm.provider "virtualbox" do |vb|
         vb.memory = "12288"
         vb.cpus = 8
       end
    ....
    ```
    The amount of memory is in MB so the above would allow the machine to use 8 CPUs and 12GB of RAM.  
    To apply these changes to the image, first shut it down if it is running and call `vagrant up` again
    ```{r, engine='bash',comment="",eval=FALSE}
    #Should be called within the directory initialized with the image you want to stop and restart
    cd ~/vagrantImages/SeekDeep
    #make changes to the Vagrantfile here
    vagrant halt
    vagrant up
    vagrant ssh
    ```
    
    
    ### Shutting down the image 
    There are two different ways to shut down a running vagrant virtual image using `vagrant halt` and `vagrant suspend`.  These commands should be called within the directory where the image you intend to stop was initialized in.  `vagrant halt` will cause a full shut down without saving any sort of state information where as `vagrant suspend` will cause vagrant to save everything that is currently happening.
    
    #### Full Shut Down
    `vagrant halt` will shut down the machine and is similar to how you normally just shut down a computer
    ```{r, engine='bash',comment="",eval=FALSE}
    #Should be called within the directory initialized with the image you want to stop
    cd ~/vagrantImages/SeekDeep
    vagrant halt
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "==> default: Attempting graceful shutdown of VM..."
    ```
    To start up the image again just call `vagrant up` again 
    ```{r, engine='bash',comment="",eval=FALSE}
    #Should be called within the directory initialized with the image you want to start
    cd ~/vagrantImages/SeekDeep
    vagrant up
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Checking if box 'nickjhathaway/SeekDeep' is up to date...
    ==> default: Clearing any previously set forwarded ports...
    ....
    ....
    ...."
    ```
    Stopping the machine will cause it to no longer eat up RAM.  
    
    #### Shut down, save state
    To save the current state of the image use `vagrant susepnd`.  This could end up saving a large amount of disk space as the RAM currently being used by the virtual machine will have to be saved. 
    ```{r, engine='bash',comment="",eval=FALSE}
    #Should be called within the directory initialized with the image you want to stop
    cd ~/vagrantImages/SeekDeep
    vagrant suspend
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "==> default: Saving VM state and suspending execution..."
    ```
    To restart a suspended image in the state saved use `vagrant resume` 
    ```{r, engine='bash',comment="",eval=FALSE}
    #Should be called within the directory initialized with the image you want to start
    cd ~/vagrantImages/SeekDeep
    vagrant resume
    ```
    ```{r, engine='bash',comment="",eval=TRUE, echo =FALSE}
    echo "==> default: Resuming suspended VM...
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2200
        default: SSH username: vagrant
        default: SSH auth method: private key
        default: Warning: Connection refused. Retrying...
    ==> default: Machine booted and ready!"
    ```
    The benefit of doing this is saving the current state of the machine but it will no longer eat up RAM.