Code Monkey home page Code Monkey logo

cluster-barcodes's Introduction

cluster-barcodes

This is a simple tool for clustering genetic barcodes associated with named samples.

It assumes an input file which is tab-delimited, whose first field contains a sample identifier and whose second field contains a genetic barcode. Bases labelled 'N' and 'X' represent 'no call' and 'multiple call' respectively.

Output is in DOT format, which can be read by Graphviz or Omnigraffle, among other tools.

Clusters are based on exact barcode matches; each node in the graph represents a set of samples with identical barcodes. Nodes with ambiguous (containing 'X' or 'N') barcodes are colored red. Barcodes with >1 'N' or >5 ('X' + 'N') are dropped. Edges are drawn between nodes whose barcodes have a Hamming distance of exactly 1 ('N' and 'X' entries do not count towards Hamming distance).

Two kinds of clusters are possible: by barcode (-c option), and by barcode/year (-l option, longitudinal clustering).

Barcode clustering can also be run with weighted edges (-w option), where the weight is the Hamming distance between clusters, whenever that distance is less than or equal to some threshold. Currently this is hardcoded to a threshold of 3.

In longitudinal clustering, 'N' and 'X' entries DO count towards Hamming distance.

Usage: cluster-barcodes [-l|-c|-w] input.txt output.dot

Build instructions

  • You must have the GHC haskell compiler. Haskell Platform is recommended.
  • From the source directory, run cabal install

cluster-barcodes's People

Contributors

ndaniels avatar

Watchers

 avatar  avatar

cluster-barcodes's Issues

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.