Giter Club home page Giter Club logo

orthofinder_extractor's Introduction

orthofinder_extractor

A Python3 script that parses the Orthogroups.tsv output file created by Orthofinder and extracts species specific orthogroups (orthogroups that only appear in a single species tested).

Prerequisits

  • Python3
  • Orthogroups.tsv (created by Orthofinder in the Orthogroups result directory)
  • Fasta files containing protein sequences which were used to run Orthofinder

Usage

usage:

extract_species_specific_orthogroups.py [-h] [-p PREFIX [PREFIX ...]] [-i INPUT] [-o OUTPUT] [-f FASTA]

-p: a list of protein prefixes used in the fasta files to distinguish species
-i: path to the Orthogroups.tsv file
-o: path to store extracted Orthogroups
-f: path to a directory containing the fasta files

Usage example 1

Expects Orthogroups.tsv and all FASTA files to be in the same directory.
FASTA files look like this:

file1.fasta:

>Alen_Al4_ctg00.g1.t1
MPTGDKLIEIKYSDAVHKFSNWWIE...
...

file2.fasta:

>Arab_Me14_ctg00_-_Arab_Me14_ctg00.g1.t1
MLHQLDRIVIDECHVLLELTQDWRP...
...

Command:

extract_species_specific_orthogroups.py -p Alen Arab

This will parse your Orthogroups.tsv and look for orthogroups that only contain proteins starting with Alen or Arab and then use the provided fasta files to extract those orthogroups into separate fasta files for each orthogroups.

Usage example 2

  • provide path to Orthogroups.tsv
  • provide path to FASTA files
  • provide path to output directory
extract_species_specific_orthogroups.py -p Alen Arab -i /path/to/Orthogroups.tsv -f /path/to/directory/containing/fastas/ -o /path/to/output/directory/
  • uses Alen and Arab as prefixes to look for in the Orthogroups.tsv file
  • uses the Orthogroups.tsv file located at /path/to/Orthogroups.tsv
  • uses FASTA files in /path/to/directory/containing/fastas/
  • saves output files to /path/to/output/directory

orthofinder_extractor's People

Contributors

jwdebler avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wook2014

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.