diff --git a/.github/workflows/github-actions-build-code.yml b/.github/workflows/github-actions-build-code.yml index 6578b04..341968e 100644 --- a/.github/workflows/github-actions-build-code.yml +++ b/.github/workflows/github-actions-build-code.yml @@ -1,9 +1,9 @@ name: Build and Publish MitoHiFi code -on: workflow_dispatch - # push: - # branches: - # - 'reviews' +on: #workflow_dispatch + push: + branches: + - 'reviews' env: diff --git a/.github/workflows/github-actions-integration-test.yml b/.github/workflows/github-actions-integration-test.yml index 6427bb7..ea20e70 100644 --- a/.github/workflows/github-actions-integration-test.yml +++ b/.github/workflows/github-actions-integration-test.yml @@ -1,9 +1,9 @@ name: MitoHiFi Integration Test -on: #workflow_dispatch - push: - branches: - - 'reviews' +on: workflow_dispatch + # push: + # branches: + # - 'reviews' jobs: integration_test: diff --git a/README.md b/README.md index 6b43c35..40f4136 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MitoHiFi ------- This is v3.0.0 ------- +------ This is v3.2 ------- MitoHiFi is a python pipeline distributed under the [MIT License](LICENSE) @@ -15,7 +15,7 @@ Find out more [Darwin Tree of Life data portal](https://portal.darwintreeoflife. ## 1. Background **MitoHiFi is a python workflow that assembles mitogenomes from Pacbio HiFi reads.** -With MitoHiFi v3.0.0 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](https://www.ncbi.nlm.nih.gov/Sitemap/samplerecord.html). 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. +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](https://www.ncbi.nlm.nih.gov/Sitemap/samplerecord.html). 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. @@ -23,7 +23,7 @@ With MitoHiFi v3.0.0 you can start from the raw Pacbio HiFi reads (flag **-r**) -MitoHiFi v3.0.0 will: +MitoHiFi v3.2 will: (i) extract mito reads and assemble them with hifiasm (flag **-r**), or find the mito contigs among assembled contigs (flag **-c**)
@@ -39,7 +39,7 @@ MitoHiFi v3.0.0 will: ## 2. Installation -There are two ways to install MitoHiFi v3.0.0: +There are two ways to install MitoHiFi v3.2: (i) manually - and then you will need to have all the dependencies installed in your PATH. @@ -80,18 +80,18 @@ export PATH=:${PATH} where `` needs to be replaced with the path where MitoFinder was installed. -**Once all dependencies are installed, install MitoHiFi v2.3 (Linux)** +**Once all dependencies are installed, install MitoHiFi v3.2 (Linux)** ``` git clone https://github.com/marcelauliano/MitoHiFi.git ``` -### 2.2 Running MitoHiFi v3.0.0 from a Singularity with a Docker image +### 2.2 Running MitoHiFi v3.2 from a Singularity with a Docker image -We have wrapped up MitoHiFi v3.0.0 code into a singularity container. We recommend using singularity versions => 3.7, as lower versions do not support spaces in the arguments, and you would not be able to pass more than one set of reads to the flag **-r** +We have wrapped up MitoHiFi v3.2 code into a singularity container. We recommend using singularity versions => 3.7, as lower versions do not support spaces in the arguments, and you would not be able to pass more than one set of reads to the flag **-r** -MitoHiFi.v3.0.0 siungularity image should be run as: +MitoHiFi.v3.2 siungularity image should be run as: ``` singularity exec --bind /lustre/:/lustre/ docker://ghcr.io/marcelauliano/mitohifi:master mitohifi.py -r "/data/f1.fasta /data/f2.fasta /data/f3.fasta" -f /data/reference.fasta -g /data/reference.gb -t 10 -o 2 @@ -301,4 +301,4 @@ And for tRNAs annotation: For more information on python code and pipeline: mu2@sanger.ac.uk and jf18@sanger.ac.uk - Questions on the Singularity: Marcela Uliano mu2@sanger.ac.uk + Questions about the Docker container: Marcela Uliano-Silva mu2@sanger.ac.uk diff --git a/environment/base/Dockerfile b/environment/base/Dockerfile index 5bd5b4d..80709c5 100644 --- a/environment/base/Dockerfile +++ b/environment/base/Dockerfile @@ -87,30 +87,3 @@ RUN pip3 --no-cache-dir install --upgrade pip \ entrezpy \ dna_features_viewer \ bcbio-gff - -# FROM ghcr.io/marcelauliano/mitohifi:reviews - -# WORKDIR /opt - -# # /opt/MitoHiFi -# RUN git clone -b reviews https://github.com/marcelauliano/MitoHiFi.git \ -# && cd MitoHiFi/src \ -# && chmod +x *.py \ -# && sed -i '1i#!/usr/bin/env python3' mitohifi.py findFrameShifts.py fixContigHeaders.py \ -# && sed -i '1 s/python\>/python3/' *.py \ -# && sed -i 's/"python2",\s//' parallel_annotation_mitos.py \ -# && sed -i 's/MITOS\/data/\/opt\/databases/' parallel_annotation_mitos.py \ -# && pip3 --no-cache-dir install --upgrade pip \ -# && pip3 --no-cache-dir install biopython \ -# pandas \ -# Pillow \ -# matplotlib \ -# entrezpy \ -# dna_features_viewer \ -# bcbio-gff - -# WORKDIR /tmp - -# ENV CONDA_DIR=/opt/conda - -# ENV PATH /opt/wrappers:/opt/cdhit/:/opt/hifiasm-0.16.1/:/opt/MitoHiFi/src/:/opt/MitoFinder/:/opt/minimap2-2.24_x64-linux/:${PATH} diff --git a/environment/code/Dockerfile b/environment/code/Dockerfile index d9f7f68..8ba22d4 100644 --- a/environment/code/Dockerfile +++ b/environment/code/Dockerfile @@ -1,82 +1,3 @@ -# FROM ubuntu:18.04 - -# ENV DEBIAN_FRONTEND=noninteractive - -# RUN apt-get -qq -y update \ -# && apt-get -qq -y update \ -# && apt-get -qq -y install \ -# autoconf \ -# automake \ -# bedtools \ -# build-essential \ -# curl \ -# default-jre \ -# git \ -# infernal \ -# libopenjp2-7 \ -# libtiff5 \ -# libz-dev \ -# mafft \ -# ncbi-blast+ \ -# python3-dev \ -# python3-pip \ -# samtools \ -# wget \ -# vim \ -# && rm -rf /var/lib/apt/lists/* - - -# WORKDIR /opt - -# # /opt/minimap2-2.24_x64-linux -# RUN curl -L https://github.com/lh3/minimap2/releases/download/v2.24/minimap2-2.24_x64-linux.tar.bz2 \ -# | tar -jxvf - - -# # /opt/hifiasm-0.16.1 -# RUN curl -L https://github.com/chhylp123/hifiasm/archive/refs/tags/0.16.1.tar.gz \ -# | tar -xzvf - \ -# && cd hifiasm-0.16.1 \ -# && make \ -# && wget -P /usr/local/src https://bootstrap.pypa.io/pip/2.7/get-pip.py \ -# && python2 /usr/local/src/get-pip.py \ -# && python2 -m pip --no-cache-dir install biopython==1.70 - -# # /opt/MitoFinder -# RUN git clone https://github.com/RemiAllio/MitoFinder.git \ -# && cd MitoFinder \ -# && ./install.sh \ -# && sed -i 's/\/usr\/bin\/python/\/usr\/bin\/env python/' mitofinder -# RUN chmod -R 755 /opt/MitoFinder - -# RUN git clone https://github.com/weizhongli/cdhit.git && \ -# cd cdhit && \ -# make MAX_SEQ=10000000 - -# RUN mkdir -p /opt/wrappers - -# COPY mitos_wrapper.sh /opt/wrappers/runmitos.py -# COPY mitofinder_wrapper.sh /opt/wrappers/mitofinder - -# RUN chmod -R 755 /opt/wrappers - -# ARG CONDA_DIR=/opt/conda - -# RUN wget -P /usr/local/src https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ -# && bash /usr/local/src/Miniconda3-latest-Linux-x86_64.sh -b -p $CONDA_DIR \ -# && $CONDA_DIR/bin/conda install -n base conda-libmamba-solver - -# RUN $CONDA_DIR/bin/conda create -n mitos_env --experimental-solver=libmamba -c bioconda -y mitos -# RUN $CONDA_DIR/bin/conda create -n mitofinder_env --experimental-solver=libmamba python=2.7 - -# RUN $CONDA_DIR/bin/conda clean -a - -# RUN mkdir -p /opt/databases - -# WORKDIR /opt/databases - -# RUN curl -L https://zenodo.org/record/4284483/files/refseq89m.tar.bz2?download=1 | tar -jxvf - \ -# && curl -L https://zenodo.org/record/4284483/files/refseq89f.tar.bz2?download=1 | tar -jxvf - - FROM ghcr.io/marcelauliano/mitohifi-base:reviews WORKDIR /opt @@ -94,4 +15,4 @@ WORKDIR /tmp ENV CONDA_DIR=/opt/conda -ENV PATH /opt/wrappers:/opt/cdhit/:/opt/hifiasm-0.16.1/:/opt/MitoHiFi/src/:/opt/MitoFinder/:/opt/minimap2-2.24_x64-linux/:${PATH} +ENV PATH /opt/wrappers:/opt/cdhit/:/opt/hifiasm-0.16.1/:/opt/MitoHiFi/src/:/opt/MitoFinder/:/opt/minimap2-2.24_x64-linux/:${PATH} \ No newline at end of file diff --git a/src/mitohifi.py b/src/mitohifi.py index 9b54fea..8c10a7b 100644 --- a/src/mitohifi.py +++ b/src/mitohifi.py @@ -369,14 +369,6 @@ def main(): shutil.copy(repr_contig_fasta, final_fasta) shutil.copy(repr_contig_annotation, final_annotation) - #repr_contig_get_gb = ["mitofinder", "--new-genes", "--max-contig-size", - # str(max_contig_size), "-j", "final_mitogenome.annotation", - # "-a", repr_contig_fasta, "-r", args.g, "-o", args.o, "-p", str(args.p), - # "--circular-size", "8000"] - #subprocess.run(repr_contig_get_gb, stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) - - #final_fasta = os.path.join("final_mitogenome.annotation", "final_mitogenome.annotation_MitoFinder_mitfi_Final_Results", "final_mitogenome.annotation_mtDNA_contig.fasta") - #final_gbk = os.path.join("final_mitogenome.annotation", "final_mitogenome.annotation_MitoFinder_mitfi_Final_Results", "final_mitogenome.annotation_mtDNA_contig.gb") # Generate contigs stats step += 1