1. Home
  2. VarSeq
  3. VarSeq Reports Tutorial
  1. Home
  2. VarSeq Tutorials
  3. VarSeq Reports Tutorial

VarSeq Reports Tutorial

Welcome to the VarSeq Reports Tutorial!

This tutorial covers a basic VSReports workflow with an emphasis on understanding and exploring report customizations.

Requirements

To complete this tutorial you will need to download and unzip the following file, which includes a starter project.

Download

VarSeq_Reports_Tutorial.zip

1. Overview

VS Reports provides the ability to generate clinical-grade reports. This feature enables VarSeq users to create custom export formats to return to physicians or integrate with legacy systems. The most common output format is HTML, which can be easily saved as a PDF in VarSeq. However, other formats such as XML, JSON, and CSV can be targeted for output. In addition these reports can be branded and styled to match the documents that your lab produces.

The following tutorial illustrates how VarSeq users can integrate VSReports into their clinical workflows and effectively show users how to:

  • Walk through and explain the Report View Interface;
  • Create a record set to flag variants of interest;
  • Add a selected variant(s) from the Variant Table to VSReports
  • How to customize clinical reports and explain the VSReports layout;

The end result will be a new report template that can be used to create Clinical Reports in the future.

After the ZIP file has been downloaded, extract the contents to a convenient location. Then from VarSeq go to File > Open Project to select the saved project file. See Figure 1.

Note

The original VCF file that was used to import the data into the supplied project can be download from our Data Repository through VarSeq by going to Tools > Manage Data Sources and selecting the YRI_Exome_Filtered3.vcf.gz file from the Example Samples > YRI Trio – 1000Genomes Phase3 folder and clicking Download in the lower left corner.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/family_trio_workflow.png
Figure 1: Example YRI Exome Trio Project in VarSeq.

2. The Report View Interface

Creating a Clinical Report

This project contains a Yoruban trio from the HapMap project:

  • Mother (NA12938)
  • Father (NA12939)
  • Proband (NA12940)

3. The Report View Interface

Creating a Clinical Report

This project contains a Yoruban trio from the HapMap project:

  • Mother (NA12938)
  • Father (NA12939)
  • Proband (NA12940)

Two de Novo variants were seeded into the daughter’s BAM file and then SAMtools was used for variant calling on all three family members simultaneously. These variants are flagged and will be included in a clinical report.

To create a report, open the Report View by either:

  • Clicking on the in the tool bar and select Report or;
  • Clicking on View > Open > Report

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/open_reports.png
Figure 3-1: Opening the Report View

Adding a New Template

The foundation for a report is a template. Templates are located in your User Data location in a folder called ReportTemplates. Initially, this folder is empty. However, VSReports ships with three example templates to get you started.

  • ACMG Hereditary Gene Panel Report
  • Cancer Gene Panel Report
  • Exome Trio Report Template

First we will create a report template based on the Exome Trio Report Template

  • Click on the Create New Report Template icon in the tool bar of the reporting view.
  • Select the Exome Trio Template and name the report template Exome Trio Tutorial and click OK.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/report_template_selection.png
Figure 3-2: Report Template Selection

A report template with the entered name will be created in the ReportTemplates folder. It will be accessible in any VarSeq project. By default this template will open in the report view Figure 2-3. If you have multiple templates in the ReportTemplates folder, you can select which to use with the existing template menu located in the tool bar.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/elected_report_view.png
Figure 2-3: selected Report View

Edit the Reference Information and Sample Information fields as in Figure 2-3 to customize the report for the current sample. The values you input are automatically saved on a per sample basis.

Configuring a Clinical Report

From the Gear Menu on the right side of the tool bar, select Configure Report Template.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/configure_report_parameters.png
Figure 2-4: selected Report View

This dialog contains all the settings which are not expected to change between uses of the template. It contains values such as lab name, log, test description, and gene set Figure 2-5. These fields should be filled out to match the test being run in the lab. The information is saved in the template in the ReportTemplates folder.

Fill in as much or as little as information as desired here. Additionally you can upload a logo to incorporate into a report header. To upload an image to be used in the report template click the Select Image icon.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/set_report_parameters.png
Figure 2-5: Report Configuration Dialog

Browse to the VarSeq Reports Tutorial file you downloaded and unzipped and select Golden Helix Header.png to upload the Golden Helix Image to the report header. See Figure 2-6

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/image_select.png
Figure 2-6: Report Configuration Dialog

Click OK to close the template configuration dialog and return to the Report View.

4. Adding Variants to the Report

To add variants to a clinical report you must first create a Record Set, then flag variants you want to include in the report in the Variant Table.

  • Click on the Record Sets icon in the Table View toolbar and click on Create Variant Set… Figure 3-1. See Record Sets for more information.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/creating_record_set.png
Figure 3-1: Creating Record Sets.

In this dialog you can give the record set a name, initials (abbreviation), choose a color, and set the sample option.

  • Leave the default options and click OK.
  • A Variants record set has now been created and added to the Variant Table View Figure 3-2.

Along with the Variants record set you just created, two additional record sets have been created for you:

  • One for variants to be flagged as Primary Findings and;
  • One set for variants to flagged as Incidental Findings.
https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/flagging_additional_variants.png
Figure 3-2: Record Sets in the Variant Table

Once a record set is created variants can be added to the set by individually clicking on the box in the row for the record or by using options in the record set sub-menus.

As mentioned previously, a single variant has been added to each record set. For the Primary Findings record set, a disruptive inframe deletion (7:117199646 CTT/-) in the CFTR gene associated with the disease cystic fibrosis was flagged. In the Incidental Findings record set, a missense variant (17:41243800 C/T) in the BRCA1 gene associated with Breast-ovarian cancer was flagged.

Lets add a variant to a record set and observe how VSReports autofills information into the report template for flagged variants.

  • The variant (16:81942028 C/G PLCG2) has been added to the Incidental Finding record set Figure 3-3.
https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/flagging_variants.png
Figure 3-3: Record Sets in the Variant Table.

Now that we have flagged variants in the Variant Table, we can include these variants in a clinical report.

  • Click on the Select a Variant Set dropdown box in the report view interface under the Primary Findings and then under the Incidental Findings sections and select the appropriate Record Set for each section. Figure 3-4.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/select_variant_set.png
Figure 3-4: Adding Groups of Variants to Report.

Now that you have added variants to the clinical report, you can classify variants using the Classification drop down dialog box Figure 3-5.

  • Classify the disruptive inframe deletion (7:117199646 CTT/-) in the CFTR gene as Pathogenic
  • Mark the the missense variant (16:81942028 C/G) in the PLCG2 gene as Unknown Significance
  • Classify the missense variant (17:41243800 C/T) in the BRCA1 gene as Likely Pathogenic
https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/report_add_variants.png
Figure 3-5: Adding Groups of Variants to the Report.

Note for the Exome Trio Report Template the Interpretation Summary has been autofilled with clinically relevant information from two sources:

  • RefSeq Genes (sequence ontology) and;
  • OMIM (textual description).

With the careful curation of the OMIM resource at the phenotype, gene and variant level, the following descriptive and filterable data points is joined to your reported variants:

  • Functional description of genes and phenotypes;
  • Lists of phenotypes linked to genes with supporting evidence and modes of inheritance of the phenotype;
  • Literature references with relevant PubMed and direct URL Links to relevant genetic resources such as testing guidelines, ontology and gene test registries; and
  • Descriptive interpretations for variants curated from published papers with family and disease context.

This information contained in the Interpretation Summary can be edited in the text dialog box prior to rendering the report.

Note

The information contained in the Interpretation Summary can all be found in the Variant Table. With some JavaScript know-how, VSReports users can extensively modify report templates to bring in other information contained in the Variant Table. Adding additional information from the Variant Table from other annotation sources is covered in the Report Customization section of this tutorial.

Once you are satisfied with the selections, click the Sync icon in the toolbar to render the report in HTML Figure 3-6. The rendered report will automatically open in a Web Browser tab. See VSReports for example reports.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/render_this_report.png
Figure 3-6: Rendering a Clinical Report.

Click on the Export icon to export the report as a PDF document Figure 3-7. You will be prompted to enter the name of the output file. You can additionally open the containing folder (to view the HTML file directly) or open the HTML page in an external browser.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/export_rendered_report.png
Figure 3-7: Exporting a Clinical Report.

5. Customizing Reports Templates

Reports are fully customizable and users with JavaScript development experience can extensively modify templates. In addition Golden Helix is happy to offer customization services. For more information contact your account manager.

To access the report template files click the Gear menu and select Open Report Template Folder. See Figure 4-1.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/open_report_template_folder.png
Figure 4-1: Opening the Report Template Folder.

Report templates consist of three main parts:

  • Layout Object: In the report.js file a variable layout is defined. This is a object which defines the form that is laid out in the report tab.
  • Template: Each template contains a template file which defines the layout of the rendered report. Handlebars is used as the templating language.
  • Render Function: The render function in report.js combines the information from the form and sources in VarSeq to create a context to pass to the compiled Handlebars template for rendering.

For additional information on Report Layouts please refer to the customization section of the VarSeq Manual

Adding New Data Fields to a Report Template

In this tutorial, we will illustrate how report templates are organized by creating two fields that will be added to the report input form and used in the final report. The two new fields will:

  • Create a new widget for an alphanumeric lab ID. This widget will autofill in the ID that will be defined in a TSV file used during the import process; and
  • Create a widget that will automatically pull in the phenotype field and corresponding OMIM gene ID from the OMIM-Variants annotation source in the project.

Adding a new Sample Input Data Field to the Report Template

There is a defined list of widgets that VarSeq includes that can be used to construct the report form. All of the available widgets can be found in the following image and are described in detail in the layout section of the manual. See Figure 4-2.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/report_widgets.png
Figure 4-2: Widgets Available for Report Construction.

To make adjustments to the report input form, we need to add widgets to the input form. We can do this by modifying the layout variable in the report.js file.

  • In VarSeq, click the Gear menu and select Open Report Template Folder. Open the report.js file in a text editor such as Notepad ++.
  • Scroll down to the reference section of the the report.js file and insert the following code block in the layout array between the ‘name’ id and ‘institution’ id. See Figure 4-3 and save changes before proceeding.
{
  id: 'labId',
  type: 'shortText',
  label: 'Identification Number',
  doc: 'Internal Reference Number',
  required: true,
  autoFill: function(project, input) {
    return _.get(project, 'samples.Current.importedId', '');
  }
},

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/lab_id.png
Figure 4-3: Adding Lab ID to the report.js File.

Note that lodash’s get function tolerates null references and returns a default value rather than throwing a runtime error. In this case, our default value is simply the empty string.

Each item corresponds to a widget which will be created in the form. For additional information please refer to the manual.

Widgets share the following common properties:

  • id – used to retrieve data
  • label – provides a label in the input form
  • doc – help string displayed on hover of i icon in input form
  • type – defines the type of widget to be displayed using the following strings:
  • autoFill – function which returns a value to dynamically fill the widget’s input. Form has different parameters passed to it based on the context of the container for the widget.
    • variant or other non-sample context arguments include project, input, variant, thisForm, and varInput

Now that we have added this to our layout array, we now need to reload the report form by clicking on the Gear icon and selecting Reload Report Template. See Figure 4-4.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/reload_report_template.png
Figure 4-4: Reloading the Report Template.

You should now see a new widget in your layout. See Figure 4-5.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/lab_id_result.png
Figure 4-5: The New Identification Number in the Report Template.

Type the number 1074 in the Identification Number box and open the Developer JavaScript Console via the Gear Menu. Expand the console by clicking on the button on the lower left. In the console type:

> form.getInputData().reference.labId

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/java_console_labid.png
Figure 4-6: Retrieving an Object in the JavaScript Console.

You should see the text you just typed into the box in VarSeq. In fact all the input values are returned by the getInputData() function on the form object. Try typing:

> form.getInputData()

In the console you’ll see an navigable object containing your input values. Similarly, you can inspect the values in the template configuration dialog with the function getParamsData() and project specific data including annotations on the current variants with getProjectData().

So the next task is to get our labId into our template. To pass this value to the template, we bind it to the context which in turn is passed to the compiled template. For more information on how this process works refer to the Handlebars documentation.

To bind the value to the context, navigate to the render function in the report.js file. See Figure 4-7. After the line:

var ctx = _.extend(labeledInput, params);

Add:

ctx.labId = _.get(input, 'labRef.labId', '');

Once more save your changes to the report.js file before proceeding.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/render_function.png
Figure 4-7: Adding a line to the Render Function in the report.js File.

This line assigns the output of lodash’s get function to the property labId on the ctx object. Now when the ctx object is passed as an argument to the compiled template in the line:

return template(ctx);

The labId property can be used in the template.

Note

When we have many items in a section and want to add them to the template without writing all the HTML by hand. We can use the eachInMap custom Handlebars helper that is in the report.js function. For additional information please see this additonal example.

When you press the Sync button to generate the report, you should see the text that you entered in the form as the last item in the Reference Information section in the generate report. See Figure 4-9.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/rendered_report.png
Figure 4-9: Rendered HTML Report with new Lab Identification Field.

Incorporating Project Data into the Report

Now lets create a new widget that will automatically pull in the phenotype field and corresponding OMIM gene ID from the OMIM-Variants annotation source in the project. See Figure 4-10.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/omim_table.png
Figure 4-10: Information from OMIM-Variants that will be Incorporated into the Report.

First we will need to examine the identifier that corresponds to that data in the project by opening the JavaScript Development Console in VarSeq. To access the development console, click on the Gear icon and select Developer JavaScript Console. This will bring up a WebKit-like dev console.

  • Under the Console tab enter form.getProjectData()
  • Click the Object dropdown menu.
  • Click on the sources drop-down menu. This is an array which lists the objects in the variant table.
  • Click on the drop-down for number 14 to view the OMIM-Variants annotation source. Note the Key for the annotation source OMIM-Variants This is the value you’ll use in the report.js file to pull in information from your annotation source. See Figure 4-11.
  • Click on the fields drop-down. This is an array which lists the objects in the OMIM-Variants annotation source.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/java_console.png
Figure 4-11: Browsing to the key in the JavaScript Console

Now we will view and make note of the symbol for the Phenotype and OMIM Gene ID information.

  • Click on the drop-down for number 1 in the array to view the Phenotype and note the symbol.
  • Click on the drop-down for number 3 in the array to view the OMIM Gene ID and note the symbol. See Figure 4-12.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/omim_symbol.png
Figure 4-12: Browsing to the OMIM symbol in the JavaScript Console.

The identifiers in the symbol will be used to autofill the phenotype and OMIM Gene ID information from OMIM-Variants for each flagged variant. To demonstrate, in the console tab of the Developer JavaScript Console, enter form.getProjectData().

Now click on the Variants > 15193 > OMIM-Variants > 0 to browse to the information that corresponds to the Phenotype and the GeneOMIMID fields listed in OMIM-Variants database. See Figure 4-13.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/js_console_omim.png
Figure 4-13: Browsing OMIM Identifiers in the JavaScript Console.

Now that we have the necessary identifiers we can add a widget to the input form. To add a widget to the report template we will add the corresponding Javascrpit object to the layout section of the report.js file.

  • In VarSeq, click the Gear menu and select Open Report Template Folder. Open the report.js file in a text editor such as Notepad ++.
  • Scroll down to the variants section of the report template and insert the following code block in the primary findings section between the ‘classification’ ID and ‘interpretation’ ID and save your changes. See Figure 4-14.
{
  id: 'phenotypecomment',
  label: 'Phenotype',
  type: 'richTextEdit',
  doc: 'Short comment to augment patient result',
  heightInLines: 1,
  autoFill: function(project, input, variant) {
           return  _.get(variant, ['OMIM-Variants', '0', 'Phenotype'], null);
         }
 },

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/js_code.png
Figure 4-14: Editing the layout section of the report.js file.

Note

When making changes to the Primary Findings and Secondary Findings section of the report template, you must reselect a variant set for the changes to take effect. See Figure 4-15.

  • Under the Primary Findings and Secondary Findings sections, reset each dropdown choice to Select a Variant Set.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/reselect_variants.png
Figure 4-15: Reselecting Variants in the Primary Findings Section.

  • Then, reload the report template by selecting the Gear Icon and selecting Reload Report Template. See Figure 4-4.
  • Now reselect the appropriate variant sets for each dropdown.

A new Phenotype field will now be located in the Primary Findings section of the report template. This will contain information autofilled from the Phenotype column in the OMIM-Variants annotation source. See Figure 4-16.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/primary_findings.png
Figure 4-16: New Phenotype field in the report template. Now we can add a sentence which specifies the corresponding OMIM ID.
  • Open the report.js file and locate the phenotype ID code block recently created.
  • Edit the autofill function to the following code block.
{
  id: 'phenotypecomment',
  label: 'Phenotype',
  type: 'richTextEdit',
  doc: 'Short comment to augment patient result',
  heightInLines: 1,
  autoFill: function(project, input, variant) {
         var omimphenotpe = _.get(variant, ['OMIM-Variants', '0', 'Phenotype'], null);
         var omimgeneID = _.get(variant, ['OMIM-Variants', '0', 'GeneOMIMID'], null);
         return  omimphenotpe + ' - ' + 'The OMIM ID for this gene is' + omimgeneID
        }
 },

Now the Phenotype field in the report layout will return the phenotype information and corresponding OMIM gene ID. If there is no annotation information available for the variant, a null value will be returned. Save the report.js file and reload the report template in VarSeq by clicking on the Gear icon and select Reload Report Template. Refer to Figure 4-4.

As shown in Figure 4-15 you will need to reselect variants in the Primary Findings section of the report template for the changes to take effect.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/omim_id.png
Figure 4-17: OMIM ID Added to the Phenotype Field in the Report Template.

Adding a new Widget to the Rendered Report

After adding this to our layout array, we will next want to include this information in the rendered report. By adding the following line of code to the constructVariant function in the report.js file see Figure 4-18. We can insert the phenotype field into the rendered report. Be sure to save the report.js file and reload the report template in VarSeq for the change to take effect.

variant.phenotype = _.get(inputVariant, 'phenotypecomment', '');

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/variant_phenotype.png
Figure 4-18: Adding the OMIM Phenotype and Gene ID to the ConstructVariant Function in the report.js file.

Next we need to decide which section of the rendered HTML report to insert the phenotype field. Since this is information about the variant, lets place this in the Variant interpretation section of the rendered report.

  • In VarSeq, click the Gear menu and select Open Report Template Folder. Open the template.tpl file in a text editor such as Notepad ++.
  • scroll down to the Individual Variant Interpretations section of the template.tpl file. See Figure 4-19

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/template_tpl.png
Figure 4-19: HTML Code Block Corresponding to the Individual Variant Interpretations Section in the Report Template.

Insert a Phenotype table header and phenotype table cell to the Individual Variant Interpretations table in the template.tpl file see Figure 4-20. This will add the information in the Phenotype field in the report layout to the rendered html report.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/edited_template_tpl.png
Figure 4-20: Edited HTML code Block Resulting in a new Phenotype Field in the Individual variant Interpretations Section of the Rendered Report.

6. Minor Report Edits

In this section we will discuss some minor edits to your report template including:

  • Adding a sentence that will describe the minor allele frequency from ExAC Variant Frequencies;
  • Changing the color of the header text;and
  • Changing the format of the dates in the rendered report.

Adding Alternate Allele Frequency from ExAC Variant Frequencies

Similar to the previous sections we will need to examine the identifier that corresponds to that data in the project by opening the JavaScript Development Console in VarSeq. To access the development console, click on the Gear icon and select Developer JavaScript Console. This will bring up a WebKit-like dev console.

  • Under the Console tab enter form.getProjectData()
  • Click on the sources drop-down menu. This is an array which lists the objects in the variant table.
  • Click on the drop-down for number 16 to view the ExAC Variant Frequencies 0.3, BROAD annotation source.

Note the Key for the annotation source ExAC Variant Frequencies. This is the value you’ll use in the report.js file to pull in information from your annotation source.

  • Click on the fields drop-down. This is an array which lists the objects in the ExAC Variant Frequencies annotation source.
  • Click on the drop-down for number 4 in the array to view the Alternate Allele Frequency.

Note the symbol field AltAlleleFreqAF see Figure 5-1. This is the identifier we will use to autofill the alternate allele frequency information from ExAC Variant Frequencies for each flagged variant.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/exac_freq_jsconsole.png
Figure 5-1: Browsing to the ExAC key in the JavaScript Console.

Now that we have the necessary identifiers we can add this information into the variant interpretation section of the report.

  • In VarSeq, click the Gear menu and select Open Report Template Folder. Open the report.js file in a text editor such as Notepad ++.
  • Add the following line of code to the constructVariant function in the report.js file see Figure 5-2.
variant.freq =  templateUtils.formatFrequency(_.get(variantData,
                   'ExAC-Variant Frequencies.AltAlleleFreqAF'));

Note

Additional JavaScript helper functions have been included in scripts/templateUtils.js.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/construct_exac.png
Figure 5-2: Editing the constructVariant Function Pull in ExAC Allele Frequency.

Next add the following line of code to the interpretation function in the report.js file see Figure 5-3. This calls out to the autofill function in the scripts/templateUtils.js file located in the Report Template folder.

interpStr += ' ' + templateUtils.varFreqExacString(variant);

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/interpretation_function_final.png
Figure 5-3: Editing the Interpretation Function in the report.js File.

Save the report.js file and reload the report template in VarSeq by clicking on the Gear icon and select Reload Report Template. Refer to Figure 4-4. As shown in Figure 4-15 you will need to reselect variants in the Primary Findings section of the report template for the changes to take effect.

The Primary Findings section of the Report Template, will now contain information autofilled from the ExAC Variant Frequencies 0.3, BROAD annotation source. See Figure 5-4.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/added_exac_interpretation.png
Figure 5-4: Alternate Allele Frequency in the Interpretation Section of the Report.

Editing The Color of the Header Text

By Default, reports are rendered in HTML, which can be easily saved as a PDF in VarSeq. To customize the style or ‘look’ of the rendered HTML report, users can modify style sheets found in the Report Templates folder. Each report template has three style sheets:

  • main.css – Users can define a custom style of reports.
  • print.css – Print to PDF style sheet.
  • vendor.css – Primarily composed of Bootstrap CSS framework.

Let’s modify the font color for the Patient and Sample Information section of rendered report.

  • Click the Gear menu and select Open Report Template Folder. Open the main.css file in a text editor.
  • Scroll down to .dt-header and .dd-label class
  • Change the hexadecimal color code in the .dt-header from blue (#00abff) to black (#000000)
  • Save the report main.css style sheet and re-render the report for the changes to take effect. See Figure 5-5.

Note

When making changes to the template.tpl or CSS stlye sheets you do not have to reload the report template for the changes set for the changes to take effect.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/font_color_maincss.png
Figure 5-5: Editing the Font Color in the main.css File.

Changing the Date & Time Format

The date time widget can be used to specify when an event occurred. The format for the value in this field can be specified with the following symbols. For more information on this widget please refer this section of the manual. Lets change the format of this widget from the full month name to rendering the date in the numeric dd/mm/yyyy format.

  • In VarSeq, click the Gear menu and select Open Report Template Folder. Open the report.js file in a text editor such as Notepad ++.
  • Edit the return date.toLocaleDateString line of code to the Handlebars.registerHeliper function in the report.js file to the code block below. see Figure 5-6.
return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear();

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/new_datetime_js.png
Figure 5-6: Editing the DateTimeEdit in the report.js File.

The Report Dates will now be rendered in the numeric dd/mm/yyyy format. See Figure 5-7.

https://doc.goldenhelix.com/VarSeq/tutorials/varseq_reports/_images/new_date_format.png
Figure 5-7: Modified Dates Format in the Rendered Report.

7. Conclusion

Congratulations! You have finished the VSReports Tutorial.

This tutorial was designed to introduce VarSeq users to VSReports and give a brief orientation to key features, the report layout, and report customization.

You have now seen how report templates are organized and how the data flows through the report template system. This template system is pure JavaScript and users can access and modify data anyway prior to sending it off to the template.

Reports are fully customizable and Golden Helix is happy to offer customization services. For more information contact your account manager.

If you have an active VSReports license, and have additional questions regarding VSReports or report customization please reach out to Golden Helix Support

Updated on April 19, 2021

Was this article helpful?

Related Articles

Leave a Comment