Get startedGet started for free

Interaction with classes

Let's say we have an object called a_genome from class BSgenome. With a_genome, you can ask questions like these:

# What is a_genome's main class?
class(a_genome)  # "BSgenome"

# What is a_genome's other classes?
is(a_genome)  # "BSgenome", "Annotated"

# Is a_genome an S4 representation?
isS4(a_genome)  # TRUE

If you want to find out more about the a_genome object, you can use the accessor show(a_genome) or use other specific accessors from the list of .S4methods(class = "BSgenome").

This exercise is part of the course

Introduction to Bioconductor in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Investigate the a_genome using show()
___
Edit and Run Code