... | ... |
@@ -1,51 +1,51 @@ |
1 |
-# setwd(file.path(getwd(), "testdata")) |
|
2 |
-# |
|
3 |
-# context("Test that annotateRepeats() function works correctly") |
|
4 |
-# test_that("annotateRepeats() generates the correct data structure", { |
|
5 |
-# |
|
6 |
-# gtf <- formatGTF(pathToGTF = "gencodeVM16.gtf") |
|
7 |
-# # Retrieve back-spliced junctions coordinates |
|
8 |
-# backSplicedJunctions <- getBackSplicedJunctions(gtf) |
|
9 |
-# mergedBSJunctions <- mergeBSJunctions(backSplicedJunctions, gtf) |
|
10 |
-# |
|
11 |
-# # Retrieve the genomic features of the circRNAs |
|
12 |
-# annotatedBSJs <- annotateBSJs(mergedBSJunctions[1, ], gtf) |
|
13 |
-# |
|
14 |
-# if (requireNamespace("BSgenome.Mmusculus.UCSC.mm10", quietly = TRUE)){ |
|
15 |
-# # Get BSgenome object |
|
16 |
-# genome <- BSgenome::getBSgenome("BSgenome.Mmusculus.UCSC.mm10") |
|
17 |
-# |
|
18 |
-# # Retrieve sequences type = "ie" |
|
19 |
-# targets <- |
|
20 |
-# getSeqsFromGRs( |
|
21 |
-# annotatedBSJs, |
|
22 |
-# genome, |
|
23 |
-# lIntron = 500, |
|
24 |
-# lExon = 10, |
|
25 |
-# type = "ie" |
|
26 |
-# |
|
27 |
-# ) |
|
28 |
-# |
|
29 |
-# # Retrieve overlapping repeats |
|
30 |
-# |
|
31 |
-# repeats <- |
|
32 |
-# annotateRepeats( |
|
33 |
-# targets, |
|
34 |
-# annotationHubID = "AH6075", |
|
35 |
-# complementary = TRUE |
|
36 |
-# ) |
|
37 |
-# |
|
38 |
-# expect_is(repeats, "list") |
|
39 |
-# expect_equal(length(repeats), 2) |
|
40 |
-# }else{ |
|
41 |
-# cat( |
|
42 |
-# "Missing package BSgenome.Mmusculus.UCSC.mm10. |
|
43 |
-# Use BiocManager to install it." |
|
44 |
-# ) |
|
45 |
-# } |
|
46 |
-# |
|
47 |
-# |
|
48 |
-# |
|
49 |
-# |
|
50 |
-# |
|
51 |
-# }) |
|
1 |
+setwd(file.path(getwd(), "testdata")) |
|
2 |
+ |
|
3 |
+context("Test that annotateRepeats() function works correctly") |
|
4 |
+test_that("annotateRepeats() generates the correct data structure", { |
|
5 |
+ |
|
6 |
+ gtf <- formatGTF(pathToGTF = "gencodeVM16.gtf") |
|
7 |
+ # Retrieve back-spliced junctions coordinates |
|
8 |
+ backSplicedJunctions <- getBackSplicedJunctions(gtf) |
|
9 |
+ mergedBSJunctions <- mergeBSJunctions(backSplicedJunctions, gtf) |
|
10 |
+ |
|
11 |
+ # Retrieve the genomic features of the circRNAs |
|
12 |
+ annotatedBSJs <- annotateBSJs(mergedBSJunctions[1, ], gtf) |
|
13 |
+ |
|
14 |
+ if (requireNamespace("BSgenome.Mmusculus.UCSC.mm10", quietly = TRUE)){ |
|
15 |
+ # Get BSgenome object |
|
16 |
+ genome <- BSgenome::getBSgenome("BSgenome.Mmusculus.UCSC.mm10") |
|
17 |
+ |
|
18 |
+ # Retrieve sequences type = "ie" |
|
19 |
+ targets <- |
|
20 |
+ getSeqsFromGRs( |
|
21 |
+ annotatedBSJs, |
|
22 |
+ genome, |
|
23 |
+ lIntron = 500, |
|
24 |
+ lExon = 10, |
|
25 |
+ type = "ie" |
|
26 |
+ |
|
27 |
+ ) |
|
28 |
+ |
|
29 |
+ # Retrieve overlapping repeats |
|
30 |
+ |
|
31 |
+ # repeats <- |
|
32 |
+ # annotateRepeats( |
|
33 |
+ # targets, |
|
34 |
+ # annotationHubID = "AH6075", |
|
35 |
+ # complementary = TRUE |
|
36 |
+ # ) |
|
37 |
+ # |
|
38 |
+ # expect_is(repeats, "list") |
|
39 |
+ # expect_equal(length(repeats), 2) |
|
40 |
+ }else{ |
|
41 |
+ cat( |
|
42 |
+ "Missing package BSgenome.Mmusculus.UCSC.mm10. |
|
43 |
+ Use BiocManager to install it." |
|
44 |
+ ) |
|
45 |
+ } |
|
46 |
+ |
|
47 |
+ |
|
48 |
+ |
|
49 |
+ |
|
50 |
+ |
|
51 |
+}) |