From tabular data to Genomic Ranges
In the video, you learned ways to create GRanges objects. You can define a GRange with a range's name, start, and end positions (seqnames, start, and end). If you have data in table format, you can also transform it into a GRanges object. Let's use a data frame, called seq_intervals, as this is most likely where you have stored your sequence intervals. Note: you can also use a tibble if you are more familiar with them.
You will use the predefined seq_intervals data frame to transform into a GRanges object using the as() function. The as() function was introduced in the last video - it takes in an object and the name of the class to convert the object to.
Diese Übung ist Teil des Kurses
Introduction to Bioconductor in R
Anleitung zur Übung
- Load
GenomicRanges. - Print
seq_intervalsto see how it looks. - Transform
seq_intervalsinto aGRangesobject, call the new objectmyGR. - Print
myGR.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Load GenomicRanges package
library(GenomicRanges)
# Print seq_intervals
___
# Create myGR
___ <- ___(___, "___")
# Print myGR
___