Skip to content

3. Usage

Andreas Sjödin edited this page Oct 4, 2023 · 5 revisions

How to Use Nanometa Live

This tutorial offers step-by-step guidance on using Nanometa Live. For hands-on practice, example files and a slimmed-down GTDB database are available for download from Figshare.

Prerequisites

  1. Activate the Conda Environment
mamba activate nanometa_live_env

Initial Setup

  1. Initialize a New Project

Utilize the nanometa-new command to set up your project directory.

working_dir=YOUR_PROJECT_PATH
species_file=SPECIES_FILE_PATH
kraken_folder=KRAKEN_DB_PATH
fastq_folder=NANOPORE_OUTPUT_PATH
kraken_tax=gtdb_or_ncbi

nanometa-new --path ${working_dir} --species_of_interest ${species_file} --nanopore_output_directory ${fastq_folder} --kraken_db ${kraken_folder} --kraken_taxonomy ${kraken_tax}
  • Refer to the "Setting species of interest" section for guidelines on the species_file format.

  • For a comprehensive explanation of each parameter, consult the "Config file settings" section.

3.Modify Configuration Settings (Optional) If you wish to customize the analysis parameters further, open the configuration file generated in your project directory. Make any necessary changes and save the file.

Data Preparation

  1. Prepare BLAST Databases

Execute nanometa-prepare to initialize your analysis and fetch the reference sequences for your target species.

nanometa-prepare --path ${working_dir} --mode [MODE]

Available Modes:

  • gtdb-api: Fetch species via GTDB API (default)
  • gtdb-file: Use a GTDB metadata file
  • local-species: Use local fasta files in indata subfolder, named as species.fasta (e.g., Escherichia coli.fasta)
  • local-taxid: Use local fasta files in indata subfolder, named as taxids.fasta (e.g., 14.fasta)

💡 Tip: You can also run nanometa-prepare without flags inside the project directory containing the config file.

Offline Support: After this step, an internet connection is optional unless you need to update your species list.

Run Analysis

  1. Initiate Nanopore Sequencing

Ensure the output directory on your Nanopore sequencer aligns with the directory specified in your settings.

  1. Launch Nanometa Live

Run nanometa-live to start the program. This can be started before sequencing begins.

nanometa-live -p ${working_dir}

💡 Tip: You can also run nanometa-live without flags inside the project directory containing the config file.

To access the GUI, you may need to click or ctrl + click the port link displayed in the terminal.

  1. Navigating the GUI

For a comprehensive understanding of the Graphical User Interface (GUI), refer to the "Graphical User Interface" section. Within the GUI, INFO/HELP buttons and tooltips provide quick insights into functionality.

To shut down the program, use the Shut down program button. This will open a prompt allowing you to halt the program processes. Note that the browser window must be closed separately. If closed prematurely, the browser window can be re-opened via the initial port link.

Post-Analysis

Access Stored Results

The results from classification and validation are stored in the project directory and can be re-examined at any time using the nanometa-gui command.

nanometa-gui -p ${working_dir}

💡 Tip: Alternatively, you can simply run nanometa-gui in the project directory where the config file exists.

The data is stored in files in the project directory, including:

  • Kraken2 report.
  • BLAST validation results.

Re-run Workflow

If needed, the backend workflow can be run again using nanometa-backend. This requires the Nanopore batch files to be unchanged, however, otherwise information such as timestamps might be distorted.

nanometa-backend -p ${working_dir}

💡 Tip: Alternatively, you can simply run nanometa-backend in the project directory where the config file exists.

Alternative: Utilizing Nanometa Demo

In circumstances where setting up an entire project from the ground up might seem cumbersome or time-intensive, especially for new users or for testing purposes, nanometa-demo serves as a swift alternative. This command aids in establishing a demo project bundled with tutorial data, thus offering an easy route to delve into the functionalities of Nanometa Live.

Getting Started with Nanometa Demo

To kickstart the demo project, employ the nanometa-demo command. This command not only sets up the project directory but also fetches the necessary tutorial data for immediate exploration.

Advantages:

  • Ease of Use: Particularly beneficial for novices or those aiming to swiftly test new features in a controlled setting.
  • Instant Setup: Eliminates the need for manual data preparation or project setup, thus accelerating the familiarization process with Nanometa Live.
  • Self-Contained: The demo project is self-contained with essential tutorial data, enabling users to explore and understand the core functionalities without additional setups.

Practical Steps:

  1. Run the Command:

    Execute the nanometa-demo command, specifying the path where you desire the demo project to be created. If the path is omitted, the current working directory is used.

    nanometa-demo -p ${working_dir}
  2. Exploration:

    Once the demo project is set up, navigate through the project directory to examine the files and structures created. This setup mimics a real project scenario, providing a practical understanding of how Nanometa Live operates.

  3. Utilizing Nanometa Live:

    With the demo project in place, utilize the nanometa-live or other relevant commands as discussed in the main tutorial to interact with the project, analyze the tutorial data, and understand the results generated.

By integrating nanometa-demo into your workflow, you can swiftly transition from setup to exploration, thus enhancing your grasp of Nanometa Live’s capabilities with minimal setup overhead.