Git Product home page Git Product logo

flumatch's Introduction

FluMatch

Automating Prokka annotations, BLAST runs and generation of BLAST reports

Process

The script does the following:

  1. Reads in your FASTA format file containing contig sequences
  2. Annotates your contigs with Prokka
  3. Performs a BLAST search of the annotated coding sequences generated by Prokka with BLAST vs. the local database of your preference
  4. Generates a report table with the following fields:
Query Matching Strain Query Coverage Percent ID Identities Alignment Length Query Start Query End Subject End Query Length Subject Length E-value

Dependencies

The script has been written on Python 3.4.3 and it has been tested on Linux only. Windows implementation is being investigated, but it is not available yet. The installation of a Linux virtual machine (preferrably Ubuntu) on your Windows computer is strongly recommended for the meanwhile.

In order to run this script, you would need to have the following installed on your system:

  1. Python 3

  2. NCBI BLAST+

This is the standalone version of BLAST that you can run locally on your machine. flumatch.py calls the blastn algorithm.

Instructions for Linux:

sudo apt-get install ncbi-blast+

  1. Prokka: microbial annotation software

Please follow the installation instructions in the official Prokka repository

BLAST database set up

flumatch.py will do a BLAST search of your annotated sequences vs. a local database. You need to build said database. The instructions to do this are:

  1. Download the sequences from NCBI or FluDB that you want to compare to your contigs. In my case I downloaded all the Influenza Virus A sequences that existed in NCBI on May 26, 2016 (taxid:11320). I have a Perl script that you can use to do that from the command line.
  2. Once you have the database you want, you need to type in the following commands:

makeblastdb -in filename.fasta -dbtype nucl -title filename -out filename

For example, if you have a FASTA file named avian.fasta or avian.fna which contains the sequences that you want to use as your BLAST database, you could do the following:

makeblastdb -in avian.fasta -dbtype nucl -title avian -out avian

After you run that command you will see that three new files will be created in the directory with the extensions *.nhr, *.nin, and *.nsq. These are the files that BLAST will use to search your sequences against.

Usage

python3 flumatch.py --blast-db /path/to/blastdb -r name_of_report_file.txt -p name_of_prokka_folder contigs.fasta

Arguments and options:

The most important thing to keep in mind is that the name of the FASTA file that contains the contigs you want to analyze should be written at the very end of the command.

--blast-db: This argument is required The local BLAST database that you want to search your annotated sequences against. See the Set up section above.

-p or --prokka-dir: The name of the directory where the Prokka output will be stored. Default = the program will create a sub-directory with the name of the file you are

-t or --top-hits : The number of top BLAST hits for each annotated CDS that you want to see in the final report. Default = 10

-r or --report-out: The name of the report text file. This is a tab-separated file that you can open in R or Excel. Default = TopBLASThits.txt

Sample data

I have included a folder with sample data to try the script. The folder contains the following files and directories

  • La_Habana_test.fasta which contains the 8 segments of the publicly available strain A/swine/La/Habana/130/2010/H1N1 (Genbank Accession numbers HE584753.1 to HE584760.1).

  • TopBLASThits.txt: an example report of the BLAST report of the annotated strain. The version of blastn used for this was 2.2.28+. The current version of online BLAST is 2.3.1+.

  • A directory called La_Habana_test that has the output of the Prokka annotation process

flumatch's People

Contributors

ropolomx avatar dorbarker avatar

Watchers

James Cloos 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.