Nothing
#' Mapping combined ui
#'
#' @param id Shiny module identifier
mappingCombinedUserInterface <- function(id) {
nsMapComb <- shiny::NS(id)
bslib::layout_sidebar(
htmltools::tags$head(
htmltools::tags$style(htmltools::HTML("
.tooltip-inner {
max-width: 400px; /* Adjust the width */
white-space: normal; /* Allow text to wrap */
text-align: left; /* Optional: aligns text to the left */
border-radius: 4px !important; /* Less curvature */
background-color: #202020; /* Optional: lighter background */
color: #FFFFFF; /* Optional: darker text for readability */
border: 1px solid #ccc; /* Optional: subtle border */
}
"))
),
htmltools::tags$style(".selectize-dropdown {position: static}"),
shinyjs::useShinyjs(), # Enables JavaScript for more interactive features
bslib::input_dark_mode(id = "dark_mode"), # Toggle for dark mode
sidebar = bslib::sidebar(
width = "23%",
bslib::accordion(
bslib::accordion_panel(
"BASIC OPTIONS", icon = bsicons::bs_icon("sliders"),
shiny::fluidRow(shiny::column(12,align="center",
htmltools::tags$hr(htmltools::h5("Step 1 - Set input/output")),
htmltools::br())), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shinyFiles::shinyDirButton(nsMapComb("CombIndex"),
"Select the folder containing the concatenated reference genome index",
title = "Select the folder containing the concatenated reference genome index.",
icon = shiny::icon("upload")),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"This folder contains the combined index, generated by the previous genome indexing module in combined mode.",
placement = "right"
)
),
# Displays the selected input directory path
shiny::verbatimTextOutput(nsMapComb("MappingPathConcatenatedIndexCombined")), ## combined index folder selected
)), # close fluidrow combuned genome
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shinyFiles::shinyDirButton(nsMapComb("CombinedReads"),
"Choose the folder that stores the read files",
title = "Please select the folder where the sample files (FASTQ format) are stored.",
icon = shiny::icon("upload")),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"This is the input folder containing the raw read files in FASTQ format, which can be either compressed or uncompressed. Supported file extensions include:
filename1_1.fastq
filename1_2.fastq
filename1_1.fastq.gz
filename1_2.fastq.gz
filename1_1.fq
filename1_2.fq
filename1_1.fq.gz
filename1_2.fq.gz",
placement = "right"
)
),
# Displays the selected input directory path
shiny::verbatimTextOutput(nsMapComb("MappingPathReadsCombined")), ## reads folder selected
)), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shinyFiles::shinyDirButton(nsMapComb("CombBam"),
"Select alignment output folder",
title = "Select the output folder where the alignments onto the combined genome will be stored.",
icon = shiny::icon("download")),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"This folder will store the read alignment files.",
placement = "right"
)
),
# Displays the selected input directory path
shiny::verbatimTextOutput(nsMapComb("MappingPathOutBamCombined")) ## results folder selected
)) #close fluidrow
), ## close accordion_panel
bslib::accordion_panel(
"ADVANCED OPTIONS", icon = bsicons::bs_icon("sliders"),
shiny::fluidRow(shiny::column(12,align="center",
htmltools::tags$hr(htmltools::h5("Miscellaneous")),
htmltools::br())),
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::sliderInput(inputId = nsMapComb("MappingProcessCombined"),
label = "Parallelization",
min = 1,
max = parallel::detectCores(logical = TRUE),
value = 1,
step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Parallel computation.
Choose the number of CPU cores to analize samples in parallel.
'1' by default",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::sliderInput(inputId = nsMapComb("MappingThreadsCombined"),
label = "Number of subprocesses",
value = 1,
min = 1,
max = as.integer(parallel::detectCores(logical = TRUE)),
step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Set the number of subprocesses to divide the analysis into.
'1' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingFormatCombined"),
label = "Output format",
choices = c("BAM", "SAM"), selected = "BAM"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Choose whether to generate a compressed binary alignment file (BAM) or an uncompressed output (SAM).
'BAM' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingCombPhredScore"),
label = "Phred score",
choices = c(33, 64), selected = 33),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the base-calling Phred score format (33 or 64) used to define the quality of your FASTQ input data.
'33' by default",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingNumberSubreadsCombined"),
label = "subreads_number", value = 14, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the number of subreads (short reads for optimal map location) to extract for each input read.
A higher number of subreads may increase both processing time and mapping accuracy.
'14' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingConsensusThresholdCombined"),
label = "consensus_threshold", value = 1, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the consensus threshold, which defines the minimum number of consensus subreads required to report a hit. Consensus subreads are those that agree on the same location in the reference genome for the read.
Increasing the required number of consensus subreads may reduce the number of mapped reads.
'1' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingMaxMismatchCombined"),
label = "Mismatch number", value = 3, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the maximum number of mismatches allowed in the alignment. Mismatches in soft-clipped regions are not counted.
'3' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingUniqueOnlyCombined"),
label = "Exclude reads that map to multiple locations",
choices = c("TRUE", "FALSE"), selected = "FALSE"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify if only uniquely mapped reads should be included in the alignment file (setting TRUE).
'FALSE' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingMultiMapMaxCombined"),
label = "Max multi-mapped reads", value = 1, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"When both uniquely mapped and multimapped reads are included, set the maximum number of equally best mapping locations per read.
'1' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingIndelLengthCombined"),
label = "Indel length", value = 5, max = 200, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the maximum number of insertions/deletions (indels) permitted in the alignment.
'5' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingMinFragLengthCombined"),
label = "Min fragment length", value = 50, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Set the minimum fragment length as a numeric value.
'50' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("MappingMaxFragLengthCombined"),
label = "Max fragment length", value = 600, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Set the maximum fragment length as a numeric value.
'600' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingPeOrientationCombined"),
label = "Orientation of paired-end reads",
choices = c("fr", "rf", "ff"), selected = "fr"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Specify the orientation of the paired reads. 'f' denotes the forward strand and 'r' denotes the reverse strand. The default is 'fr', meaning the first read is on the forward strand and the second on the reverse strand.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingKeepOrderCombined"), label = "Keep the order of FASTQ files (applies only for BAM output)",
choices = c("TRUE", "FALSE"), selected = "FALSE"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Choose whether to preserve the order of reads in the BAM output as they appear in the input file.
Reads from the same pair will always be placed next to each other, regardless of this setting.
'FALSE' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingSortByCoordinatesCombined"), label = "Sort read by their mapping locations (applies only for BAM output)",
choices = c("TRUE", "FALSE"), selected = "FALSE"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Decide whether reads should be sorted by their mapping locations in the output.
This option is applicable for BAM output only.
A BAI index file will also be generated for each BAM file, allowing direct loading into genome browsers like IGB or IGV.
'FALSE' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::radioButtons(inputId = nsMapComb("MappingAllJunctionsCombined"), label = "Reporting all splice junctions",
choices = c("TRUE", "FALSE"), selected = "FALSE"),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Choose if all discovered junctions, including exon-exon junctions and gene fusions, should be reported. Setting this option to TRUE does not require the presence of donor/acceptor sites. ",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shiny::numericInput(inputId = nsMapComb("SubsetBamCombined"),
label = "Subset the aligned reads",
value = 1000000, min = 1, step = 1),
bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Set the number of alignments to process in each batch before writing the alignment file.
This option is useful when RAM memory is limited.
'1000000' by default.",
placement = "right"
)
))), #close fluidrow
shiny::fluidRow(shiny::column(width = 12,shiny::splitLayout(cellWidths = c("90%", "10%"),
shinyFiles::shinyDirButton(id = nsMapComb("MappingTemporaryFolderCombined"),
label = "Choose an empty folder to store temporary files.",
title = "Folder for temporary files",
icon = shiny::icon("hourglass")), bslib::tooltip(
bsicons::bs_icon("question-circle"),
"Select an empty folder to store temporary files. This folder and its contents will be deleted after the analysis is complete.",
placement = "right"
)
), ## close cellWidths
# Displays the selected input directory path
shiny::verbatimTextOutput(nsMapComb("MappingPathTempCombined")) ## temporary folder selected
))# close fluidrow
) ## close accordion_panel
), ## close accordion
shiny::fluidRow(shiny::column(12,align="center",
htmltools::tags$hr(htmltools::h5("Step 2 - Run mapping analysis for dual RNA-seq (combined mode)")),
htmltools::br())),
## running button
shiny::fluidRow(
shiny::actionButton(inputId = nsMapComb("RunMappingCombined"), label = "Run",
icon = shiny::icon(name = "bookmark"),
class = "btn-primary"),
## killing button
shinyjs::disabled(
shiny::actionButton(nsMapComb("StopMappingCombined"), "Kill", icon = shiny::icon("fire"),
class = "btn-warning"))
) #close fluidrow
), ## close sidebar
## MAIN PANEL
## DROPDOWN BUTTON
shinyWidgets::dropdownButton(
inputId = nsMapComb("MappingCombinedMydropdown"),
label = "Info",
size = "sm",
status = "info",
circle = FALSE,
htmltools::h3(shiny::strong("Mapping process")),
htmltools::br(),
htmltools::h5(shiny::strong("WHEN TO PERFORM")),
htmltools::h5("The mapping step should be performed after genome indexing and before the summarization step to align the read dataset to the reference genome(s)."),
htmltools::br(),
htmltools::h6(shiny::strong("WHAT IT DOES")),
htmltools::h6("During this step, RNA-seq reads are aligned to the indexed reference genome(s) to identify transcripts. Mapping allows for the detection of novel genes or transcripts and requires a spliced or gapped mapper, as reads may span exon-exon junctions. The module also detects novel splice junctions, including those resulting from sequencing errors, differences with the reference, or the search for non-canonical junctions and fusion transcripts.
Moreover, the module assignes each aligned read to each organism and separates cross-mapped reads,
namely those reads that map well to both the organism reference sequences."),
htmltools::br(),
htmltools::h6(shiny::strong("OPERATIONAL INSTRUCTIONS")),
htmltools::h6(shiny::strong("Step 1")),
htmltools::h6("- Select the folder containing the indexed, concatenated genome"),
htmltools::h6("- Select the folder containing sample files: Ensure that the folder chosen contains the raw read data in FASTQ format, as this is required for alignment processing."),
htmltools::h6("- Choose an empty output folder that will be used for storing the alignment files in either BAM or SAM format, unmapped reads in FASTA format, and other text format document."),
htmltools::h6(shiny::strong("Step 2")),
htmltools::h6("- Start the analysis by clicking the 'Run' button."),
htmltools::br(),
htmltools::h6(shiny::strong("RESULTS")),
htmltools::h6("Inside the selected folder, the following output files will be generated for each sample:"),
htmltools::h6("- two alignment files (BAM/SAM format) in which reads are separately assigned to genome 1 and genome 2;"),
htmltools::h6("- a text document reporting detected polymorphisms between the reads and the reference genome (VCF format);"),
htmltools::h6("- a text document reporting detected polymorphism between read and the reference genome (VCF format);"),
htmltools::h6("- a text document reporting detected exon-exon junctions (BED format);"),
htmltools::h6("- a text document summarizing the mapping analysis statistics;"),
htmltools::h6("- unmapped reads (gzip compressed FASTQ format)."),
htmltools::br(),
htmltools::h6(shiny::strong("ADDITIONAL NOTES")),
htmltools::h6("You can permanently kill the analysis by clicking the 'Kill' button."),
htmltools::h6("Optionally, you can configure advanced parameters for further customization."),
htmltools::br()
),
htmltools::br(),
# text output
shiny::verbatimTextOutput(nsMapComb("MappingCombinedProcessstatus")),
## reassuring table
DT::DTOutput(nsMapComb("MappingCombinedReassure"))
) ## close layout_sidebar
} # close mappingCombinedUI function
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.