# Trim tags

* [What is Trim tags?](#what-is-trim-tags)
* [Running Trim tags](#running-trim-tags)
* [Building a custom prep kit](#building-a-custom-prep-kit)
  * [Adaptors](#adaptors)
  * [UMIs](#umis)
  * [Barcode](#barcode)
  * [Insert](#insert)
  * [Ordering segments](#ordering-segments)
  * [Custom prep kit example](#custom-prep-kit-example)
* [Managing prep kits](#managing-prep-kits)

## What is Trim tags?

The Trim tags task allows you to process unaligned read data with adaptors, barcodes, and UMIs using a Prep kit file that specifies the configuration of these elements in your NGS reads.

## Running Trim tags

* Click an **Unaligned reads** data node
* Click the **Pre-alignment QA/QC** section of the toolbox
* Click **Trim tags**

There are three parameters to configure - **Prep kit**, **Keep untrimmed**, **and Map feature barcodes**.

Selecting **Keep untrimmed** will generate a separate unaligned reads data node with any reads that do not match the structure specified by the prep kit. This option is off by default, to save on disk space. Selecting **Map feature barcodes** is only necessary for processing protein data from 10x Genomics' Feature Barcoding assay (v3+ chemistry). For single cell gene expression data, leave this option unchecked.

Partek distributes prep kits for processing several types of data:

* 10x Chromium Single Cell 3' v2
* 10x Chromium Single Cell 3' v3
* 10x Chromium Single Cell 5'
* Drop-seq
* Lexogen QuantSeq FWD-UMI
* Bio-Rad SureCell WTA 3'
* Fluidigm C1 mRNA Seq HT IFC
* Rubicon Genomics ThruPLEX Tag-seq
* 1CellBio inDrop

If your data is from one of these sources, you can select the appropriate option in the Prep kit drop-down menu. If the data is from another source, you can build a custom prep kit file to process your data.

* Choose a Prep kit from the drop-down menu
* Click **Finish** to run Trim tags (Figure 1)

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-c48c633b7f061788eff5de7ace66f39165a0105b%2Ftrimtag.jpg?alt=media" alt=""><figcaption><p>Figure 1. Trim tags task set up</p></figcaption></figure>

The output of Trim tags is a *Trimmed reads* data node. An additional *Untrimmed reads* data node will be generated if the **Keep untrimmed** option was selected.

The task report provides a table with the total reads, reads retained, % reads retained, reads removed, and % reads removed for each sample (Figure 2). You can click **Download** at the bottom of the table to save a text file copy to your computer.

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-1012a21d5b034070a12ae0529692c76f4a97af35%2Fimage2018-11-19%2015_18_56-2.png?alt=media" alt=""><figcaption><p>Figure 2. Trim tags task report</p></figcaption></figure>

## Building a custom prep kit

* Select Other / Custom from the Prep kit name drop-down menu
* Give the new prep kit a name
* Choose **Build prep kit**

You can select Import prep kit if you have a Prep kit .zip file downloaded from Partek Flow.

* Click **Create** (Figure 3)

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-f579d6c8cd78b378b7d86135f6d70dd7a98266ac%2FTrimtags-Fig3.png?alt=media" alt=""><figcaption><p>Figure 3. Choosing to create a custom prep kit</p></figcaption></figure>

The Prep kit builder interface will load (Figure 4).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-431b04547507a17f82eadca7db9fb50a75665746%2FTrimtags-fig4.png?alt=media" alt=""><figcaption><p>Figure 4. Prep kit builder</p></figcaption></figure>

There are three sections:

*Is paired end* - select to switch from single end to paired end FASTQ files (Figure 5). If you choose paired end, the First mate will correspond to the \_R1 FASTQ file and the Second mate will correspond to the \_R2 FASTQ file.

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-03025b9ef28516e1139ac67343df68343d0455d4%2FTrimtags-fig5.png?alt=media" alt=""><figcaption></figcaption></figure>

Figure 5. Paired end prep kits have first and second mate segmentation sections

*Segmentation* - this is where you will describe the structure of your reads

* Click ![image2018-11-19 14\_15\_11](https://github.com/illumina-swi/partek-docs/assets/167460925/b82c52d1-b107-46d3-9916-0d8995e70e57) to add a segment.

Segments include adaptors, barcodes, UMIs, and the insert (i.e., the target sequence of the assay)

#### Adaptors

For adaptors, you have the option of choosing a file with your adaptor sequences or entering the adaptor sequences manually.

To use a file, choose **File** for *Sequences* and then click **Choose File** (Figure 6). Use the file browser to choose a FASTA file from your local computer.

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-7a4b4af847577b741b3acc470714596224bb1a30%2FTrimtags-fig6.png?alt=media" alt=""><figcaption><p>Figure 6. Specifying adaptors with a file</p></figcaption></figure>

To enter the sequences manually, choose **Manual** for *Sequences* then type or paste the adaptor sequences into the text field and click ![image2018-11-19 14\_15\_15](https://github.com/illumina-swi/partek-docs/assets/167460925/dd77dea0-95a9-431f-82a8-fbeeb4286c91) to add the adaptor (Figure 7). You must click ![image2018-11-19 14\_15\_15](https://github.com/illumina-swi/partek-docs/assets/167460925/dd77dea0-95a9-431f-82a8-fbeeb4286c91) for the adaptor sequence to be included. You can remove any adaptor you have added by clicking ![image2018-11-19 14\_16\_31](https://github.com/illumina-swi/partek-docs/assets/167460925/bb693517-d5e2-4829-8eaf-79e7a685a32c).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-586c2b6a113cbf64d7dac75f8f8a52571ab6ffaa%2FTrimtags-fig7.png?alt=media" alt=""><figcaption><p>Figure 7. Specifying adaptor sequences manually</p></figcaption></figure>

You can specify the mismatch allowance using the Mismatches option.

After you have specified the file or manually entered the sequences, click **Add** to add the adaptor sequence(s).

#### UMIs

Unique Molecular Identifiers (UMIs) are randomly generated sequences that uniquely identify an original starting molecule after PCR amplification.

Including a UMI in your prep kit will allow you to access a downstream task that uses UMI information for removing PCR duplicates. For more information about the Deduplicate UMIs task, please see our [UMI Deduplication in Partek Flow white paper](https://help.partek.illumina.com/partek-flow/white-papers/umi-deduplication-in-partek-flow). Note that while the UMI sequence will be trimmed, a record of the UMI sequence for each read is retained for use by this downstream task.

When adding a UMI segment to your prep kit, you can specify the length of your UMIs (Figure 8).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-95ee5207f5e692873003abff5d20bcf3bf4df42b%2FTrimtags-Fig8.png?alt=media" alt=""><figcaption><p>Figure 8. Adding a UMI segment</p></figcaption></figure>

#### Barcode

Adding a barcode segment to a prep kit allows you to access downstream tasks that use barcode information, including [*Filter barcodes*](https://help.partek.illumina.com/partek-flow/user-manual/task-menu/filtering/filter-barcodes) and *Quantify barcodes to annotation model (Partek E/M)*. While the barcode sequence will be trimmed, a record of the barcode sequence for each read is retained for use by downstream tasks.

Like adaptors, barcodes can be specified using a file or manually specified, but you can also choose to designate any segment of arbitrary length in the sequence as the barcode. This is useful if you do not have a specific set of known barcodes.

To set the barcode to an arbitrary segment of fixed length, choose **Arbitrary** and specify the barcode length (Figure 9).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-919e0c4e3caec487f8a55c78a961261fad3ab1ee%2FTrimtags-Fig9.png?alt=media" alt=""><figcaption><p>Figure 9. Specifying a barcode with arbitrary sequence</p></figcaption></figure>

Remember to click **Add** to add the new segment to your prep kit.

#### Insert

The insert is the sequence retained after trimming in the Trimmed reads data node. For example, in RNA-Seq, this would be the mRNA sequence. Every prep kit must include an insert segment. You can specify the minimum size of the insert section using the Length field (Figure 10). Reads shorter than the minimum length will be discarded.

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-c54591fb719aa97a0c4d281fe97097ecf392c423%2FTrimtags-fig10.png?alt=media" alt=""><figcaption><p>Figure 10. Adding an insert section</p></figcaption></figure>

Remember to click **Add** to add the new segment to your prep kit.

#### Ordering segments

Segments are placed from 5' to 3' in the read in the order they are added. You should add the 5' segment first and add additional elements in order of their position in the read. Segments will appear in the Segmentation sections as they are added. You can mouse over a segment to view its details (Figure 11).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-8cc672dffbe45234c51954bde08e646338dbc18d%2FTrimtags-Fig11.png?alt=media" alt=""><figcaption><p>Figure 11. Building a prep kit by adding segments</p></figcaption></figure>

#### Custom prep kit example

For example, the expected read structure (Figure 12) and a completed prep kit for a standard Drop-seq library prep are shown below (Figure 13).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-17af55eb19f503da07e73a87f3d0fd11aed08344%2Fimage2018-11-19%2015_7_15-2.png?alt=media" alt=""><figcaption><p>Figure 12. Drop-seq read structure</p></figcaption></figure>

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-80f18286cf7124393a6b15f6aa082f820f539d3c%2FTrimtags-fig13.png?alt=media" alt=""><figcaption><p>Figure 13. Drop-seq prep kit</p></figcaption></figure>

Remove poly-A tail - choose this option to trim poly-A tails from the ends of the read with your insert sequence

* Click **Next** to complete your prep kit

## Managing prep kits

You can manage saved prep kits by going to Home > Settings > Library file management and opening the Prep kit files tab (Figure 14).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-af12887224a6149d6d83e91a2e089260f0307276%2Fimage2018-11-19%2015_25_24-2.png?alt=media" alt=""><figcaption><p>Figure 12. Prep kit file management</p></figcaption></figure>

You can add new prep kits from this page by clicking ![image2018-11-19 15\_26\_13](https://github.com/illumina-swi/partek-docs/assets/167460925/512ef882-03f8-4b56-bd82-346d3feb60b2).

You can preview a prep kit by clicking ![2018-11-19 13\_28\_32-Window](https://github.com/illumina-swi/partek-docs/assets/167460925/fe1bbb8a-fd7d-4c1e-b30a-edbd0df1b902), delete a prep kit by clicking ![image2018-11-19 15\_26\_59](https://github.com/illumina-swi/partek-docs/assets/167460925/0daf0abf-0691-44da-9665-202438820670), and download a prep kit to your computer by clicking ![image2018-11-19 15\_27\_18](https://github.com/illumina-swi/partek-docs/assets/167460925/f4b371b0-85df-433f-ab23-4036f21062c5).

Prep kits download as a .zip file. This Prep kit .zip file can be imported into Partek Flow by selecting *Import from a file* when adding a new prep kit. Select the .zip file when importing, do not unzip the file.

## 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.
