Giter VIP home page Giter VIP logo

text2dna's People

Contributors

edmundkorley avatar hlpostman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

text2dna's Issues

Binary to Base 4

We need to further encode the binary representations of ASCII values into the four bases of DNA. We can do this with either of the following methods:

  1. Parse two bits of the binary string into A, T, C, or G assigning each of the four permutations of 0 and 1 to A, T, C, or G (e.g. 00=>A, 01=>T, 10=>C, 11=>G)
  2. Change our code that takes decimal ASCII values from returning a binary string to returning a base-4 string, and assign each of 0, 1, 2, and 3 to A, T, C, and G (e.g. 0=>A, 1=>T, 2=>C, 3=>G)

Base 4 to DNA

We need to further encode the base-4 representations of ASCII values into the four bases of DNA.

Algorithm

  1. Assign each of 0, 1, 2, and 3 to A, T, C, and G (e.g. 0=>A, 1=>T, 2=>C, 3=>G)
  2. Take an array of strings "**input" where each index points to a string containing a base-4 representation of some ASCII value
  3. Create an array of strings "**transformed" that points in each place to a string of A's,T's,C's, and G's representing the base-4 number that lives at the same index in "**input"
  4. Return "**transformed"

Transform text to binary code

  • Transform command line arguments (treat as strings for now) from char * to int * of corresponding integer ASCII values.
  • Transform further to char * array of binary equivalent of ASCII values.
  • [TENTATIVE] Merge char * array of binary numbers into single char *. This depends on how the delimiting of characters work in the memories algorithm.
  • Read further about how delimiting of characters work in memories algorithm.

Read about {Node,Python}-C/C++ bindings

The goal would be do the encoding very efficiently in C/C++, given we know the range of ASCII values and can use low-level memory-efficient data structures, then expose functionality as a module in Node/Python.

Write decoder (dna2text)

Since we have an encoder, having a decoder will be useful for testing. We can start it within this project, but it probably makes sense to move this to a separate repo later on.

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.