Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

motif-mark

This tool visualizes motifs along a gene in a .png image. The output shows a horizontal line representing the gene’s relative length (introns), a black box marking the exon, and colored bars indicating motif locations. When motifs overlap, they are vertically offset while remaining aligned to their correct genomic position.

Motif-mark works with both DNA and RNA sequences. One .png image is generated per FASTA file, with a single key representing all motifs in the figure. Figure width and height dynamically increases/adjusts with each gene.

The tool supports motifs containing ambiguous nucleotides, multiple sequences, and multiple motifs (requirements listed below). If more than 5 motifs are included, the image or key may become cluttered. Additionally, motif colors beyond the 10th motif are generated randomly. Sequences longer than 1000 bases may appear compressed in the output image, reducing clarity.

Currently, this program assumes a simple gene structure of Intron, Exon, Intron and requires a Python ≥ 3.10 environment with pycairo 1.29.0. Installation instructions can be found here.

Usage

Required inputs are a FASTA file (≤1000 bases per sequence recommended) and a motifs file (.txt) containing one motif per line (≤10 bases per motif recommended).

Run the script as follows:

./motif-mark-oop.py \
    -f <fasta.fasta> \
    -m <motifs.txt> \
    -pw <optional starting width> \
    -ph <optional starting height> \
    -o <optional output name> \
    -r <optional mini report>

Note: Default output name is FASTA filename.

Arguments

Use -h or --help to display the help message.

Flag Long Option Description Required
-f --fastafile Input FASTA file path (seqs ≤1000 bases) Yes
-m --motifsfile Input motifs .txt file path (≤10 bases each, one motif per line) Yes
-pw --pngwidth Starting width for output.png No
-ph --pngheight Starting height for output.png No
-o --outfile Output filename (defaults to FASTA input name) No
-r --report Print Mini Report (Y: Yes, N: No) No


Please raise an issue if you encounter any bugs. Thank you!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages