Skip to content

makeBaseCalls can ignore the highest signal #5

@cbird808

Description

@cbird808

It looks like the makeBaseCalls() function can ignore the dominant peak when a nucleotide is repeated, especially when the signal does not return to zero between nucleotides. I tried to upload an ab1 file, but it's not supported. Instead, I provided the images of the chromatograms before and after makeBaseCalls(), as well as the R script below

original_primary_base_calls

makeBaseCalls

#### Packages ####
packages_used <- 
  c(
    "rstudioapi", # have to install from github, messes up tidyverse code, have to add dplyr:: to several commands
    "tidyverse",
    "janitor",
    "sangerseqR"
  )

packages_to_install <- 
  packages_used[!packages_used %in% 
                  installed.packages()[,1]]

if (length(packages_to_install) > 0) {
  install.packages(
    packages_to_install, 
    Ncpus = Sys.getenv("NUMBER_OF_PROCESSORS") - 1
  )
}

lapply(packages_used, 
       require, 
       character.only = TRUE)

#### SETDIR ####

setwd(dirname(rstudioapi::getActiveDocumentContext()$path))

#### ####
browseVignettes("sangerseqR")

test_ab1 <- 
  read.abif("../data/rbd_01_E1_LCO1490_2023-12-28_A07.ab1")

test_sanger <-
  readsangerseq("../data/rbd_01_E1_LCO1490_2023-12-28_A07.ab1")

primarySeq(test_sanger)

primarySeq(test_sanger,
           string=TRUE)

chromatogram(
  test_sanger, 
  # width = 80, 
  # height = 3, 
  trim5 = 10, 
  trim3 = 1,
  showcalls = "primary",
  showtrim = TRUE
  )

# first chromatogram image clipped

hetcalls <- 
  makeBaseCalls(
    test_sanger, 
    ratio = 0.33
    )

chromatogram(
  hetcalls, 
  # width = 80, 
  # height = 3, 
  trim5 = 10, 
  trim3 = 1,
  showcalls = "both",
  showtrim = TRUE
)

# second chromatogram image clipped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions