Add inverse strand

add_inverse_strand(gr, verbose = FALSE, plot = FALSE, ...)

Arguments

gr

GRanges-class

verbose

TRUE or FALSE (default)

plot

TRUE or FALSE (default)

...

plot_intervals arguments

Value

GRanges-class

Examples

# PE example #----------- require(magrittr)
#> Lade nötiges Paket: magrittr
bsgenome <- BSgenome.Hsapiens.UCSC.hg38::BSgenome.Hsapiens.UCSC.hg38 gr <- char_to_granges(c(PRNP = 'chr20:4699600:+', # snp HBB = 'chr11:5227002:-', # snp HEXA = 'chr15:72346580-72346583:-', # del CFTR = 'chr7:117559593-117559595:+'), # ins bsgenome) add_inverse_strand(gr, plot = TRUE)
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> Warning: Zeichenbreite unbekannt für das Zeichen 0x9
#> GRanges object with 8 ranges and 3 metadata columns: #> seqnames ranges strand | targetname targetstart #> <Rle> <IRanges> <Rle> | <character> <integer> #> CFTR_f chr7 117559593-117559595 + | CFTR 117559593 #> CFTR_r chr7 117559593-117559595 - | CFTR 117559593 #> HBB_r chr11 5227002 - | HBB 5227002 #> HBB_f chr11 5227002 + | HBB 5227002 #> HEXA_r chr15 72346580-72346583 - | HEXA 72346580 #> HEXA_f chr15 72346580-72346583 + | HEXA 72346580 #> PRNP_f chr20 4699600 + | PRNP 4699600 #> PRNP_r chr20 4699600 - | PRNP 4699600 #> targetend #> <integer> #> CFTR_f 117559595 #> CFTR_r 117559595 #> HBB_r 5227002 #> HBB_f 5227002 #> HEXA_r 72346583 #> HEXA_f 72346583 #> PRNP_f 4699600 #> PRNP_r 4699600 #> ------- #> seqinfo: 595 sequences (1 circular) from hg38 genome
# TFBS example #------------- bedfile <- system.file('extdata/SRF.bed', package='multicrispr') gr <- bed_to_granges(bedfile, genome = 'mm10')
#> Read SRF.bed into GRanges
#> #> Attache Paket: 'BiocGenerics'
#> The following objects are masked from 'package:parallel': #> #> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, #> clusterExport, clusterMap, parApply, parCapply, parLapply, #> parLapplyLB, parRapply, parSapply, parSapplyLB
#> The following objects are masked from 'package:stats': #> #> IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base': #> #> anyDuplicated, 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, which.max, which.min
#> #> Attache Paket: 'S4Vectors'
#> The following object is masked from 'package:base': #> #> expand.grid
#> #> Attache Paket: 'IRanges'
#> The following object is masked from 'package:grDevices': #> #> windows
#> #> Attache Paket: 'Biostrings'
#> The following object is masked from 'package:base': #> #> strsplit
#> 1974 ranges on 21 chromosomes
add_inverse_strand(gr)
#> GRanges object with 3948 ranges and 5 metadata columns: #> seqnames ranges strand | name #> <Rle> <IRanges> <Rle> | <character> #> chr1:4712628-4712643:-_r chr1 4712628-4712643 - | SRF_MA0083.3 #> chr1:4712628-4712643:-_f chr1 4712628-4712643 + | SRF_MA0083.3 #> chr1:5250212-5250227:-_r chr1 5250212-5250227 - | SRF_MA0083.3 #> chr1:5250212-5250227:-_f chr1 5250212-5250227 + | SRF_MA0083.3 #> chr1:5250452-5250467:-_r chr1 5250452-5250467 - | SRF_MA0083.3 #> ... ... ... ... . ... #> chrY:42512400-42512415:-_f chrY 42512400-42512415 + | SRF_MA0083.3 #> chrY:79048176-79048191:-_r chrY 79048176-79048191 - | SRF_MA0083.3 #> chrY:79048176-79048191:-_f chrY 79048176-79048191 + | SRF_MA0083.3 #> chrY:89126494-89126509:-_r chrY 89126494-89126509 - | SRF_MA0083.3 #> chrY:89126494-89126509:-_f chrY 89126494-89126509 + | SRF_MA0083.3 #> score targetname targetstart #> <numeric> <character> <integer> #> chr1:4712628-4712643:-_r 10.49542 chr1:4712628-4712643:- 4712628 #> chr1:4712628-4712643:-_f 10.49542 chr1:4712628-4712643:- 4712628 #> chr1:5250212-5250227:-_r 9.73780 chr1:5250212-5250227:- 5250212 #> chr1:5250212-5250227:-_f 9.73780 chr1:5250212-5250227:- 5250212 #> chr1:5250452-5250467:-_r 5.92033 chr1:5250452-5250467:- 5250452 #> ... ... ... ... #> chrY:42512400-42512415:-_f 6.59053 chrY:42512400-42512415:- 42512400 #> chrY:79048176-79048191:-_r 9.73780 chrY:79048176-79048191:- 79048176 #> chrY:79048176-79048191:-_f 9.73780 chrY:79048176-79048191:- 79048176 #> chrY:89126494-89126509:-_r 4.54393 chrY:89126494-89126509:- 89126494 #> chrY:89126494-89126509:-_f 4.54393 chrY:89126494-89126509:- 89126494 #> targetend #> <integer> #> chr1:4712628-4712643:-_r 4712643 #> chr1:4712628-4712643:-_f 4712643 #> chr1:5250212-5250227:-_r 5250227 #> chr1:5250212-5250227:-_f 5250227 #> chr1:5250452-5250467:-_r 5250467 #> ... ... #> chrY:42512400-42512415:-_f 42512415 #> chrY:79048176-79048191:-_r 79048191 #> chrY:79048176-79048191:-_f 79048191 #> chrY:89126494-89126509:-_r 89126509 #> chrY:89126494-89126509:-_f 89126509 #> ------- #> seqinfo: 66 sequences (1 circular) from mm10 genome