Git Product home page Git Product logo

dna-tree-based-clustering's Introduction

DNA Tree based Clustering

Introduction

This project contains code and benchmark results used in my Master thesis "Clustering for DNA Storage". The idea was developed from the tree based clustering algorithm Clover. And this project provides both Python and C++ implementations for our clustering method.

Usage

Clustering

A read file in TXT format is needed for clustering, and each line should be like:

[Index] [Read]

An example of the read file:

1 ATAAGGG
2 AAAAGGG
3 AAAAGGG
4 GGACCTA
5 GGACCTA
...

Run the clustering with command:

python -m clust.main -I [input file] -O [output file]

For example:

# test data
python -m clust.main -I testdata/toClust.txt -O output_file

The clustering result consists of original indexes and the label of cluster assigned,

[Index],[Label of cluster]

An example of clustering result:

1,1
2,1
3,1
4,2
5,2
...

Benchmark

For comparing the clustering result, a TXT file that indeicates accuracte clustering index is need:

[Index],[Label of cluster]

An example of :

1,1
2,1
3,1
4,2
5,2
...

Two different metrics can be computed with commands:

python tools/computeAcc.py [Accurate indexes] [Cluster result 1] [Cluster result 2] ... [Output file]
python tools/computePur.py [Accurate indexes] [Cluster result 1] [Cluster result 2] ... [Output file]

For example:

python tools/computeAcc.py testdata/toClust.txt output_file_1.txt output_file_2.txt CompareResults.txt

dna-tree-based-clustering's People

Contributors

youjunl avatar

Stargazers

 avatar  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.