Skip to content

Working with EnsemblLite and Cogent3

GavinHuttley edited this page Jun 28, 2024 · 5 revisions

Working with EnsemblLite and Cogent3 environment

Note The images below are from an earlier workshop, so container and filenames may differ.

  1. Open VS Code
  2. Select "Open Folder" from the File menu
  3. Navigate to the Cogent3_Workshop_2024 folder and select it
  4. Select "Open" to open the folder
  5. Select "Reopen in Container" when prompted, or if that times out you can invoke "reopen in container" from the Remote Explorer menu which can be invoked from the icon at the bottom left of the VS Code window that looks like . !
  6. VS Code will now build the container and install cogent3 and all of its dependencies. This may take a few minutes (from 1 to 10 in our experience across a variety of laptops). This delay should only be required the first time you open the container in VS Code.
  7. When the container is ready, you will see the remote status (see #1 below) change to Cogent3 Workshop. ! The terminal prompt should identify that you are in the (C3) virtual environment (see #2 below) !
  8. You can now open the sample notebook by selecting it from the file explorer on the left of the VS Code window. You can also create a new notebook by selecting "New Notebook" from the File menu. When you load a notebook, VS code should select the Cogent3 Workshop kernel for you. If it does not, you can select it from the kernel menu (see #3 above).
  9. Note that the sample notebook includes a cell that imports cogent3, and prints out it's version. If you can run that cell without error, then you have successfully configured your environment and are ready for the workshop. !

Download Screencasts

Working with Cogent3 on Mac

Working with Cogent3 on Mac

Working with Cogent3 on Linux

Working with Cogent3 on Linux

Expanding the downloaded data for the great apes

Within the terminal of VS Code connected to the cogent3 VM, change into the data directory.

$ cd ~/workshop/data

then decompress and untar the archive.

$ tar zxf apes_112.tar.gz 

This will take a couple of minutes (depending on your laptop). It will print some warnings to screen (e.g. "tar: Ignoring unknown...", ignore them.

Sending a file to the Cogent3 environment

Now you can Send files to the workshop environment to work with.