Giter Club home page Giter Club logo

eigengenomes's Introduction

Eigengenomes

A C and Python implementation of Brian Cleary's LSA, for eigengenome partitioning.

Install

Run these commands.

git clone https://github.com/mooreryan/eigengenomes.git
cd eigengenomes
make

This will make the executable files needed for the pipeline.

Uninstall

In the source directory, run make clean. Also, if you moved any of the program binaries, you will need to manually remove them.

Usage

Run hash_and_count for each fastq file. It assumes reads are paired.

Usage: ./hash_and_count <1: seed> <2: kmer size> <3: number of hyperplanes> <4: seqs.fastq> > seqs.hash_counts

Run weight_counts once on all the output files from the hash_and_count program.

Usage: ./weight_counts <1: num hyperplanes used in previous step> *.hash_bucket_counts > cool_sample_group.hash_counts

Example

There aren't wrapper scripts yet, but here is an example of running the steps implemented thus far.

test_files contains s1.fastq and s2.fastq.

This command will hash the kmers and count them. It will create these files: test_files/s{1,2}.hash_counts.

parallel "./hash_and_count 0 3 4 {} > {.}.hash_counts" ::: test_files/*fastq

This command will weight the counts using something similar to tf-idf weighting. It will create the file test_files/all.hash_counts.

./weight_counts 4 test_files/*.hash_counts > test_files/all.hash_counts

Aaaand, the remaining steps aren't finished yet ;)

Error codes

  • 0: Success
  • 1: Argument error
  • 2: Couldn't open a file
  • 3: Not an even number of forward and reverse reads
  • 4: A sequnece is shorter than the kmer length
  • 5: A hashed kmer bucket was missing from a counting hash

Issues

TODO

  • The counting arrays are way to memory intensive, consider hash tables for counting.
  • Nucleotides are being mapped to 5 different integers instead of complex numbers.

Differences from the original progam

  • Hyperplanes are drawn at random through the origin rather than based on existing kmers.
  • The idf score is calculated a bit differently.
  • It is not designed to be run across many nodes of a compute cluster. This may change.

eigengenomes's People

Contributors

mooreryan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.