... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
Package: crisprDesign |
2 | 2 |
Title: Comprehensive design of CRISPR gRNAs for nucleases and base editors |
3 |
-Version: 1.7.0 |
|
3 |
+Version: 1.7.1 |
|
4 | 4 |
Authors@R: c( |
5 | 5 |
person("Jean-Philippe", "Fortin", email = "[email protected]", role = c("aut", "cre")), |
6 | 6 |
person("Luke", "Hoberecht", email = "[email protected]", role = c("aut")) |
... | ... |
@@ -24,13 +24,14 @@ getTssObjectFromTxObject <- function(txObject){ |
24 | 24 |
tss <- tss[!duplicated(mcols(tss)[,cols])] |
25 | 25 |
tss$promoter <- tss$tx_id |
26 | 26 |
tss$ID <- paste0(tss$gene_id, "_", tss$promoter, recycle0=TRUE) |
27 |
+ |
|
27 | 28 |
# Making sure we only retain one coordinate: |
28 |
- if (length(tss) > 0){ |
|
29 |
- if (as.character(strand(tss))[[1]]=="+"){ |
|
30 |
- end(tss) <- start(tss) |
|
31 |
- } else { |
|
32 |
- start(tss) <- end(tss) |
|
33 |
- } |
|
34 |
- } |
|
29 |
+ whPos <- which(strand(tss) == "+") |
|
30 |
+ whNeg <- which(strand(tss) == "-") |
|
31 |
+ end(tss)[whPos] <- start(tss)[whPos] |
|
32 |
+ start(tss)[whNeg] <- end(tss)[whNeg] |
|
33 |
+ |
|
35 | 34 |
return(tss) |
36 | 35 |
} |
36 |
+ |
|
37 |
+ |