`r if(!is.null(params$navigationAlignmentFN)){ "

SangerAlignment Level

" }` `r if(!is.null(params$navigationContigFN)){ "

SangerContig Level

" }`

SangerRead Level

library(sangeranalyseR)

Basic Information:

  • Output Directory : r params$outputDir
  • Input Directory : r dirname(params$SangerRead@readFileName)
  • Input Filename : r basename(params$SangerRead@readFileName)
  • Read Feature : r params$SangerRead@readFeature


DNA Seqence

Primary Sequence

if (params$colors == "default") {
  A_color = "#1eff00"
  T_color = "#ff7a7a"
  C_color = "#7ac3ff"
  G_color = "#c9c9c9"
  unknown_color = "purple"
} else if (params$colors == "cb_friendly") {
  A_color = rgb(122, 122, 122, max = 255)
  T_color = rgb(199, 199, 199, max = 255)
  C_color = rgb(0, 114, 178, max = 255)
  G_color = rgb(213, 94, 0, max = 255)
  unknown_color = rgb(204, 121, 167, max = 255)
} else {
  A_color = params$colors[1]
  T_color = params$colors[2]
  C_color = params$colors[3]
  G_color = params$colors[4]
  unknown_color = params$colors[5]
}
primarySeq <- unlist(strsplit(as.character(params$SangerRead@primarySeq), ""))
primarySeqDF <- data.frame(t(data.frame(primarySeq)), stringsAsFactors = FALSE)
colnames(primarySeqDF) <- substr(colnames(primarySeqDF), 2, 100)
rownames(primarySeqDF) <- NULL
AstyleList <- SetCharStyleList(primarySeqDF, "A", A_color)
TstyleList <- SetCharStyleList(primarySeqDF, "T", T_color)
CstyleList <- SetCharStyleList(primarySeqDF, "C", C_color)
GstyleList <- SetCharStyleList(primarySeqDF, "G", G_color)
styleList <- c(AstyleList, TstyleList, CstyleList, GstyleList)
suppressWarnings(suppressMessages(
  excelTable(data = primarySeqDF, defaultColWidth = 30,
             editable = FALSE, rowResize = FALSE,
             columnResize = FALSE, allowInsertRow = FALSE,
             allowInsertColumn = FALSE, allowDeleteRow = FALSE,
             allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
             style = styleList, loadingSpin = TRUE, autoWidth = FALSE)
))

Secondary Sequence

if (params$colors == "default") {
  A_color = "#1eff00"
  T_color = "#ff7a7a"
  C_color = "#7ac3ff"
  G_color = "#c9c9c9"
  unknown_color = "purple"
} else if (params$colors == "cb_friendly") {
  A_color = rgb(122, 122, 122, max = 255)
  T_color = rgb(199, 199, 199, max = 255)
  C_color = rgb(0, 114, 178, max = 255)
  G_color = rgb(213, 94, 0, max = 255)
  unknown_color = rgb(204, 121, 167, max = 255)
} else {
  A_color = params$colors[1]
  T_color = params$colors[2]
  C_color = params$colors[3]
  G_color = params$colors[4]
  unknown_color = params$colors[5]
}
secondarySeq <-unlist(strsplit(as.character(params$SangerRead@secondarySeq), ""))
secondarySeqDF <- data.frame(t(data.frame(secondarySeq)), stringsAsFactors = FALSE)
colnames(secondarySeqDF) <- substr(colnames(secondarySeqDF), 2, 100)
rownames(secondarySeqDF) <- NULL
AstyleList <- SetCharStyleList(secondarySeqDF, "A", A_color)
TstyleList <- SetCharStyleList(secondarySeqDF, "T", T_color)
CstyleList <- SetCharStyleList(secondarySeqDF, "C", C_color)
GstyleList <- SetCharStyleList(secondarySeqDF, "G", G_color)
styleList <- c(AstyleList, TstyleList, CstyleList, GstyleList)
suppressWarnings(suppressMessages(
    excelTable(data = secondarySeqDF, defaultColWidth = 30,
               editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
               style = styleList, loadingSpin = TRUE, autoWidth = FALSE)
))

Phred Quality Scores

PhredScoreDF <- data.frame(t(data.frame(params$SangerRead@QualityReport@qualityPhredScores)), stringsAsFactors = FALSE)
colnames(PhredScoreDF) <- substr(colnames(PhredScoreDF), 2, 100)
rownames(PhredScoreDF) <- NULL
styleList <- SetAllStyleList(PhredScoreDF, "#ecffd9")
suppressWarnings(suppressMessages(
    excelTable(data = PhredScoreDF, defaultColWidth = 30, editable = FALSE,
               rowResize = FALSE, columnResize = FALSE,
               allowInsertRow = FALSE, allowInsertColumn = FALSE,
               allowDeleteRow = FALSE, allowDeleteColumn = FALSE,
               style = styleList, allowRenameColumn = FALSE,
               loadingSpin = TRUE, autoWidth = FALSE)
))


Amino Acids Sequence

Amino Acids Sequence frameshit 0

AAString <- data.frame(AAString(params$SangerRead@primaryAASeqS1))
AAStringDF <- data.frame(t(AAString), stringsAsFactors = FALSE)
colnames(AAStringDF) <- substr(colnames(AAStringDF), 2, 100)
rownames(AAStringDF) <- NULL
width <- rep(90, length(AAStringDF))
if (length(AAStringDF) == 0) {
  suppressWarnings(suppressMessages(
    excelTable(data = AAStringDF, columns = data.frame(width = width),
               defaultColWidth = 90, editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE, 
               autoWidth = FALSE)
  )) 
} else {
  styleList1 <- SetAllStyleList(AAStringDF, "#ecffd9")
  styleList2 <- SetCharStyleList (AAStringDF, "*", "#cf0000")
  styleList <- c(styleList1, styleList2)
  suppressWarnings(suppressMessages(
    excelTable(data = AAStringDF, columns = data.frame(width = width),
               defaultColWidth = 90, editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
               style = styleList, autoWidth = FALSE)
  )) 
}

Amino Acids Sequence frameshit 1

AAString <- data.frame(AAString(params$SangerRead@primaryAASeqS2))
AAString <- rbind(NA, AAString)
AAStringDF <- data.frame(t(AAString), stringsAsFactors = FALSE)
colnames(AAStringDF) <- substr(colnames(AAStringDF), 2, 100)
rownames(AAStringDF) <- NULL
width <- rep(90, length(AAStringDF) - 1)
width <- c(30, width)
styleList1 <- SetAllStyleList(AAStringDF, "#ecffd9")
styleList2 <- SetCharStyleList (AAStringDF, "*", "#cf0000")
styleList <- c(styleList1, styleList2)
styleList[['A1']] <- 'background-color: black;'
suppressWarnings(suppressMessages(
    excelTable(data = AAStringDF, columns = data.frame(width = width),
               defaultColWidth = 90, editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
               style = styleList, autoWidth = FALSE)
))

Amino Acids Sequence frameshit 2

AAString <- data.frame(AAString(params$SangerRead@primaryAASeqS3))
AAString <- rbind(NA, NA, AAString)
AAStringDF <- data.frame(t(AAString), stringsAsFactors = FALSE)
colnames(AAStringDF) <- substr(colnames(AAStringDF), 2, 100)
rownames(AAStringDF) <- NULL
width <- rep(90, length(AAStringDF) - 2)
width <- c(30, 30, width)
styleList1 <- SetAllStyleList(AAStringDF, "#ecffd9")
styleList2 <- SetCharStyleList (AAStringDF, "*", "#cf0000")
styleList <- c(styleList1, styleList2)
styleList[['A1']] <- 'background-color: black;'
styleList[['B1']] <- 'background-color: black;'
suppressWarnings(suppressMessages(
    excelTable(data = AAStringDF, columns = data.frame(width = width),
               defaultColWidth = 90, editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
               style = styleList, autoWidth = FALSE)
))


Quality Trimming

    `r if(params$SangerRead@QualityReport@TrimmingMethod == "M1"){"
  • **Trimming Method**: Method 1 'Logarithmic Scale Trimming'
  • "}` `r if(params$SangerRead@QualityReport@TrimmingMethod == "M2"){"
  • **Trimming Method**: Method 2 'Logarithmic Scale Sliding Window Trimming'
  • "}` `r if(params$SangerRead@QualityReport@TrimmingMethod == "M1"){paste("
  • **M1 Trimming Cutoff**: ", params$SangerRead@QualityReport@M1TrimmingCutoff, "
  • ")}` `r if(params$SangerRead@QualityReport@TrimmingMethod == "M2"){paste("
  • **M2 Cutoff Quality Score**: ", params$SangerRead@QualityReport@M2CutoffQualityScore, "
  • ")}` `r if(params$SangerRead@QualityReport@TrimmingMethod == "M2"){paste("
  • **M2 Cutoff Quality Score**: ", params$SangerRead@QualityReport@M2SlidingWindowSize, "
  • ")}`
  • **Raw Sequence Length**: `r params$SangerRead@QualityReport@rawSeqLength`
  • **Trimmed Sequence Length**: `r params$SangerRead@QualityReport@trimmedSeqLength`
  • **Trimmed Start Point**: `r params$SangerRead@QualityReport@trimmedStartPos`
  • **Trimmed End Point**: `r params$SangerRead@QualityReport@trimmedFinishPos`
  • **Raw Mean Quality Score**: `r params$SangerRead@QualityReport@rawMeanQualityScore`
  • **Trimmed Mean Quality Score**: `r params$SangerRead@QualityReport@trimmedMeanQualityScore`
  • **Raw Min Quality Score**: `r params$SangerRead@QualityReport@rawMinQualityScore`
  • **Trimmed Min Quality Score**: `r params$SangerRead@QualityReport@trimmedMinQualityScore`
  • **Remaining Read Ratio**: `r round(params$SangerRead@QualityReport@remainingRatio * 100, 2)` %
wzxhzdk:7
--- # Chromatogram
  • **Signal Ratio Cutoff**: *`r params$SangerRead@ChromatogramParam@signalRatioCutoff`*
  • **Base Number Per Row**: *`r params$SangerRead@ChromatogramParam@baseNumPerRow`*
  • **Height Per Row**: *`r params$SangerRead@ChromatogramParam@heightPerRow`*
  • **Show Trimmed Region**: *`r params$SangerRead@ChromatogramParam@showTrimmed`*
wzxhzdk:8 [Click Here to Open Chromatogram in New Page ](`r file.path(params$outputDir, "Chromatogram.pdf")`)
---
`r if(!is.null(params$navigationContigFN)){paste0('

Back to \'SangerContig\' Report')}`

roblanf/sangeranalyseR documentation built on April 15, 2024, 12:44 a.m.