# Filter alignments

* [Introduction](#introduction)
* [Removing duplicates](#removing-duplicates)
* [Remove alignments with mismatches](#remove-alignments-with-mismatches)

## Introduction

The **Filter alignments** task can be used to filter aligned reads data using specified parameters. To invoke the task, click on an *Aligned reads* data node and select *Filter alignments.* By default, this task removes low-quality reads, singletons and unaligned read information stored within the BAM/SAM file (Figure 1).

<figure><img src="/files/QkVCwDtG8mpS5QdhHIQK" alt="" width="375"><figcaption><p>Figure 1. Default filter alignments settings</p></figcaption></figure>

## Removing duplicates

Users also have the option to remove duplicate reads in aligned data. For DNA-Seq analysis, this is typically performed to minimize redundant variant calling information. To remove duplicates, click on the *Remove duplicates* checkbox (Figure 2).

<figure><img src="/files/iU4foylDOk0v58dKKEGc" alt="" width="375"><figcaption><p>Figure 2. Removing duplicate reads</p></figcaption></figure>

Select the number of reads you want to keep. Then specify when alignments are treated as duplicates. This can either be reads that map to the same start position or, additionally, have the same sequence. You can also select whether to keep the read with the highest mapping score or a randomly-selected duplicate.

## Remove alignments with mismatches

To remove alignments with mismatches, select the *Remove alignments with mismatches* check box. Using the selector, specify the number the number of mismatched bases that need to be exceeded for the alignment to be excluded (Figure 3). Note that mismatches also include insertions and deletions.

<figure><img src="/files/ie2UBVkCSfwtNgTfjxjm" alt="" width="375"><figcaption><p>Figure 3. Removing alignments with mismatches</p></figcaption></figure>

## Additional Assistance

If you need additional assistance, please visit [our support page](http://www.partek.com/support) to submit a help ticket or find phone numbers for regional support.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.partek.illumina.com/partek-flow/user-manual/task-menu/post-alignment-tools/filter-alignments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
