This repository contains a collection of Python scripts and tools for various bioinformatics analyses. The tools are designed to help with tasks such as sequence manipulation, alignment analysis, gene extraction, and visualization.
The scripts require the following dependencies:
- Python 3.x
- Biopython
- BLAST+
- ClustalW2
- SAMtools (for BAM file processing)
To install Python dependencies:
pip install biopythonFor system tools (on macOS):
brew install blast
brew install clustalw
brew install samtoolsbioinformatic_tools.py: Main utility script with various bioinformatics functionscreate_indices.sh: Script for creating genome indicesextract_sequence_from_bam.sh: Script for extracting sequences from BAM filessnpb_script.py: Script for SNP analysisFix-alignments.ipynb: Jupyter notebook for fixing sequence alignments
Circosplt-Map_contig_to_chrom/: Tools for mapping contigs to chromosomes and circular genome visualisationFindHaplotypesIsoforms/: Scripts for identifying haplotypes and isoformsPrimerMSAplot/: Multiple sequence alignment plottingSIZ1_domains/: Analysis tools for SIZ1 protein domains and visualisationTreeBuilding/: Scripts for phylogenetic tree constructionUpsetPlot/: Tools for creating UpSet plotsfix-marple-genes/: Scripts for fixing gene annotationssearch_for_old_genes/: Tools for finding genes from one genome assembly in anotherCheckPrimerOffTargets/: Search for off targets of primer pairs in reference sequence
- Nucleotide to Amino Acid Translation
python bioinformatic_tools.py -t nt_to_aa -i <input_fna>- Gene Extraction
python bioinformatic_tools.py -t get_gene -g <input_gff> -f <input_fna> -c <gene_name>- Sequence Alignment
python bioinformatic_tools.py -t align -1 <input_fna1> -2 <input_fna2> [-r nt/aa]- BLAST Analysis
python bioinformatic_tools.py -t blast -q <query> -s <subject> [-r blastn/megablast] [-g <annotation_gff>]- CDS Extraction
python bioinformatic_tools.py -t extract_cds -g <input_gff> -f <input_fna>- Creating Genome Indices
bash create_indices.sh --refPath <reference_genome_directory> --refGenomeName <reference_genome_fasta> --refDescriptionName <reference_gff>- Extracting Sequences from BAM Files
bash extract_sequence_from_bam.sh <input.bam>This directory contains tools for mapping contigs to chromosomes and creating circular genome visualizations.
- Gene Extraction and Mapping
Extract the sequence of the genes of interest using
extract-genes.py, from the old reference assembly.
python extract-genes.py- Circos Plot Generation
After obtaining the
.gbfffile of the new assembly with chromosome description, useblast_gbff_plot_genes_in_chr.ipynbto map and visualise the genes in a circos plot.
- Open
blast_gbff_plot_genes_in_chr.ipynbin Jupyter Notebook - Follow the notebook instructions to generate circular genome plots
- Output will be saved as PDF files (e.g.,
RKQQC_circos.pdf)
Tools for identifying haplotypes and isoforms in gene sequences. This uses the consensus sequence of several isolates, following variant calling analysis.
- Haplotype Identification
- Open
gene_haplotype_identify.ipynbin Jupyter Notebook - Follow the notebook instructions to analyze gene sequences and identify haplotypes
Tools for multiple sequence alignment visualisation.
- MSA Visualization
- Open
fung-viz-msa.ipynbin Jupyter Notebook - Follow the notebook instructions to create multiple sequence alignment plots
Scripts for phylogenetic tree construction and sequence analysis.
- Tree Building Pipeline
sbatch tree_pipeline.sh -i <consensus_directory> -s <minimum percentage of known bases in a sequence for acceptance; suggested: 80> -l <minimum number of accepted samples percentage; suggested: 80>Tools for creating UpSet plots to visualize set intersections.
- UpSet Plot Generation
- Open
upset.ipynbin Jupyter Notebook - Load your data in CSV format (see
mock_data.csvfor example) - Follow the notebook instructions to generate UpSet plots
- Output will be saved as SVG files (e.g.,
upsetplot.svg)
Analysis tools for SIZ1 protein domains.
- Domain Analysis
- Navigate to the SIZ1_domains directory
- Follow the specific instructions in the directory for domain analysis
Scripts for fixing gene annotations.
- Gene Annotation Fixing
- Navigate to the fix-marple-genes directory
- Follow the specific instructions in the directory for fixing gene annotations
Tools for legacy gene identification. For instructions see scripts/instructions.md.
- Legacy Gene Search
- Navigate to the search_for_old_genes directory
- Follow the specific instructions in the directory for searching legacy genes
Script to search for off-targets of primer pairs in a reference assembly.
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is open-source and available for use by the bioinformatics community.
Please ensure you have all required dependencies installed before running the scripts. Some scripts may require specific input file formats or additional configuration. Check the individual script documentation for specific requirements.