GithubHelp home page GithubHelp logo

tseemann / lathe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bhattlab/lathe

1.0 3.0 0.0 353 KB

A tool for generating bacterial genomes from metagenomes with nanopore long read sequencing

License: MIT License

Python 88.91% Shell 1.70% R 8.08% Ruby 1.31%

lathe's Introduction

Lathe

A tool for generating bacterial genomes from metagenomes with Nanopore long read sequencing

Installation

First, install miniconda3

Then install snakemake. This can be done with the following.

conda install snakemake
snakemake --version #please ensure this is >=5.4.3

Next, clone this github directory to some location where it can be stored permanently. Remember to keep it updated with git pull.

git clone https://github.com/elimoss/lathe.git

Instructions to enable cluster execution with SLURM can be found at https://github.com/bhattlab/slurm

Inputs

Alter config.yaml to provide the following:

  • sample_name: Name of sample and output directory

  • fast5_dirs_list: text file containing a list of absolute paths to run/fast5/* subfolders containing .fast5 files. A good way to generate this is with find -maxdepth 2 -mindepth 2 fast5_parent_dir > fodn.txt

  • flowcell: flowcell code, e.g. FLO-MIN106, passed to basecaller

  • kit: kit code, e.g. SQK-LSK109, passed to basecaller

  • genome_size: Estimated genome size, e.g. 50m, passed to Canu.

  • singularity: location (including on the internet) of a singularity image to be used for the workflow. Don't change this.

  • short_reads: location of short reads to be used for Pilon polishing, or empty quotes for long-read polishing.

  • use_grid: should Canu execute in distributed mode on a cluster?

  • grid_options: Extra options for execution on a cluster

  • canu_args: Extra options for Canu

  • skip_circularization: Should circularization be omitted from the workflow?

Lathe uses the Flye assembler by default. For Canu, please specify 'canu' for the assembler parameter in the config. For cluster Canu execution, please note: if set to True, you will need to install Canu, e.g. conda install -c conda-forge -c bioconda Canu=1.8 as well as provide any additional required parameters for your job scheduler in the config.yaml file. Please see the example config file. When executing on a cluster, Canu will appear to fail, as the first process does not produce an assembly and instead spawns subsequent jobs on the cluster. Don't worry, just re-run Lathe when the assembly completes.

To execute please run the following. Please note, you must substitute a parent directory containing all of your data and working directories for /labs/.

snakemake --use-singularity --singularity-args '--bind /labs/,/scg/,/home/ ' -s /path/to/lathe/Snakefile \
--configfile path/to/modified_config.yaml --restart-times 0 --keep-going --latency-wait 30
# --profile scg #enable cluster support, highly recommended.  See above.

Outputs

The outputs generated by this workflow will look like the following:

samplename/ ├── 0.basecall │   ├── samplename.fq │   └── nanoplots ├── 1.assemble │   ├── samplename_merged.fasta │   ├── samplename_raw_assembly.fa │   ├── samplename_raw_assembly.fa.amb │   ├── samplename_raw_assembly.fa.ann │   ├── samplename_raw_assembly.fa.bwt │   ├── samplename_raw_assembly.fa.fai │   ├── samplename_raw_assembly.fa.pac │   ├── samplename_raw_assembly.fa.paf │   ├── samplename_raw_assembly.fa.sa │   ├── assemble_100m (if specified) │   └── assemble_250m (if specified) ├── 2.polish │   ├── samplename_polished.corrected.fasta │   ├── samplename_polished.fasta │   ├── samplename_polished.fasta.bam │   ├── samplename_polished.fasta.bam.bai │   ├── samplename_polished.fasta.fai │   ├── samplename_polished.fasta.misassemblies.tsv │   ├── medaka (if specified) │   ├── pilon (if specified) │   └── racon (if specified) ├── 3.circularization │   ├── 1.candidate_genomes │   ├── 2.circularization │   ├── 3.circular_sequences #circularized genomes │   ├── 4.samplename_circularized.corrected.fasta │   ├── 4.samplename_circularized.fasta │   ├── 4.samplename_circularized.fasta.bam │   ├── 4.samplename_circularized.fasta.bam.bai │   ├── 4.samplename_circularized.fasta.fai │   └── 4.samplename_circularized.fasta.misassemblies.tsv └── 5.final    ├── samplename_final.fa    └── samplename_final.fa.fai

lathe's People

Contributors

elimoss avatar bsiranosian avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.