View source: R/cigar_to_position.R
cigar_to_position | R Documentation |
Convert cigar string to data frame with matched postions and elements from sequence
cigar_to_position(
cigar,
start,
seq,
name = NULL,
name_col = "seq.name",
rm_clipped = F,
skip_as = NA
)
skip_as |
## Not run:
reads <- scexpr::reads_from_bam(bamfile_path, genomic_ranges = cd81_range, revcomp_minus_strand = F)
reads_sub <- dplyr::slice_sample(reads, n = 40)
pattern_df <- purrr::pmap_dfr(list(reads_sub$cigar, reads_sub$start, reads_sub$seq, reads_sub$readName), function(x,y,z,a) igsc::cigar_to_position(cigar = x, start = y, seq = z, name = a))
algnmt_df <- data.frame(seq = strsplit(chr11_cd81, "")[[1]], position = 2378344:2391242, seq.name = "chr11")
algnmt_df <- rbind(algnmt_df, pattern_df)
plot <- algnmt_plot(algnmt = algnmt_df, algnmt_type = "NT", ref = "chr11")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.