This repository explains functions in R step by step using simple bioinformatics examples.
The goal of this tutorial is to help beginners understand:
- what a function is
- how to write functions in R
- how functions work with loops and conditions
- how functions can be used in simple bioinformatics tasks
Examples in this repository use small DNA sequence problems such as:
- calculating GC content
- checking DNA validity
- classifying DNA sequences
- building simple analysis pipelines
This project is designed as a beginner-friendly learning resource for students interested in:
- bioinformatics
- computational biology
- learning R for biological data
The tutorial is divided into three parts.
Basic concepts of functions in R:
- function structure
- parameters
- return values
- simple examples
File:
Functions-Topic-Explanation.Rmd
Functions-Topic-Explanation.pdf
Practice exercises to help students understand functions.
Exercises start simple and gradually become more complex.
Topics covered:
- writing simple functions
- using loops
- using conditions
- counting values
- simple bioinformatics tasks
File:
r-functions-bioinformatics-practice.Rmd
r-functions-bioinformatics-practice.pdf
Complete solutions for all exercises.
These examples demonstrate:
- clean function design
- input validation
- simple bioinformatics pipelines
File:
r-functions-bioinformatics-solutions.Rmd
r-functions-bioinformatics-solutions.pdf
Example problem used in the tutorial:
Calculate GC content of a DNA sequence.
Example sequence:
A G C T G
GC content formula:
GC content = (number of G + number of C) / total bases
These types of problems are commonly used when learning bioinformatics programming.
- R
- R Markdown
- GitHub
Oğuzhan Işılay
Biotechnology student interested in:
- bioinformatics
- artificial intelligence
- computational biology
GitHub profile: