Skip to content

Instantly share code, notes, and snippets.

@IdoBar
Last active February 25, 2020 03:50
Show Gist options
  • Save IdoBar/90598f902782ec7c291d613d0b1b5513 to your computer and use it in GitHub Desktop.
Save IdoBar/90598f902782ec7c291d613d0b1b5513 to your computer and use it in GitHub Desktop.
Setting up a new computer for scientific and bioinformatics data analysis

Setting up a new computer for scientific and bioinformatics data analysis

Follow these instructions to setup a new computer with commonly used tools and software for scientific data analysis (with emphasis on bioinformatics)

Windows machine

Use https://ninite.com/ to install the following open source software:

  1. FileZilla - FTP file transfer
  2. Firefox - web browser, add cliget addon for easy curl/wget download links
  3. PuTTY - remote shell access
  4. Java 8
  5. .NET - framework needed for Paint.net
  6. Inkscape - vector based graphic editing software
  7. Notepad++ - powerful text editor (with syntax highlighting)
  8. Peazip/7-zip - archive management
  9. VLC - media player

Reboot and then install also:
10. Paint.net - image editing

Additional manual installations:

Update (26/09/2017)
Starting from Firefox (v54+), latest versions of Zotero (v5.0) must be installed as a standalone program (rather than a Firefox add-in).

  1. Add Zotero for Firefox, along with relevant references, citation styles and better-biblatex plugin (to be installed from file in Zotero, not Firefox)
  2. Add Putty colour and fonts template into registry from putty_theme.reg
  3. Download and install R and Rstudio, along with RTools, following these instructions (install as admin)
    Optional: Download my suggested .Rprofile into Documents\R folder and util.R into Documents\R\source folder
  4. Download and install Bioedit - sequence alignment and manipulation
  5. Download and install Fiji - scientific image processing (microscopy, gel, etc.)
  6. Download and install Git for windows - version control
  7. Download PDF-Xchange Editor (academic licence can be purchased with a 50% discount)

Linux machine

Install pyenv

Follow the very simple instructions from the GitHub repo

curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
echo 'export PATH="~/.pyenv/bin:$PATH"' >> ~/.bash_profile    # or ~/.profile on RedHat systems
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile      # or ~/.profile on RedHat systems
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile     # or ~/.profile on RedHat systems
source ~/.bash_profile     # start a new shell (use ~/.profile on RedHat systems)
pyenv install miniconda-latest
pyenv global miniconda-latest

Install software using conda

conda install fonts-continuum libgcc libuuid pandoc qt scipy ncurses readline git # libgd
# conda install -c conda-forge tmux
conda install -c bioconda blast crb-blast salmon snap-aligner busco biopython trim-galore bedtools parafly \
blat bbmap bowtie bowtie2 hisat2 segemehl star bwa cd-hit cutadapt trimmomatic exonerate express samtools \
picard transdecoder trinity trinotate transrate-tools parallel khmer libdb stacks gawk rsem bioawk perl-bioperl \
qualimap perl-vcftools-vcf kallisto fastqc multiqc # perl-threaded perl-bioperl  perl-vcftools-vcf
conda install -c biobuilds oases tassel
conda install -c ipyrad ipyrad
conda install -c r r-base r-rstudioapi rstudio

Install plenv

Follow the very simple instructions from my Gist

Install Renv (not needed if R is installed through Conda)

Follow the very simple instructions from the GitHub repo

git clone git://github.com/viking/Renv.git ~/.Renv
echo 'export PATH="~/.Renv/bin:$PATH"' >> ~/.bash_profile    # or ~/.profile on RedHat systems
echo 'eval "$(Renv init -)"' >> ~/.bash_profile    # or ~/.profile on RedHat systems
mkdir -p ~/.Renv/plugins && cd !$
git clone git://github.com/viking/R-build.git 
# Install a new R
# Install linux dependencies
sudo apt-get install libreadline6 libreadline6-dev gfortran libpcre3-dev libcurl4-gnutls-dev libxml2-dev libssh2-1-dev
Renv install -l # list available versions
Renv install 3.4.0
Renv global 3.4.0

Download .Rprofile and util.R from my Gist into ~/R/ folder (~/R/Documents on Windows)

mkdir -p ~/R/source  
curl -L -o ~/.Rprofile https://gist.githubusercontent.com/IdoBar/222ab8c0d10481f793dc54f4dc857d0e/raw/5fd2ceebeb5292253b5ef01fef83b761e1b3dc91/.Rprofile 
curl -L -o ~/R/source/util.R https://gist.githubusercontent.com/IdoBar/7f63547158ecdbacf31b54a58af0d1cc/raw/1586455e0538141a027e2938d20beb109d11c3c0/util.R 
@IdoBar
Copy link
Author

IdoBar commented Sep 25, 2017

Added gawk to conda install and update Zotero and Firefox status

@IdoBar
Copy link
Author

IdoBar commented Jul 18, 2018

Added extra packages and modified to suit Ubuntu systems rather than RHEL

@alexgreenlon
Copy link

Hi! Thanks so much for your quick guide on setting up a new computer for bioinformatics. It's been very useful for me. One thing I noticed though is that when I uninstall a package through conda (e.g. conda uninstall samtools) and re-install a program at the system level (e.g. in /usr/local/bin/) my terminal still searches for the program in the pyenv installation of conda. Example:

$ ls /usr/local/bin/samtools
/usr/local/bin/samtools
$ conda uninstall samtools
$ samtools
-bash: $HOME/.pyenv/shims/samtools: No such file or directory

I can't seem to find an easy way to stably remove the pyenv shim for such programs (I've even tried rm $HOME/.pyenv/shims/samtools but it comes back somehow). Do you have any ideas?

@IdoBar
Copy link
Author

IdoBar commented Apr 24, 2019

Hi @alexgreenlon,
Sorry for seeing this only now, but for anyone coming across this in the future, my preferred solution would be to run pyenv rehash to update your shims.
Alternatively you could place a symlink to your preferred samtools binary in $HOME/bin and make sure that it is loaded into the PATH before $HOME/.pyenv/bin/ (by running ln -s /usr/local/bin/samtools $HOME/bin/; echo 'export PATH="$HOME/bin:$PATH" ' >> $HOME/.bash_profile ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment