Browse code

update doc function annotateRepeat

simoc authored on 18/02/2022 14:48:28
Showing 2 changed files

... ...
@@ -57,8 +57,7 @@ targets <- getSeqsFromGRs(
57 57
 
58 58
 # Annotate repeats
59 59
 
60
- repeats <- annotateRepeats(targets, annotationHubID  = "AH5122",
61
- complementary = TRUE)
60
+# repeats <- annotateRepeats(targets, annotationHubID  = "AH5122", complementary = TRUE)
62 61
 
63 62
 }
64 63
 
... ...
@@ -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
+})