cdna_classifier.py command not found

In this troubleshooting guide we learn how to fix cdna_classifier.py command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

cdna_classifier.py: command not found

or when using sudo you get the following error message

sudo: cdna_classifier.py: command not found

Solutions to cdna_classifier.py: command not found

How To Fix cdna_classifier.py: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu cdna_classifier.py is provided by python3-pychopper package.

python3-pychopper is:

Pychopper v2 is a Python module to identify, orient and trim full-length Nanopore cDNA reads. It is also able to rescue fused reads and provides the script ‘cdna_classifier.py’. The general approach of Pychopper v2 is the following:

  • Pychopper first identifies alignment hits of the primers across the length of the sequence. The default method for doing this is using nhmmscan with the pre-trained strand specific profile HMMs, included with the package. Alternatively, one can use the edlib backend, which uses a combination of global and local alignment to identify the primers within the read.
  • After identifying the primer hits by either of the backends, the reads are divided into segments defined by two consecutive primer hits. The score of a segment is its length if the configuration of the flanking primer hits is valid (such as SPP,-VNP for forward reads) or zero otherwise.
  • The segments are assigned to rescued reads using a dynamic programming algorithm maximizing the sum of used segment scores (hence the amount of rescued bases). A crucial observation about the algorithm is that if a segment is included as a rescued read, then the next segment must be excluded as one of the primer hits defining it was “used up” by the previous segment. This put constraints on the dynamic programming graph. The arrows in read define the optimal path for rescuing two fused reads with the a total score of l1 + l3.

A crucial parameter of Pychopper v2 is -q, which determines the stringency of primer alignment (E-value in the case of the pHMM backend). This can be explicitly specified by the user, however by default it is optimized on a random sample of input reads to produce the maximum number of classified reads.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-pychopper

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-pychopper.

sudo apt -y install python3-pychopper

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-pychopper

Summary

In this tutorial we learn how to fix cdna_classifier.py command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.