Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

ScottCalcalas/XZDBfunction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'XZDBfunction' R Package: Genomic Database Website Browser

  • A user-friendly database and web browser application for searching, annotating, and exporting genomic and proteomic metadata across multiple datasets.
  • Supports gene expressing & protein interaction datasets.
  • The only dependency is R ; works on Windows, macOS, and Linux. Easy to launch instructions available.
Overview Start Page
Shiny UI Overview Shiny UI FirstPage

Please go to reference page to check the list of analysis functions for statistical and biological analysis in this package.

Quick Tour

(Contains setup code for R, launching the web browser directly with an example dataset)

install.packages("remotes") # Skip this step if you already have "remotes" package
remotes::install_github("scottcalcalas/XZDBfunction")
library(XZDBfunction)

XZDB.Run() #Launch a demo - with example datasets

Setup Database

(Step-by-step setup instructions for R, and how to launch the database browser directly with example/your dataset)

1. Get protocol and set up your own database

?xzdb.help()
xzdb.help() #Get protocols and setup instructions

# Transfer your datasets to the current folder, check everything is OK to run next step.
xzdb.input.all()    #Build the database in current folder and copy them to R package.
# After this step, R always uses your own dataset instead of the example dataset

(See details)

2. Launch the genomic website browser in two different ways

XZDB.Run()                 # launches browser; if you already ran xzdb.input.all(), it will use your own dataset instead of the example dataset

XZDB.Run(use_current = T)  # Force running on current path. Requires setup datasets.

Browser Functions

Please click on the following Protocols to view detailed instructions.

Function 1. Search

Use the Search tab to obtain detailed search results.


Supported search options:

  • Gene Symbol: exact, family, fuzzy
  • Protein ID: exact match
  • ENSEMBL Gene ID: exact match

(Family search: seaching for gene/proteins start with the same letters but haveing different numbers at end. NCBP2 family search will also includes NCBP1.)

(Fuzzy search: use threshold of 0.1 to have a very permissive, broad search.)


Example: exact searching CDK13 and NCBP2 returns all matching rows for either CDK13 or NCBP2 across all datasets.

The app generates three files automatically:

  • Full results
  • Details for Gene 1
  • Details for Gene 2

Shiny UI function1

Each line represents a row found in our current database, with that database’s description at the beginning.



Function 2. Check

Use the Check tab to:

  • See which datasets include a specific gene
  • Confirm if the gene exists in the database

Shiny UI function2



Function 3. Data information

On the Data info tab, use "Load Data info" button to view dataset metadata and structure.

Shiny UI function3



Function 4. Output Files

Open the Output files tab to:

  • Preview a result file (using the red Preview Selected button)
  • Download results (using the Download button in each row)

Note:
Not all outputs can be previewed.
The output folder should be cleared monthly to prevent slowdowns—please save results you want to keep in other folders.

Shiny UI function4



Function 5. Update Database

(Optional — only needed if updating dataset metadata)

After updating:

  • datasets/
  • Datasets information.xlsx

Run "Rebuild EVERYTHING" at Administrator Operations in the left panel:

Shiny UI function5



Function 6. UniProt/MINT Comparison

  • UniProt: retrieves protein entry information
  • MINT: retrieves protein–protein interaction data based on UniProt ID

Requires an internet connection.

If you search from current result: Shiny UI function6.1


If you type the ID: Shiny UI function6.2


The summary table and the Venn diagram will be like: Shiny UI function6.3




Setup a New Database

(For package user to setup database inside R)

To use helper to create your own dataset, run:

xzdb.help()
xzdb.input.all()        # Run this after modifying the copied files

Synchronize all datasets and index files(include Datasets information.xlsx) into the package shinyapp directly

xzdb.sync.to.shinyapp() #No need to run if you already run xzdb.input.all()

Get the currently used datasets inside the package location (If you want to confirm it's copied successfully)

xzdb.nowDataset()          #It copies current using datasets to your working path

Example package storage location, inside R package:

 R\R-4.4.3\library\XZDBfunction\shinyapp

After those steps, start the browser and run "Rebuild EVERYTHING" at Administrator Operations.


Instructions to Configure Local Quick Start

(If you want to use it as one click, instead of opening R)

Steps:

0. Configure R file

To make a quick start R file, put these two lines:

library(XZDBfunction)
XZDB.Run()

For example, it can be called Quick_Start.R. The next step is just setting up to run this file using R (not RStudio).

1. Auto Start

(Check examples at Appendix)

On Windows:

A desktop shortcut can automatically launch the Genomic DB Browser, as long as R is installed.

On Mac:

  1. Ensure R is installed.
  2. Open the project folder.
  3. Double-click MAC_Start.command. If the Mac start script fails, use the backup version inside the App_Info folder.

2.Start & Package Installation

On the first run, the script will automatically install any missing R packages.

Once installation finishes, the app will open in your browser automatically.

3.Last Step

After finishing:

  • Close the browser tab
  • Close R / RStudio / Terminal

Appendix

A1.Windows Shortcut Example

Modify the shortcut Target to point to Rscript and your Quick Start script: (For example:)

C:\Users\jcc1885\AppData\Local\Programs\R\R-4.4.3\bin\Rscript.exe "R:\Basic_Sciences\Pharm\Borden_Lab\borden\Database\Genomic result Browser\Quick Start.R"

A2.Mac “One-Click Start” Command File

Create a file named something.command (e.g. MAC_Start.command) on the Desktop:

#!/bin/bash
# Launch script
# ...

Then run

cd ~/Desktop
chmod +x something.command

After those steps, double-click the file to launch the website browser application.

A3. Update local R script (If you're using local based instead of package based)

Copy and replace your local scripts using the scripts at github location: XZDBfunction/inst/shinyapp/