SangerAlignment' Report

SangerAlignment Level

SangerContig Level

SangerRead Level

library(sangeranalyseR)

Basic Information:

  • Output Directory : r params$outputDir
  • if (params$SangerAlignment@inputSource == "ABIF" && !is.null(params$SangerAlignment@parentDirectory)) {
        cat("<li>**Input Parent Directory : **  <span><i>", params$SangerAlignment@parentDirectory, "</i></span></li>")
    } else if (params$SangerAlignment@inputSource == "FASTA" && !is.null(params$SangerAlignment@fastaFileName)){
        cat("<li>**Fasta File Name : **  <span><i>", params$SangerAlignment@fastaFileName, "</i></span></li>")
      if (!is.null(params$SangerAlignment@namesConversionCSV)) {
        cat("<li>**Filename Conversion CSV : **  <span><i>", params$SangerAlignment@namesConversionCSV, "</i></span></li>")
      }
    }
    

  • Trimming Method : r params$SangerAlignment@contigList[[1]]@trimmingMethodSC
  • Forward Reads Suffix Regex : r params$SangerAlignment@suffixForwardRegExp
  • Reverse Reads Suffic Regex : r params$SangerAlignment@suffixReverseRegExp
  • Minimum Fraction Call (SA) : r params$SangerAlignment@minFractionCallSA
  • Maximum Fraction Lost (SA) : r params$SangerAlignment@maxFractionLostSA


Contigs Consensus

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 = colors[1]
  T_color = colors[2]
  C_color = colors[3]
  G_color = colors[4]
  unknown_color = colors[5]
}
contigSeqsCon <- unlist(strsplit(as.character(params$SangerAlignment@contigsConsensus), ""))
contigSeqsConDF <- data.frame(t(data.frame(contigSeqsCon)), stringsAsFactors = FALSE)
colnames(contigSeqsConDF) <- substr(colnames(contigSeqsConDF), 2, 100)
rownames(contigSeqsConDF) <- NULL
AstyleList <- SetCharStyleList(contigSeqsConDF, "A", A_color)
TstyleList <- SetCharStyleList(contigSeqsConDF, "T", T_color)
CstyleList <- SetCharStyleList(contigSeqsConDF, "C", C_color)
GstyleList <- SetCharStyleList(contigSeqsConDF, "G", G_color)
styleList <- c(AstyleList, TstyleList, CstyleList, GstyleList)
suppressWarnings(suppressMessages(
    excelTable(data = contigSeqsConDF, defaultColWidth = 30,
               editable = FALSE, rowResize = FALSE,
               columnResize = FALSE, allowInsertRow = FALSE,
               allowInsertColumn = FALSE, allowDeleteRow = FALSE,
               allowDeleteColumn = FALSE, allowRenameColumn = FALSE,
               style = styleList, loadingSpin = TRUE, autoWidth = FALSE)
))


Contigs Alignment

browseSeqHTML <- file.path(params$outputDir, "Contigs_Alignment_BrowseSeqs.html")
BrowseSeqs(DNAStringSet(params$SangerAlignment@contigsAlignment),
           openURL=FALSE, htmlFile=browseSeqHTML)
shiny::includeHTML(browseSeqHTML)


Contigs Tree

if (params$SangerAlignment@contigsTree$tip.label == '') {
  cat("<p style='font-size: 13px; font-weight:bold'> The number of contigs is less than 3 or quality of reads are too low. 'Contigs Tree' cannot be created. </p>")
} else {
  plot(params$SangerAlignment@contigsTree) 
}




Contigs Reports

    if (!is.null(params$contigsFN)) {
      for (i in 1:length(params$contigsFN)){
          cat('<li style = "margin-top: 35px; font-weight: bold">')
          cat('<a style = "margin-top: -10px" role="button" class="btn btn-info" href="',   file.path(".", basename(dirname(params$contigsFN[[i]])), basename(params$contigsFN[[i]])), '">')
          cat(paste0('Go to Contig: "', basename(params$SangerAlignment@contigList[[i]]@contigName), '" Report'))
          cat('</a>\n') 
          cat('</li>')
      }
    }
    
if (is.null(params$contigsFN)) {
    cat("<p style='font-size: 13px; font-weight:bold'> 'includeSangerContig' is 'FALSE'. Contigs are not included in this report. </p>")
}




Try the sangeranalyseR package in your browser

Any scripts or data that you put into this service are public.

sangeranalyseR documentation built on Nov. 8, 2020, 5:59 p.m.