Writing an R function to read FASTA-formatted files (CC289)

June 10, 2024 • PD Schloss • 1 min read

Watch along as Pat shows the development of a function for reading in a FASTA-formatted file. FASTA files are commonly used to store DNA sequence information. He uses Test Driven Development (TDD) to develop and refactor the function to suit our needs. Along the way, he makes use of temporary files using the tempfile function and a variety of functions from the stringi package that stringr is based on. This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.

Code

You can browse the state of the repository at the