cigar_to_position: Convert cigar string to data frame with matched postions and...

View source: R/cigar_to_position.R

cigar_to_positionR Documentation

Convert cigar string to data frame with matched postions and elements from sequence

Description

Convert cigar string to data frame with matched postions and elements from sequence

Usage

cigar_to_position(
  cigar,
  start,
  seq,
  name = NULL,
  name_col = "seq.name",
  rm_clipped = F,
  skip_as = NA
)

Arguments

skip_as

Examples

## 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)

Close-your-eyes/igsc documentation built on Jan. 28, 2024, 10:28 p.m.