if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
if (!require("rtracklayer")) BiocManager::install("rtracklayer")
## Loading required package: rtracklayer
## Loading required package: GenomicRanges
## Loading required package: stats4
## Loading required package: BiocGenerics
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
##     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
##     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
##     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
##     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
##     table, tapply, union, unique, unsplit, which.max, which.min
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:utils':
## 
##     findMatches
## The following objects are masked from 'package:base':
## 
##     expand.grid, I, unname
## Loading required package: IRanges
## Loading required package: GenomeInfoDb
if (!require("ggplot2")) install.packages("ggplot2")
## Loading required package: ggplot2
if (!require("ggbio")) BiocManager::install("ggbio")
## Loading required package: ggbio
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
## Need specific help about ggbio? try mailing 
##  the maintainer or visit https://lawremi.github.io/ggbio/
## 
## Attaching package: 'ggbio'
## The following objects are masked from 'package:ggplot2':
## 
##     geom_bar, geom_rect, geom_segment, ggsave, stat_bin, stat_identity,
##     xlim
if (!require("stringr")) install.packages("stringr")
## Loading required package: stringr
## 
## Attaching package: 'stringr'
## The following object is masked from 'package:ggbio':
## 
##     fixed
if (!require("tools")) install.packages("tools")
## Loading required package: tools
install.packages("/Users/ozlemtuna/Downloads/scDAPA/scDAPAminer_1.1.tar.gz",repos = NULL, type = "source")
## Installing package into '/Users/ozlemtuna/Library/R/arm64/4.3/library'
## (as 'lib' is unspecified)
library(scDAPAminer)
input_file1 <- system.file("extdata", "MG0.anno", package = "scDAPAminer")
input_file2 <- system.file("extdata", "sMG3.anno", package = "scDAPAminer")
scDAPAdetect(file1=input_file1,file2=input_file2,type='f2f',output_dir='./',bin_size=100,count_cutoff=20)
## [1] "type f2f"
## [1] "perform MG0 vs. sMG3 comparision..."
input_file1 <- system.file("extdata", "MG0.anno", package = "scDAPAminer")
input_file2 <- system.file("extdata", "sMG3.anno", package = "scDAPAminer")
# download Mus_musculus.GRCm38.84.gtf from Ensembl.
gtf=import('/Users/ozlemtuna/Downloads/scDAPA/Mus_musculus.GRCm38.84.gtf')
dp = scDAPAview(files=c(input_file1,input_file2),alt_names=c('MG0','sMG3'),gtf=gtf,gene_id='ENSMUSG00000073490')
## Constructing graphics...
dp
## Coordinate system already present. Adding new coordinate system, which will
## replace the existing one.
## Coordinate system already present. Adding new coordinate system, which will
## replace the existing one.
## Coordinate system already present. Adding new coordinate system, which will
## replace the existing one.