6. Adding Additional Filters to the Filter ChainΒΆ

This chapter will cover a different way to add a filter card to a filter chain, annotating variants against a COSMIC data source and creating filter cards for COSMIC fields.

  1. Another way to add a filter card to the filter chain is directly from the filter chain. We will do this to add an variant allele frequency filter. This uses the variant allele frequency values that are computed from the number of reads with an alternate allele divided by the total read depth. In this case the formula is (FSAF + FSAR)/FDP.

    Right-click below the Quality Filters container in the filter view and select Add Filter. See Figure 6-1.

    Add Filter from Chain

    Figure 6-1: Add a filter directly to the filter chain

  2. The source and field selection dialog should open automatically. If it doesn’t click on the wrench icon in the upper right hand corner of the new card. See Figure 6-2.

    Select Source No Filter

    Figure 6-2: Select source and field dialog without a field selected

  3. Type in variant into the filter box and click on Variant Allele Freq and click OK. See Figure 6-3.

    Selected AAF Source

    Figure 6-3: Filter on Alt and select Alt Allele Freq in source and field selection dialog

  4. Now that the Variant Allele Freq filter card has been created, type in 0.01 in the input box and click Greater than 0.01. This will keep all variants that have an variant allele frequency greater than 0.01. See Figure 6-4.

    AAF One Threshold

    Figure 6-4: Alternate Allele Freq filter card keeping variants with AAF values greater than 0.01

    To keep only heterozygous variants, click on the + button next to the text box and enter in a new value of 0.85, and select Between 0.01 and 0.85. See Figure 6-5.

    AAF Two Thresholds

    Figure 6-5: Variant Allele Freq filter card keeping variants with frequency values between 0.01 and 0.85

    Now delete the 0.85 value by clicking on the minus - sign next to the box with 0.85 in it.

  5. Next, we will select a public annotation source, download it, and annotate the variants with this data source.

    From the menu bar, click on the add icon, see Figure 6-6:

    Add Icon

    Figure 6-6: Add icon in Table View

    And select Annotation.... Click the Public Annotations location on the left side of the dialog and then type COSMIC into the filter box to show the COSMIC sources. See Figure 6-7.

    Check for Cosmic

    Figure 6-7: Select COSMIC for Download

    Select Cosmic Mutations Left Aligned 71 v2, GHI and press Select. If already have a local copy download VarSeq will start the annotation process. If not, then you will be prompted to download the required source. Select Yes to download the source. See Figure 6-8.

    Download Cosmic

    Figure 6-8: Download COSMIC from the public annotations repository

    Once the download has finished VarSeq will automatically add the annotations to the variant table. Scroll to the right in the table view to see the new column groups added for COSMIC. See Figure 6-9.

    Cosmic Added

    Figure 6-9: Cosmic added to Table View and variants annotated with Cosmic 71 data.

  6. To filter variants down to only those present in COSMIC, right-click on the In COSMIC? column and select Create Filter Card for this Column. Click on True on the filter card. See Figure 6-10.


    Figure 6-10: Filter down to only those variants present in COSMIC

  7. To filter variants down to a particular set of genes in COSMIC that contain or start with the same string say, all NOTCH genes, right-click on the Gene Name (Unique) column and select Create Filter Card for this Column. Type in NOTCH and select Starts with NOTCH. See Figure 6-11.

    Gene Name Filter

    Figure 6-11: Filter down to variants in NOTCH genes

    Collapse this card by clicking on the minus - sign and double click on the card title and change it to NOTCH Genes. See Figure 6-12.

    Notch Filter Card

    Figure 6-12: NOTCH Genes filter card collapsed and renamed

  8. Filter cards can be rearranged by clicking, dragging and dropping them in the desired location in the filter chain or in a particular filter container.

    Click and drag the NOTCH Genes filter card to the top of the filter chain and drop it there. See how the number of variants change? While the end result is still 2 variants for 10 Percent, there were originally 267 variants for 10 Percent in NOTCH genes. See Figure 6-13.

    NOTCH at Top

    Figure 6-13: NOTCH Genes filter card at the top of the filter chain