Skip to contents

Generates an HTML summary table of the pass/warn/fail status for each FastQC module.

Usage

plot_status_summary(fastqc_data)

Arguments

fastqc_data

output from fastqc parser

Value

html table;

Details

This function creates a concise, two-column HTML table that visually summarizes the results of a FastQC analysis. It is designed to work with data parsed by the parse_fastqc() function.

The function transforms the FastQC data by:

  1. Extracting the status ("pass", "warn", or "fail") for each analysis module.

  2. Using the status_to_pill() helper function to convert each status string into a colored HTML badge for easy visual identification.

  3. Cleaning up module names (e.g., "per_base_sequence_quality" becomes "Per base sequence quality").

  4. Rendering the final output as a clean, headerless HTML table using the kableExtra package.

Examples

fastqc_data <- parse_fastqc(system.file("extdata", "SRR622457_2_fastqc.txt", package = "fastqcviz"))
plot_status_summary(fastqc_data)
#> <table>
#> <tbody>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Basic statistics</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Per base sequence quality</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Per sequence quality scores</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Per base sequence content</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Per sequence gc content</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Per base n content</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Sequence length distribution</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Sequence duplication levels</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #e8d28fff;
#>   border: 1px solid #8d6c08ff;
#>   color: #8d6c08ff;
#> ">
#>   WARN
#> </span> <span class = "row-title">Overrepresented sequences</span> </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;"> <span class="pill" 
#> style="
#>   background: #afe0b7ff;
#>   border: 1px solid #2f6638ff;
#>   color: #2f6638ff;
#> ">
#>   PASS
#> </span> <span class = "row-title">Adapter content</span> </td>
#>   </tr>
#> </tbody>
#> </table>