Code Monkey home page Code Monkey logo

transcription's Introduction

Kotlin Transcription

A sample kotlin project for fun

See:

Adapted from: http://www.cse.msu.edu/~cse231/PracticeOfComputingUsingPython/08_ClassDesign/Transcription/

Requirements

Create a class, called Transcriber, which will do the transcription process. It is coded as follows:

  1. The constructor of the class takes a single argument, a filename from which can be read the amino acid to codon information. The table provided, called codonTable.txt, has the following format:
    • each line represents an amino acid or transcription command
    • the line format has space separated fields, which are in order:
      proteinName triName oneLetterName listOfCodons
      
  2. You will provide a method called transcribe.
    • It takes a single argument, a string of DNA bases (a string of ATGC characters)
    • It yields a string of triName amino acids, separated by โ€˜:โ€™
    • Transcribe works as follows:
      • read the DNA string until the START codon is read.
      • for each codon, translate the codon into its triName amino acid. For example, if you read the codon CAG, you can see from the table entry:
      Glutamine Glu Q CAA CAG
      
      That the codon CAG translates to the triName Glu.
      • continue reading until the DNA string ends or the STOP codon is read.
  3. One odd thing. In the common biological translation (that is, using the provided table), the START codon is the same as the Methionine (met) codon.. When reading begins, that codon codes for START. After transcription begins, that codon codes for Methionine (met).
  4. Your transcriber should print an error if:
    • it does not read a codon from the string (that is, there are less than three DNA bases at the end of the string if transcription is still in process)
    • if the DNA string ends and transcription never began
    • if the DNA string ends and transcription never ended

transcription's People

Contributors

dependabot[bot] avatar rushtong avatar

Watchers

 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.