Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

55 lines (38 loc) · 1.63 KB

Genome Sequence

This task is based on a technique used for genome shotgun sequencing in the Human Genome Project. Current sequencing technology can only sequence chunks of 500 or so base pairs, yet the human genome is billions of pairs long. Thus, the DNA to be sequenced is cloned several times and the clones are randomly cut into sequenceable-sized chunks. The reassembly step aligns those chunks to reconstruct the original strand. Nova had a fascinating show on Cracking the Code of Life. Their online animation of a genome sequencer explains the process of gene sequencing.

Objective

Write a program that reads a file of text fragments and attempts to reconstruct the original document out of the fragments. The fragments were created by duplicating the original document many times over and chopping each copy into pieces. The fragments overlap one another and your program will search for overlaps and align the fragments to reassemble them into their original order.

Fragment Source Text

  • a l l i s w e l l
  • e l l t h a t e n
  • h a t e n d
  • t e n d s w e l l

Expected Source Result Text

  • a l l i s w e l l t h a t e n d s w e l l

How To Verify Correctness

Pull In Dependencies

Run From CLI (Composer Needed)

composer install

Unit Tests

Run From CLI

vendor/bin/phpunit
PHPUnit Output
Logans-MacBook-Pro:funChallenge LoganConnor$ vendor/bin/phpunit
PHPUnit 6.5.6 by Sebastian Bergmann and contributors.

.............                                                     13 / 13 (100%)

Time: 36 ms, Memory: 4.00MB

OK (13 tests, 18 assertions)