Creates a CAN_data
object from a tibble or data-frame of candidate genes.
Details
The input data should have one row per gene, and at least the following columns:
chromosome
: character column, chromosome on which the gene is located.start
andend
: numeric, starting and end position of the gene (in bp). A columnposition
will be constructed as the middle value (mean) betweenstart
andend
.name
: character, the name of the candidate genes to be displayed.
Examples
x <- get_example_data()
CAN_data(x[["CAN"]])
#> # A tibble: 32 × 7
#> id chromosome start end name gene_name position
#> <chr> <chr> <dbl> <dbl> <chr> <chr> <dbl>
#> 1 PGSC0003DMG400003155 ST4.03ch03 46757152 46762127 4CL 4-coumar… 4.68e7
#> 2 PGSC0003DMG400014223 ST4.03ch03 57466692 57469946 4CL2 4-coumar… 5.75e7
#> 3 PGSC0003DMG400011189 ST4.03ch07 1001854 1006278 HQT HQT 1.00e6
#> 4 PGSC0003DMG400005492 ST4.03ch05 36342746 36347409 PAL phenylal… 3.63e7
#> 5 PGSC0003DMG400005279 ST4.03ch05 42523943 42525912 peroxi… peroxida… 4.25e7
#> 6 PGSC0003DMG400007782 ST4.03ch03 38537202 38540209 PHO1A PHO1A 3.85e7
#> 7 PGSC0003DMG400023182 ST4.03ch02 10091564 10093164 LIPIII… LipIII27 1.01e7
#> 8 PGSC0003DMG400029576 ST4.03ch08 45676042 45677832 PPOs Polyphen… 4.57e7
#> 9 PGSC0003DMG400018924 ST4.03ch08 45778567 45780333 NA Polyphen… 4.58e7
#> 10 PGSC0003DMG400018919 ST4.03ch08 45793661 45794229 NA Polyphen… 4.58e7
#> # ℹ 22 more rows