/nf_mito-mania

Nextflow pipeline that assembles mitochondria scaffolds using mitobim and checked scaffold by mapping reads to it using bwa mem and calls variants in freebayes for a consensus sequence.

Primary LanguageNextflowMIT LicenseMIT

nf_mito-mania

Nextflow pipeline that assembles mitochondria scaffolds using MITObim, checks the scaffold by mapping reads to it using bwa mem, and calling variants in freebayes to obtain a consensus sequence. Workflow is based on a Mozes Blom pipeline.

Workflow

  1. Install nextflow (version >= 19.04)
    Install Conda (version >= 4.10)
    Install mitobim
    Install mira

  2. Download git clone of this repository:

    git clone https://github.com/FilipThorn/nf_mito-mania
  3. Edit nextflow.config file:

    mitobim = "/PATH/TO/MITObim.pl"                                    #path to MITObim script
    mitobimRef = "/PATH/TO/lycPyr_mtDNA.fa"                            #refernce for mitobim and mira
    ref_strain = "lycPyr_mtDNA"                                        #name of refernce for mitobim and mira
    mira =  "/PATH/TO/mira_4.0.2_linux-gnu_x86_64_static/bin/mira"     #path to mira
    mira_dir = "/PATH/TO/mira_4.0.2_linux-gnu_x86_64_static/bin/"      #path to mira dir
  4. Run Mitomania workflow:

    nextflow run mitomania.nf --reads_MB /PATH/TO/Indivxxx_L001_U.fastq.gz --reads_PE '/PATH/TO/*_R{1,2}.fastq.gz' --reads_SE '/PATH/TO/*_U.fastq.gz' --outdir /PATH/TO/RESULTS

     

Currently requires both paired and unpaired reads to run as well as four seperate libraries per individual. Updates to generalize the script are ongoing.
Input file structure

usr:~data/$ ls
Indivxxx_L001_U.fastq.gz Indivxxx_L001_R2.fastq.gz Indivxxx_L001_R1.fastq.gz 
Indivxxx_L002_U.fastq.gz Indivxxx_L002_R2.fastq.gz Indivxxx_L002_R1.fastq.gz
Indivxxx_L003_U.fastq.gz Indivxxx_L003_R2.fastq.gz Indivxxx_L003_R1.fastq.gz
Indivxxx_L004_U.fastq.gz Indivxxx_L004_R2.fastq.gz Indivxxx_L004_R1.fastq.gz 

   

HPC enviroment

Use of a HPC is recomended. Create a nextflow config profile that matches your cluster set-up profile