Giter Site home page Giter Site logo

kataegisportal's Introduction

KataegisPortal

KataegisPortal is an R package that provides utilities to detect and visualize the Kataegis events from single nucleotide variants (SNVs).

Installation

library(devtools)
install_github("MeichunCai/KataegisPortal")

How to use

# Load packages
library(KataegisPortal)
library(BSgenome)
library(BSgenome.Hsapiens.UCSC.hg19)

# Read in snv data
mutData <- system.file("examples", "mutData.txt", package="KataegisPortal")
mutData <- read.table(mutData, header = TRUE,sep = "\t",as.is = TRUE)
head(mutData)

# Covert to KataegisPortal input
mutSNP = mutSNP.input(mut.data = mutData,
			chr = "chr",
			pos = "pos",
			ref = "ref",
			alt = "alt",
			build = "hg19")

# Identify potential kataegis events
katPoint(mutSNP)

alt text

  • weight.C>X: proportion of C>X mutations
  • confidence: confidence degree of potential kataegis events (range: 0 to 3, 0 - a hypermutation with weight.C>X < 0.8; 1 - one hypermutation with weight.C>X >= 0.8 in a chromosome; 2 - two hypermutations with weight.C>X >= 0.8 in a chromosome; 3 - high confidence with three or more hypermutations with weight.C>X >= 0.8 in a chromosome)
# Identify potential kataegis events with annonation
library(ChIPseeker)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
katPoint(mutSNP,txdb = TxDb.Hsapiens.UCSC.hg19.knownGene)

alt text

# Plot intermutation distance to display kataegis or hyper mutated genomic regions
mutDis.plot(plot.data = mutSNP, sample="Test")

alt text

mutDis.plot(plot.data = mutSNP, sample="Test", chr = "chr2")

alt text

# Plot of flanking sequence of all C>X mutations or C>X mutations within a chromosome/chromosome arm
baseSpe.plot(plot.data = mutSNP, sample="Test")

alt text

baseSpe.plot(plot.data = mutSNP, sample="Test", chr = "chr2",arm="q")

alt text

Citation

  • Xia Yin, Rui Bi, Pengfei Ma, Shengzhe Zhang, Yang Zhang, Yunheng Sun, Yi Zhang, Ying Jing, Minhua Yu, Wenjing Wang, Li Tan, Wen Di #, Guanglei Zhuang #, Mei-Chun Cai #. Multiregion whole-genome sequencing depicts intratumor heterogeneity and punctuated evolution in ovarian clear cell carcinoma. Journal of Medical Genetics. 2019 Dec 20;jmedgenet-2019-106418. doi: 10.1136/jmedgenet-2019-106418.

kataegisportal's People

Contributors

meichuncai avatar

Stargazers

Ao Shen avatar Ashley S Doane avatar Pengfei Xu avatar  avatar Ege Ulgen avatar Sigve Nakken avatar Matthieu Foll avatar

Watchers

Ashley S Doane avatar

kataegisportal's Issues

Issue for install this software

Hello:

I am try to install this software under R. Thanks for developing this. It's pretty good software for analysis Kataegis. I have the following issue to install, Can you help to fix this? Thanks.

install_github("MeichunCai/KataegisPortal")
Downloading GitHub repo MeichunCai/KataegisPortal@master
from URL https://api.github.com/repos/MeichunCai/KataegisPortal/zipball/master
Installing KataegisPortal
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
'/private/var/folders/_0/yvrx0nkx76nfvz85q1dxg27183vg3m/T/RtmpgYZibi/devtools1dd2539e8912/MeichunCai-KataegisPortal-7489603' --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library' --install-tests

  • installing source package ‘KataegisPortal’ ...
    ** R
    ** data
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    Warning: /private/var/folders/_0/yvrx0nkx76nfvz85q1dxg27183vg3m/T/RtmpgYZibi/devtools1dd2539e8912/MeichunCai-KataegisPortal-7489603/man/KataegisPortal.Rd:6: unknown macro '\Detection'
    Warning: /private/var/folders/_0/yvrx0nkx76nfvz85q1dxg27183vg3m/T/RtmpgYZibi/devtools1dd2539e8912/MeichunCai-KataegisPortal-7489603/man/KataegisPortal.Rd:9: unknown macro '\KataegisPortal'
    Warning: /private/var/folders/_0/yvrx0nkx76nfvz85q1dxg27183vg3m/T/RtmpgYZibi/devtools1dd2539e8912/MeichunCai-KataegisPortal-7489603/man/KataegisPortal.Rd:21: unknown macro '\Mei'
    *** installing help indices
    ** building package indices
    Error in read.table(zfile, header = TRUE, as.is = FALSE) :
    more columns than column names
    ERROR: installing package indices failed
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/KataegisPortal’
    Installation failed: Command failed (1)

katPoint fails if no kataegis identified

I was trying to use katPoint to run across many samples, some of which are not going to have kataegis events. This was failing when it encountered samples with 0 events detected with the error:

Error in if (as.numeric(as.character(katPoint.out$"weight.C>X"[i])) <  : 
  missing value where TRUE/FALSE needed

I resolved this by editing the function to nest an additional if statement which only runs the confidence test if there are rows in the dataframe.

if (nrow(katPoint.out > 0)) {
    for (i in 1:dim(katPoint.out)[1]) {
      if (as.numeric(as.character(katPoint.out$"weight.C>X"[i])) < 0.8) {
        katPoint.out$confidence[i] = 0
      } else {
        katPoint.out$confidence[i] <- length(which(subset(katPoint.out,
                                                          as.numeric(as.character(katPoint.out$"weight.C>X")) >= 0.8)$chrom == katPoint.out$chrom[i]))
        if (katPoint.out$confidence[i] > 3) {
          katPoint.out$confidence[i] = 3
        }
      }
    }
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.