从 PacBio 组装中查找、循环化和标注基因组
------ This is v3.2.2 ------
MitoHiFi v3.2.2 is a python pipeline distributed under MIT License !
MitoHiFi was first developed to assemble the mitogenomes for a wide range of species in the Darwin Tree of Life Project (DToL)
MitoHiFi is a python workflow that assembles mitogenomes from Pacbio HiFi reads.
With MitoHiFi v3.2 you can start from the raw Pacbio HiFi reads (flag -r) or from the assembled contigs (flag -c). You also need a reference mitochondria sequence in FASTA and GenBank format. We provide an internal script (findMitoReference.py) that can be used to find and download the most closely-related reference genome for your species from NCBI..
The availability of high-quality long reads, such as PacBio HiFi, greatly simplifies the assembly of accurate mitogenomes. However, due to the circular nature of the molecule, mitogenomes are typically assembled redundantly, resulting in multicopy mitogenome contigs. To address this, we have developed a pipeline specifically designed to finalize the assembly and the annotation of the mitogenome. Our pipeline takes into account heteroplasmy, aiming to assemble and annotate all mtDNA variants present in your sample. Among these variants, MitoHiFi selects a representative as the final genome assembly based on several criteria including circularization and gene completeness. Additionally, MitoHiFi provides multiple intermediate outputs such as coverage and annotation plots and a multiple sequence alignment (MSA) of all the variants, which facilitates the analysis of mitochondrial heteroplasmy.
MitoHiFi v3.2 will:
(i) Extract mitochondrial reads and assemble them with hifiasm (using the -r flag) or identify mitochondrial contigs among assembled contigs (using the -c flag).
(ii) Identify and separate NUMTS (Nuclear Mitochondrial DNA Sequences) from genuine mitogenome contigs.
(iii) Generate a circularized, non-redundant, and annotated version of all mitochondrial variants present in your sample.
(iv) Select a representative as the final mitochondrial genome assembly.
(v) Plot an annotation image and a coverage plot of the reads (if initiated with the -r flag).
You can view a diagram illustrating the general MitoHiFi workflow here. For documentation on the behaviour of each script visit here.
Below, we describe the three different ways to install MitoHiFi.
We provide a Docker container for MitoHiFi. The container is built using GitHub Actions and can be obtained by running the following command:
docker pull ghcr.io/marcelauliano/mitohifi:masterOnce the container is pulled, you can execute MitoHiFi within Docker. If Docker is not available on your cluster computer, you can use Singularity instead. Different environments may require slightly different Singularity parameters, but a generic Singularity command would be as follows:
singularity exec --bind /path/to/container_directory:/path/to/container_directory docker://ghcr.io/marcelauliano/mitohifi:master mitohifi.py -hWe are unable to create a complete Conda recipe for MitoHiFi due to conflicting Python versions required by different dependencies, making it impossible to coexist within the same Conda environment. However, we provide a partial Conda recipe that installs most of the dependencies. To complete the installation, follow these steps:
#Clone MitoHiFi git repo
git clone https://github.com/marcelauliano/MitoHiFi.git
#create a conda environment with our yml file that is inside MitoHiFi/environment
conda env create -n mitohifi_env -f MitoHiFi/environment/mitohifi_env.yml Add MitoFinder and/or MITOS to the PATH and then activate your mitohifi_env conda environment.
To run MitoHiFi, do:
(mitohifi_env) python MitoHiFi/src/mitohifi.py -hThis is the least recommended way to install MitoHiFi, but below you will find a list of software that needs to be installed and added to your PATH before installing MitoHiFi. The software versions provided are the latest ones we have tested and confirmed to be working:
Once all dependencies are installed and in your PATH, git clone MitoHiFi and execute it:
git clone https://github.com/marcelauliano/MitoHiFi.git
python MitoHiFi/src/mitohifi.py -h…To run MitoHiFi, you first need a closely related mitochondrial sequence in both FASTA and GenBank formats. We provide a script that can assist you in retrieving this data from the NCBI database. When provided with the species name you are assembling, the script will search for the nearest available mitochondrial assembly on NCBI. By default, the script looks for an exact match of the species for an available mitochondrial assembly. If an exact match is not found, it continues the search for a phylogenetically close candidate based on NCBI taxonomy.
Using the file ilDeiPorc1.reads.100.fa in our test data as an input example, you would do:
findMitoReference.py --species "Deilephila porcellus" --outfolder /path/to/outputdir --min_length 14000This command will download OQ694980.1.fasta and OQ694980.1.gb that you should use for flags -f and -g in the main pipeline. Attention: once the NCBI is updated with more mitogenomes, findMitoReference.py might download something else.
Now run MitoHiFi with 4 CPUs (change -t to change CPU numbers):
python mitohifi.py -r MitoHiFi/tests/ilDeiPorc1.reads.100.fa -f OQ694980.1.fasta -g OQ694980.1.gb -t 4 -o 5 To test starting from contigs, you are going to use the file MitoHiFi/test/ilPhaBuce1_contig.fa . For that, first you need to download a reference close to that species. For that, do:
findMitoReference.py --species "Phalera bucephala" --outfolder /path/to/outputdir --min_length 14000Once the close reference is downloaded, run MitoHiFi:
python mitohifi.py -c MitoHiFi/tests/ilPhaBuce1_contig.fa -f NC_072273.1.fasta -g NC_072273.1.fasta -t 4 -o 5 MitoHifi will produce a series of folders with the results. The main results will be in your working folder and they are:
Folder contigs_filtering will contain three outputs:
Columns descriptions of parsed_blast.txt and parsed_blast_all.txt: tab separated files with 4 columns as follows
- qseqid - the ID of your input contigs
- %q_in_match - a percentage of the length of your contig in a blast match with the close related species reference
- leng_query - length of your contig
- s_length - lenght of the close-related mitogenome given
- perc - how much percente the leng_query is in relation to s_lengthFolder contigs_circularization will contain files related to the circularization of the mito contigs. The most important file is
Folder potential_contigs will contain a folder for each contig present in parsed_blast.txt. Within each contig folder you will find the circularized and annotated mitosequence for that contig.
Folder final_mitogenome_choice will contain a few files, the most important one is
Folder coverage_mapping will contain bam files for a quick inspection on IGV-like softwares, the most important are:
If you run the pipeline with flag -r you will have a further folder called reads_mapping_and_assembly which will contain
MitoHiFi is still not optmized to assemble a plant mitochondria or chloroplast. But if you have a contig you consider to be one of those, you can use MitoHiFi with the flag -c to finalize your organelle! It will circularize (if that is the case) and annotate, and output statistics for you. To do this, you need to use the parameter -a plant when calling the main script mitohifi.py .
Also, the script findMitoReference.py can now search for a chloroplast instead of a mitochondria. Use flag -t chloroplast
暂无开放 Issues,或尚未同步最近议题。