Skip to content

Launch BlobToolsKit viewer via JupyterHub Virtual Desktop

1. Install

  1. Start a Jupyter server session via https://jupyter.nesi.org.nz/.

    • Ideally with 4CPUs and 8GB of memory
  2. Click Virtual Desktop icon

    image

  3. Open a Terminal session on Virtual Desktop and procees with the installation

    • Installation can be done via any terminal and not restricted to virtual desktop terminal

    • change path to nobackup as we are going to create a python virtual environment which will consume a reasonable amount of Inodes.

      cd /nesi/nobackup/nesi12345/
      

    • Load a python module
      module purge
      module load Python/3.10.5-gimkl-2022a
      
    • Create a virtual environment
      python -m venv blobtools2
      
    • Activate the environment
      source blobtools2/bin/activate
      
    • Install blobtoolkit[full] (& couple of other dependencies which will be needed for creating datasets beyond the tutorial)
      pip install blobtoolkit[full] sniffio async_generator 
      
    • Although installing [ful] should take care of the extensions, we recommend installing [host] as a standalone command
      pip install blobtoolkit[host]
      

2. Create a sample dataset and test

These instructions are extracted from the official BlobToolKit support documentation

  • Choose a path in nobackup as the working directory
    mkdir -p blobtools_tutorial && cd blobtools_tutorial
    
  • Download a sample .fast file
    curl ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/001/028/725/GCA_001028725.1_S_venezuelensis_HH1/GCA_001028725.1_S_venezuelensis_HH1_genomic.fna.gz | gunzip -c > ASSEMBLY_NAME.fasta
    
  • Create a meta file for viewer
    assembly:
      accession: GCA_001028725.1
      alias: S_venezuelensis_HH1
      bioproject: PRJEB530
      biosample: AMD00012916
      record_type: contig
    taxon:
      name: Strongyloides venezuelensis
    
  • Create the dataset
    blobtools create --fasta ASSEMBLY_NAME.fasta --meta ASSEMBLY_NAME.yaml --taxid 75913 --taxdump ${PWD}/taxdump ${PWD}/DATASETS/ASSEMBLY_NAME
    

Launch BlobToolKit viewer

  • Make sure the working directory contains the DATASET/ directory and the input files.
  • Once verify, run

    blobtools host --port 8081 --api-port 8001 --hostname localhost ${PWD}/DATASETS
    

    • If this triggers an error along the lines of ERROR: Port 8001 already in use, unable to host BlobtoolKit API...change the port id
  • If all goes well, it should trigger a message similar to below image

  • Copy the URL appears alongside Visit.. .i.e. Visit http://localhost:8081 to use the interactive BlobToolKit Viewer
  • Open a Web Browser on Virtual Desktop by either clicking on the Globe icon on the bottom tool bar OR `Applications on top left corner > Internet > Web Browser

  • Paste the copied http://localhost:8081 URL on firefox address bar image