{"id":20400751,"url":"https://github.com/bifrost-technologies/lifespark.genetics","last_synced_at":"2026-05-06T04:03:42.943Z","repository":{"id":81063444,"uuid":"572774885","full_name":"Bifrost-Technologies/Lifespark.Genetics","owner":"Bifrost-Technologies","description":"Lifespark Genetics Library is a biomimetic genetic encoder capable of encoding English or Latin text in to genetic code. Great for Games, AI, Security, \u0026 more","archived":false,"fork":false,"pushed_at":"2023-02-24T17:41:21.000Z","size":282,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T11:50:40.134Z","etag":null,"topics":["ai","csharp","decoder","dna","encoder","genetics","ml","rna","solana","text-encoding"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bifrost-Technologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-01T02:06:26.000Z","updated_at":"2023-11-27T01:05:39.000Z","dependencies_parsed_at":"2023-06-03T03:45:50.869Z","dependency_job_id":null,"html_url":"https://github.com/Bifrost-Technologies/Lifespark.Genetics","commit_stats":null,"previous_names":["bifrost-technologies/bifrost.genetics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bifrost-Technologies%2FLifespark.Genetics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bifrost-Technologies%2FLifespark.Genetics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bifrost-Technologies%2FLifespark.Genetics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bifrost-Technologies%2FLifespark.Genetics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bifrost-Technologies","download_url":"https://codeload.github.com/Bifrost-Technologies/Lifespark.Genetics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241950081,"owners_count":20047587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","csharp","decoder","dna","encoder","genetics","ml","rna","solana","text-encoding"],"created_at":"2024-11-15T04:45:55.790Z","updated_at":"2025-12-06T04:02:19.945Z","avatar_url":"https://github.com/Bifrost-Technologies.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lifespark Genetics\n\n## Overview\n\nLifespark Genetics is a biomimetic genetics library \u0026 encoder that can encode data in to synthetic genetic code. It maps codons (triplets of nucleotide bases: A, C, G, T) to **Base64 characters**, allowing efficient transformation between DNA sequences, Base64 encoding, and text or data.\n\n### API Methods\n- ```ConstructGenome(string genome_data)```\nConstructs a Genome object from a string of genome data. This allows you to create a genome even with a single DNA molecule.\n- ```ExportGenomeData(Genome _genome)```\nExports the raw genetic code by iterating over each Chromosome in the genome. It concatenates the DNA sequences of the molecules and appends the designated triple-break codons (the last codon from the codon mapping * 3) after each chromosome.\n- ```RNAtoDNA(string _RNA)``` \u0026 ```DNAtoRNA(string _DNA)```\nProvides conversion methods between RNA and DNA. Using enzyme translation (simulated by the Enzymes class), these methods convert messenger RNA (mRNA) to messenger DNA (mDNA) and vice versa.\n- ```WriteDNA(string text)```\nEncodes a text string into a DNA sequence. Each character (after trimming any padding) is mapped to its associated DNA codon based on the Base64-to-codon mapping.\n- ```WriteRNA(string text)```\nSimilar to WriteDNA but for RNA. It maps each character (again trimming any padding) to its corresponding RNA codon.\n- ```ReadDNA(Chromosome _DNA)``` \u0026 ```ReadRNA(string _RNA)```\nDecodes a DNA (or RNA) sequence back into text using polymerase decoding logic.\n\nThis library enables the conversion:\n- **String/Bytes → Base64 → DNA**\n- **DNA → Base64 → String/Bytes**\n\nBy leveraging codons and mapping them to Base64 characters, we maintain a structured approach to encoding biological-like sequences while ensuring compatibility with standard data representations.\n\n---\n\n## Features\n\n **Codon-to-Base64 Mapping**  \nEach possible DNA codon (64 combinations) is assigned a unique Base64 character for efficient encoding.\n\n **Base64 Encoding \u0026 Decoding with DNA Integration**  \nEncodes strings into Base64 while mapping back into structured DNA sequences.\n\n **Reverse Decoding from DNA Sequences**  \nTakes DNA-based sequences and converts them back into readable text.\n\n **Splicing \u0026 Codon Extraction**  \nIncludes methods for splitting genome data using break codons and nucleotide-based delimiters.\n\n\n## Example\n```\n    using Lifespark.Genetics;\n    \n    //Encode text or data to mDNA\n    var lifespark = new GeneticEncoder();\n    string genetic_code = lifespark.WriteDNA(\"hello\");\n    Console.WriteLine(\"Genecode: \"+genetic_code);\n    \n    //Form a chromosome with the mDNA and retrieve the DNA strand from it\n    Chromosome dna = new Chromosome(genetic_code);\n    string mDNA = \"\";\n    dna.ForEach(molecule =\u003e mDNA += molecule.Item1);\n    Console.WriteLine(\"Molecule: \"+ mDNA);\n    \n    //mDNA to mRNA conversion\n    string rna_genetic_code = lifespark.DNAtoRNA(genetic_code);\n    \n    //Decode genetic code back to text or bytes\n    string decoded_message = lifespark.ReadDNA(dna);\n    string decoded_message2 = lifespark.ReadRNA(rna_genetic_code);\n\n    Console.WriteLine(\"Encoded Message: \" + genetic_code);\n    Console.WriteLine(\"Decoded DNA Message: \" + decoded_message);\n    Console.WriteLine(\"Decoded RNA Message: \" + decoded_message2);\n\n    //Construct a genome which contains an array of unique chromosomes\n    Genome genome = new Genome(genetic_code);\n    //View the genomes genecode\n    Console.WriteLine(\"Encoded Genome: \" + lifespark.ExportGenomeData(genome));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbifrost-technologies%2Flifespark.genetics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbifrost-technologies%2Flifespark.genetics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbifrost-technologies%2Flifespark.genetics/lists"}