ComenzarEmpieza gratis

Interacting with IRanges

You can use the IRanges() function to create a single sequence. You can also provide vectors to IRanges() to create multiple sequence ranges at the same time. This is both fascinating and useful! The creation of objects seq_1 and seq_2 are examples of this.

For this exercise, check the width of each of the sequences provided here, using width() and lengths(). Notice the difference between the two types of outputs.

Remember that width = end - start + 1.

Este ejercicio forma parte del curso

Introduction to Bioconductor in R

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Create the first sequence seq_1
seq_1 <- IRanges(start = 10, end = 37)

# Create the second sequence seq_2
seq_2 <- IRanges(start = c(5, 35, 50),
                 end = c(12, 39, 61),
                 names = LETTERS[1:3])

# Check the width of seq_1 and seq_2
___
___
Editar y ejecutar código