How To Install pyfastx on Debian 12

Learn how to install pyfastx on Debian 12 with this tutorial. pyfastx is fast random access to sequences from FASTA/Q file - command

Introduction

In this tutorial we learn how to install pyfastx on Debian 12.

What is pyfastx

pyfastx is:

The pyfastx is a lightweight Python C extension that enables users to randomly access to sequences from plain and gzipped FASTA/Q files. This module aims to provide simple APIs for users to extract sequence from FASTA and reads from FASTQ by identifier and index number. The pyfastx will build indexes stored in a sqlite3 database file for random access to avoid consuming excessive amount of memory. In addition, the pyfastx can parse standard (sequence is spread into multiple lines with same length) and nonstandard (sequence is spread into one or more lines with different length) FASTA format.

It features:

  • a single file for the Python extension;
  • lightweight, memory efficient FASTA/Q file parsing;
  • fast random access to sequences from gzipped FASTA/Q file;
  • sequences reading from FASTA file line by line;
  • N50 and L50 calculation of sequences in FASTA file;
  • GC content and nucleotides composition calculation;
  • reverse, complement and antisense sequences extraction;
  • excellent compatibility: support for parsing nonstandard FASTA file;
  • support for FASTQ quality score conversion;
  • a command line interface for splitting FASTA/Q file.

This package provides the command line interface.

There are three methods to install pyfastx on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install pyfastx Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install pyfastx using apt-get by running the following command:

sudo apt-get -y install pyfastx

Install pyfastx Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install pyfastx using apt by running the following command:

sudo apt -y install pyfastx

Install pyfastx Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install pyfastx using aptitude by running the following command:

sudo aptitude -y install pyfastx

How To Uninstall pyfastx on Debian 12

To uninstall only the pyfastx package we can use the following command:

sudo apt-get remove pyfastx

Uninstall pyfastx And Its Dependencies

To uninstall pyfastx and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove pyfastx

Remove pyfastx Configurations and Data

To remove pyfastx configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge pyfastx

Remove pyfastx configuration, data, and all of its dependencies

We can use the following command to remove pyfastx configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge pyfastx

Dependencies

pyfastx have the following dependencies:

References

Summary

In this tutorial we learn how to install pyfastx package on Debian 12 using different package management tools: apt, apt-get and aptitude.