Giter Club home page Giter Club logo

framefix's Introduction

framefix

Adjust a FastA DNA genome file's ORFs to correct frameshifts by best Diamond match.

This is a simple script that corrects homopolymer stretches (e.g. GGGGGGGG) that putatively cause artifactual frameshifts in open reading frames of a prokaryotic genome. These false positive frameshifts are common in nanopore-derived genome assemblies, and the threshold for detection is based on that chemistry (homopolymers of 6bp+ for pore type R9.4). Frameshifts are corrected parsimoniously by adding or subtracting one base to restore the frame described by the best [Diamond] match against a provided protein database. The exception is if the parsimonious edit makes the homopolymer less than 6bp, in which case two bases are added to the homopolymer stretch to restore the reading frame. I would suggest running this script after other polishing methods such as nanopolish or Medaka.

Prerequisites

This program assumes you have Diamond installed, and a local indexed copy of a protein database of some sort. I typically use UniRef90.

Usage

The program is a simple Perl script with no code dependencies, so once executable (e.g. chmod u+x framefix) it can be run like so:

./framefix nanopore_assembly.fasta 1e-25 output_prefix /path/to/uniref90/diamond_index

Where 1e-25 is the e-value threshold to consider a match evidence of a frameshift. Three output files are generated output_prefix.homopolymers_query.txt which lists the homopolymers and their genomic context that were submitted for inquiry to Diamond, output_prefix.diamond_nr.txt which is the best Diamond output for each of those queries (note that we are not doing taxonomic assignment with this code, so best hit is sufficient), and output_prefix.frameshift_adjusted.fna which has the parsimonious edits based on those Diamond matches applied to your input FastA genome file.

framefix's People

Contributors

nodrogluap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

framefix's Issues

Framefix introducing errors?

Hi Paul,

I have run framefix on a few bacterial hybrid assemblies (ONT+Illumina) generated with Unicycler or Flye/Racon/Pilon. I am using the Uniref90 database:

/path/to/framefix /path/to/assembly.fasta 1e-25 /path/to/uniref90.dmnd

I have a "Gold Standard" PacBio reference sequence that I am comparing the ONT+Illumina hybrid assemblies to, and when I run NucDiff against my assembly without framefix and then my assembly with framefix, it appears that errors are introduced. For example (Pseudomonas aeruginosa):

Without framefix:
Insertions: 73
Deletions: 28
Substitutions: 5

With framefix
Insertions: 99
Deletions: 57
Substitutions: 5

Do you have any idea why this might be? Should I try a different database?

Thanks!

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.