Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobgrisham/dna-identification-algorithm-using-python
Program takes a sequence of DNA and a CSV file containing Short Tandem Repeats (STR) counts for a list of individuals and then outputs to whom the DNA (most likely) belongs.
https://github.com/jacobgrisham/dna-identification-algorithm-using-python
algorithms data-structures dna dna-identification-algorithm python
Last synced: 10 days ago
JSON representation
Program takes a sequence of DNA and a CSV file containing Short Tandem Repeats (STR) counts for a list of individuals and then outputs to whom the DNA (most likely) belongs.
- Host: GitHub
- URL: https://github.com/jacobgrisham/dna-identification-algorithm-using-python
- Owner: JacobGrisham
- License: mit
- Created: 2020-11-13T06:51:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-02T21:27:48.000Z (almost 4 years ago)
- Last Synced: 2024-12-09T19:22:03.155Z (2 months ago)
- Topics: algorithms, data-structures, dna, dna-identification-algorithm, python
- Language: Python
- Homepage:
- Size: 6.28 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DNA Identification Algorithm using Python
[![Maintainability](https://api.codeclimate.com/v1/badges/6bcc0d5500aab9a14742/maintainability)](https://codeclimate.com/github/JacobGrisham/DNA-Identification-Algorithm-using-Python/maintainability)
### Homework from [Harvard's Introduction to Computer Science CS50 hosted on eDX](https://www.edx.org/course/cs50s-introduction-to-computer-science)
### π [Problem Set 6](https://cs50.harvard.edu/x/2020/psets/6/)
- [DNA](https://cs50.harvard.edu/x/2020/psets/6/dna/): Program takes a sequence of DNA and a CSV file containing Short Tandem Repeats (STR) counts for a list of individuals and then outputs to whom the DNA (most likely) belongs.
- I wrote the code in dna.py. The other files were provided by the instructor.![DNA Program Demo](img/demo.gif)
## π‘Lessons Learned
- Array and dictionary data structures in python
- Parsing data from csv file using `enumerate()`, `.strip()`, and `.split()`
- Substring `s[i:j]` iteration and multiple nested iterations in python## π Getting Started
To run this project locally:
- In your terminal, navigate to the root program directory and run the following commands
```
$ python dna.py databases/large.csv sequences/#.txt
```
Where `#` is a number between 1 and 20. Refer to the txt files in the sequences directory. The sequences directory contains a targeted DNA sequence. The database directory contains data on individuals.The output can be compared for accuracy against the list under the header "Testing" in the specifications (near the end of the file)
- Quick use examples
```
python dna.py databases/large.csv sequences/11.txt
python dna.py databases/large.csv sequences/17.txt
python dna.py databases/large.csv sequences/20.txt
```