Skip to content

fasta GC content

masikol edited this page Oct 18, 2022 · 5 revisions

fasta-GC-content

Description

Script calculates GC-content of each sequence in *.fasta(.gz) or *.fa(.gz) file(s).

In the end, script prints summary:

  1. Total length of sequences processed.
  2. Min, max and mean coverage (if SPAdes assembly file is processed).

Dependencies

The script is written in Python, so you need Python interpreter (version 3.X) to use it. Here you can download Python.

Explanation of output files

Each input file corresponds to single output file.

In ouput files, GC-content and length of each sequence is written, as well as summary in the end of file.

Options

-h (--help): print help message;

-v (--version): print version;

Examples

Following command will process files some_file.fasta and another_file.fa.gz:

python3 fasta-GC-content.py some_file.fasta another_file.fa.gz

Following command will process all *.fasta(.gz) and *.fa(.gz) files in the working directory:

python3 fasta-GC-content.py
Clone this wiki locally