Fix the case of unavailable UCSC website
... | ... |
@@ -59,6 +59,8 @@ |
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
\examples{ |
62 |
+ library(BSgenome.Drerio.UCSC.danRer10) |
|
63 |
+ library(BSgenome.Hsapiens.UCSC.hg38) |
|
62 | 64 |
axtFnHg38DanRer10 <- file.path(system.file("extdata", package="CNEr"), |
63 | 65 |
"hg38.danRer10.net.axt") |
64 | 66 |
axtHg38DanRer10 <- readAxt(axtFnHg38DanRer10) |
... | ... |
@@ -71,8 +73,8 @@ |
71 | 73 |
bedDanRer10Fn <- file.path(system.file("extdata", package="CNEr"), |
72 | 74 |
"filter_regions.danRer10.bed") |
73 | 75 |
bedDanRer10 <- readBed(bedDanRer10Fn) |
74 |
- qSizesHg38 <- fetchChromSizes("hg38") |
|
75 |
- qSizesDanRer10 <- fetchChromSizes("danRer10") |
|
76 |
+ qSizesHg38 <- seqinfo(BSgenome.Hsapiens.UCSC.hg38) |
|
77 |
+ qSizesDanRer10 <- seqinfo(BSgenome.Drerio.UCSC.danRer10) |
|
76 | 78 |
|
77 | 79 |
## Axt object |
78 | 80 |
windows <- c(50L, 50L, 50L) |
... | ... |
@@ -1,27 +1,27 @@ |
1 | 1 |
\name{fetchChromSizes} |
2 | 2 |
\alias{fetchChromSizes} |
3 | 3 |
\title{ |
4 |
-fetchChromSizes function. |
|
4 |
+ fetchChromSizes function. |
|
5 | 5 |
} |
6 | 6 |
\description{ |
7 |
-This function tries to automate the fetch of chromosome sizes for assemblies |
|
7 |
+ This function tries to automate the fetch of chromosome sizes for assemblies |
|
8 | 8 |
from UCSC. |
9 | 9 |
} |
10 | 10 |
\usage{ |
11 |
-fetchChromSizes(assembly) |
|
12 |
- |
|
11 |
+ fetchChromSizes(assembly) |
|
13 | 12 |
} |
14 | 13 |
\arguments{ |
15 | 14 |
\item{assembly}{ |
16 | 15 |
A \code{character} object: the canonical name of assembly, |
17 |
- i.e., hg19 for UCSC. |
|
16 |
+ i.e., \sQuote{hg19} for UCSC. |
|
18 | 17 |
} |
19 | 18 |
} |
20 | 19 |
\details{ |
21 |
-This function utilises mysql queries for UCSC assemblies. |
|
20 |
+ This function downloads \sQuote{chromInfo.txt.gz} from UCSC golden path |
|
21 |
+ for UCSC assemblies. |
|
22 | 22 |
} |
23 | 23 |
\value{ |
24 |
-A object of \code{Seqinfo} is returned. |
|
24 |
+ A object of \code{Seqinfo} is returned. |
|
25 | 25 |
} |
26 | 26 |
\author{ |
27 | 27 |
Ge Tan |
... | ... |
@@ -30,7 +30,6 @@ A object of \code{Seqinfo} is returned. |
30 | 30 |
Currently, the assemblies from UCSC are supported. |
31 | 31 |
} |
32 | 32 |
|
33 |
- |
|
34 | 33 |
\examples{ |
35 | 34 |
\donttest{ |
36 | 35 |
fetchChromSizes("hg19") |
... | ... |
@@ -61,13 +61,14 @@ |
61 | 61 |
} |
62 | 62 |
\examples{ |
63 | 63 |
library(GenomeInfoDb) |
64 |
- |
|
64 |
+ library(BSgenome.Ggallus.UCSC.galGal3) |
|
65 |
+ library(BSgenome.Hsapiens.UCSC.hg19) |
|
65 | 66 |
## dotplot for Axt object |
66 | 67 |
fn <- file.path(system.file("extdata", package="CNEr"), |
67 | 68 |
"chr4.hg19.galGal3.net.axt.gz") |
68 | 69 |
axt <- readAxt(fn) |
69 |
- firstSeqlengths <- seqlengths(fetchChromSizes("hg19")) |
|
70 |
- secondSeqlengths <- seqlengths(fetchChromSizes("galGal3")) |
|
70 |
+ firstSeqlengths <- seqlengths(BSgenome.Hsapiens.UCSC.hg19) |
|
71 |
+ secondSeqlengths <- seqlengths(BSgenome.Ggallus.UCSC.galGal3) |
|
71 | 72 |
firstChrs <- c("chr4") |
72 | 73 |
secondChrs <- c("chr4") |
73 | 74 |
syntenicDotplot(axt, firstSeqlengths, secondSeqlengths, |
... | ... |
@@ -11,8 +11,10 @@ test_that("test_ceScan", { |
11 | 11 |
bedDanRer10Fn <- file.path(system.file("extdata", package="CNEr"), |
12 | 12 |
"filter_regions.danRer10.bed") |
13 | 13 |
bedDanRer10 <- readBed(bedDanRer10Fn) |
14 |
- qSizesHg38 <- fetchChromSizes("hg38") |
|
15 |
- qSizesDanRer10 <- fetchChromSizes("danRer10") |
|
14 |
+ library(BSgenome.Drerio.UCSC.danRer10) |
|
15 |
+ library(BSgenome.Hsapiens.UCSC.hg38) |
|
16 |
+ qSizesHg38 <- seqinfo(BSgenome.Hsapiens.UCSC.hg38) |
|
17 |
+ qSizesDanRer10 <- seqinfo(BSgenome.Drerio.UCSC.danRer10) |
|
16 | 18 |
|
17 | 19 |
windows <- c(50L, 50L, 50L) |
18 | 20 |
identities <- c(45L, 48L, 49L) |