Giter Club home page Giter Club logo

dna_matching's Introduction

DNA Matching Desktop Application

This application helps to find whether the substring exists in the predefined string. This is often used to identify whether a short DNA sequence is present in some dataset of long DNA sequence. The Naive Algorithm would run in O(n^2) time in order to search for the substring. This Desktop application helps to find the substring in the text in O(n) time, because it uses the Karp-Rabin algorithm.

The Karp-Rabin algorithm aims to use skillful modulo and arithmetic operations as well as hashing functions to decrease the time complexity of matching exact substring of the text. Here is the application in Genetics: Looking for DNA sequnces in the precalculated Data Set of DNA sequence

Dependencies:

  • Java 17
  • JavaFX.controls
  • JavaFX.fxml
  • The Application is build by using Maven

Installation:

  • Open a new IntelliJ project.
  • Then, Git clone this repo to your project
        https://github.com/ilkhom19/dna_matching
  • Then Run the Driver.java file

Features:

  • Can recieve up to 500,000 character DNA sequence.
  • Computes the Hash value of each substring with Length "L"
  • Can compute the search in less than a second for any input given( also depends on the machine )

Future improvements:

  • Interactive search animations
  • Optimize the Hashing Function
  • A feature to generate randomly distributed DNA sequences similar to real DNA's

Example:

alt text

  • Input:

  • The first field of the application recieves the long DNA Sequence.The DNA Sequence cannot be empty.

  • The next 2 fields recieves two integers 1 <= L <= 1000 and 1 <= N <= 1000 representing the length of each query and the number of short DNA queries in the predefined set.

  • In the last TextArea, each of the next N lines contains a DNA sequence consisting of exactly L characters.


The base DNA Sequence: GCTCTAAGGACAATTACGGAGTGGGCGGCCTGGCGGGAGCACTACCCCATCGACGCGTACTCGAATACTGTATATTGCTCTCACATGAACAAATTAGTAGAGTGCCGCTTTCAGCCCCCCTGTCGTCGGCGACGTCTGTAAAATGGCGTTGATGTGGATCGACTCTATAGAGGCATCTACTGATGCGTAGGGAGATCCGGAATGTATTGGCCTATGTCACTGAAACTGTCCAAACACCCCATGTCGTTACTGAACGTATCGACGCATACCTCCTTCGTTGAGAACTCACAATTATACAACTGGGGACATAATCCCTACGCCCATCTTCTACACCCGTCTCTGTGGGTCCAGTTCAAGTGCTGGGAGAGCATCCTCCACAAGGTCTAGTGGTATGGTGGTATAGTAAGCTCGTACTGTGATACATGCGACAGGGGTAAGACCATCAGTAGTAGGGATAGTGCCAAAGCTCACTCACCACTGCCTATAAGGGGTGCTTACCTCTAGAATAAGTGTCAGCCAGTATAACCCCATGAGGAACCGAAAAGGCGAACCGGGCCAGACAATCCGGAGGCACCGGGCTCAAAGCCGCGACACGACGGCTCACAGCCGGTAAGAGTAACCCCGGAGTGAACACCTATGGGGCTGGATAAAACTGCCCTGGTGACCGCCATCAACAACCCGAATACGTGGCATTTCAGGAGGCGGCCGGAGGGGGGATGTTTTCTACTATTCGAGGCCGTTCGTTATAACTTGTTGCGTTCCTAGCCGCTATATTTGTCTCTTTGCCGACTAATGAGAACAACCACACCATAGCGATTTGACGCAGCGCCTCGGAATACCGTATCAGCAGGCGCCTCGTAAGGCCATTGCGAATACCAGGTATCGTGTAAGTAGCGTAGGCCCGTACGCGAGATAAACTGCTAGGGAACCGCGTCTCTACGACCGGTGCTCGATTTAATTTCGCCGACGTGATGACATTCCAGGCAGTGCCTCTGCCGCC

Lenth of the DNA Query: 10
Number of Queries: 6

CCGCTGTGCC
CATCCTAGTA
GCCATCAACA
CTATGACCCT
GGTAAGAGTA
CGGTGGCGGA

  • Output:

The sequence: 'CCGCTGTGCC' not found
The sequence: 'CATCCTAGTA' not found
The sequence: 'GCCATCAACA' found at the position: 667
The sequence: 'CTATGACCCT' not found
The sequence: 'GGTAAGAGTA' found at the position: 609
The sequence: 'CGGTGGCGGA' not found

dna_matching's People

Contributors

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