knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(gDE)

Motivation/Background

The primary aim of this project was to create a function for researchers who are working on a disease that may have a genetic linkage. It builds off two disconnected ideas/packages the first is the chromoMap package which has a wonderful chromoMap but is very difficult to implement. Not only is it picky about the files inputted, but there is a large hurdle to overcome just to create the input files. Furthermore, there is a whole host of data from the disgenet API and the disgenet2r package. However, with recent updates, the package has been broken. This project goes straight to the API so this isn't an issue. Furthermore, it takes some of the guess work out of using the API which is fairly technical. Thus, the goal of the function is that it is simple enough so even a new R user could implement it to provide a substanate output for their report. The package includes one main function. The function starts a Shiny Gadget that can be used to provide a number of different outputs: a chromoMap and a data frame. Additionally, the package includes any supporting data sets as well as any functions. I am hoping this project opens up some awesome data to those who would normally struggle to access it! Along with the gadget, there is a $chromoMap_2$ function that can be sued with data outputted from the Gadget to reproduce the chromoMap. There are also two functions $get_diseases$ and $get_chromosomes$ that can be used to reproduce the supporting data files. The chromoMap can be saved as an image after the Gadget is run by using the Viewer window in RStudio (see end of example 1).

Examples

Example 1 (ChromoMap Generation)

genetic_disease_explore()

  1. Select Disease and hit "Create Chromomap" Select Diseaase| 100x{ width=80% }

  2. Click second tab "Chromomap" to view output.

View Map{ width=80% }

3a (optional). To output to R directly, modify the object name and click "Save Chromomap to R". 3b (optional. To output the data files used to create the map click "Save Chromomap Annotations (.txt) and settings (.rds)"

Save Chromomap{ width=80% }

  1. Click 'done'

Select Diseaase{ width=80% }

  1. Save Chromomap to

Select Diseaase{ width=80% }

Example 2 (Gene Table Generation from ChromoMap Genes)

genetic_disease_explore()

  1. Select Disease and hit "Create Chromomap"

Select Diseaase{ width=80% }

  1. Scroll Down Page

  2. Select gene(s) from "or Select Gene," select "Map" input, select columns from "Select Columns for Data Table," and click "Create Gene Table."

Select Diseaase{ width=80% }

  1. Click the third tab "Gene to Disease Table."

5a (optional). Set object name to desired name and click "Save Table to R" 5b (optional). Click "Save Table to CSV"

Select Diseaase{ width=80% }

  1. Click 'done'

Select Diseaase{ width=80% }

Example 3 (Gene Table Generation from User Input)

genetic_disease_explore()

  1. Scroll Down.

  2. Enter Genes Manually, select columns from "Select Columns for Data Table."

Select Diseaase{ width=80% }

3 (conditional). If you have already produced a chromoMap, make sure to select the option "Manual." If you have not created a chromoMap, this will not be an option.

Select Diseaase{ width=80% }

  1. Click the third tab "Gene to Disease Table."

5a (optional). Set object name to desired name and click "Save Table to R" 5b (optional). Click "Save Table to CSV"

Select Diseaase{ width=80% } assign 6. Click 'done'

Select Diseaase{ width=80% }

Example 4 (Using ChromoMap_2)

Step 1. Run Example 1 above including step 3b.

Step 2. Use output files from step 1 in the function below. chromomap_2("chromosomes.txt", "annotations.txt", readRDS("settings.rds"))

Example 5 (Using get_diseases() and get_human_chromosomes())

get_diseases()

Select Diseaase{ width=80% }

get_human_chromosomes(ret = T, write = F)

Future Developments

The future developments of this package are focused on three areas: expanding searchable diseases, expanding fucntionality, and reducing errors. I will discuss the first focus, then the last focus, and then get into the second focus, as that is where the meat is.

The first focus is expanding the searchable diseases. This will really have to occur in one of two ways, but probably both. The first would be to expand the databases/naming used from the API. Currently, only the Currated db is being used and the naming ued is CPT. I could expand the API to use other databases and other naming conventions automatically so there are more diseases for the user and it remains seemless. The second would be to find other sources to scrape that provide more comprehensive disease-gene relations.

The second focus is reducing errors. This will be done by having users use and break the function and then I will have to find ways to make the code more robust against these errors. I can also go back in and add more tryCatches. Additionally, a specific focus I will have will be on making sure that the chromoMap resets each time a new disease is selected. This is a current flaw I have been unable to fix and will continue to work on.

Finally, the fun part, expanding fucntionality. There is a great deal more than can be done with this gadget. Right now it looks at simple disease-gene relations but I would love to implement information on genes to proteins, gene expression, etc. Furthermore, I am interested on finding a way to produce other visuals such as being able to have a map that shows genes shared by various diseases so that one could further explore relationships. The possibilities are endless. A final interest of mine would be finding a way to work in a statistical test in some way or another surrounding this data, but I am not yet sure what form that might take.



lharris421/gdexpl documentation built on Dec. 23, 2019, 6:38 p.m.