Urgent.News

What's breaking now, across thousands of outlets.

Tech

BioSwift Devlog #1: Let's Compile DNA in Swift

Howdy! I am currently working on building a bioinformatics library for Swift, like BioPython, Rust-Bio, and BioRuby. I am building it on a MacBook Pro from 2018, and I have already faced a few challenges I didn't know about when writing packages in Swift. For instance, I didn't know that renaming a file was that difficult. Xcode started flipping out and erasing code the moment I tried changing my…

Howdy! I am currently developing a bioinformatics library for Swift, similar to BioPython, Rust-Bio, and BioRuby. I am constructing this library on an 2018 MacBook Pro, and I have already encountered some issues I was not aware of when creating packages in Swift. For example, I was unaware of the challenges associated with renaming files.

Xcode became quite agitated when I attempted to change the names of my dna.swift and rna.swift files to DNA.swift and RNA.swift. The file references became confused, and everything turned red. Thankfully, I used GitHub Desktop to recover most of my code, and AI assisted in regenerating the missing enum pieces that were lost on the disk.

In addition to this, I have employed AI to assist with more complex tasks, such as spelling out all 20 amino acid names, which can be quite convoluted (phenylalanine, for instance). Fortunately, the tests I have written have passed after having to reassemble the code. By utilizing ExpressibleByStringLiteral, it is straightforward to initialize and modify the RNASequence and DNASequence types I have created.

Thus far, developing BioSwift has been an enjoyable experience, and I hope to leverage the insights gained from these code ending scenarios that I was previously unaware of. If you wish to view some of my other projects, please visit my GitHub profile: https://github.com/mirrored-chameleon. Thank you for reading!

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Friday 25 September →