Code Monkey home page Code Monkey logo

cblaster_stats's Introduction

Cblaster_stats

Kindly if you find this repo useful for your work, cite & star this repo

What is this script?

Cblaster is a great tool for finding co-located homologous sequences using BLAST. Sometimes in the remote mode, you can get the binary (~presnese absence matrix) file with thousands of hits (per isolate) depending on what you are working with. Here, you can break this file into a simple file per species which will count how many hits per species. Then, it will efetch the number of the assembled genomes per species (via Biopython Enterez based on the NCBI assembly database). Well, dividing both numbers will hint at the spread of your cluster among different species. Finally, this script will draw a tree based on the pre-defined NCBI taxonomy among your species using ete3 toolkit.

What do you need?

You shall have the binary file as easy as I get it like this.

cblaster search --query_file CP018841.1.faa --binary example_binary.csv -bde "," -bhh -bdc 6 -mi 50 -mc 50

What about dependencies?

Pandas, Biopython, ete3, argparse

Well, for ete3, I recommend installing it via conda env (even if it takes a lot of time), if the pip does not work properly.

So, just type this command effortlessly.

 python cblaster_stats.py -i  example_binary.csv

"-i /--input_dir" is your path to the directory for your binary file

What do you get?

Currently, there are three files.

  1. database_percentage_your_file.csv (The main output where you can find for each species the count of this species in the binary file, the number of assembled genomes per NCBI assembly database, and the percentage of (count/assembly)*100.
  2. your_file_tree.png. This is just a basic tree that links your isolates together.
  3. your_file_tree.nwk. If you like to take this tree to another tool (iTOL,FigTree,..)

I hope this helps.

Thanks

cblaster_stats's People

Contributors

ahmedelsherbini avatar

Stargazers

 avatar

Watchers

 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.