# Convert alignments to unaligned reads

Aligned reads can be converted to unaligned reads in Partek Flow. The task is available under *Post-alignment tools* in the task menu when any *Aligned reads* data node is selected, which can be a result of an aligner in Partek Flow or data already aligned before import.

Generating unaligned reads from aligned data gives you the flexibility to remap the reads using either a different aligner, a different set of alignment parameters, or a different genome reference. This is particularly useful in analyzing sequences from xenograft models where the same set of reads can be aligned two different species. It may also be useful if the original unaligned FASTQ files are not as easily accessible to the user as the aligned BAM files.

To perform the task, select an *Aligned reads* data node and click **Convert alignments to unaligned reads** task in the task menu (Figure 1).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-e28cb9e324554f9346eab237630bb2d1c0731cad%2FConvertalignments-fig1.png?alt=media" alt=""><figcaption><p>Figure 1. Convert alignments to unaligned reads</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-e28cb9e324554f9346eab237630bb2d1c0731cad%2FConvertalignments-fig1.png?alt=media" alt=""><figcaption><p>Figure 1. Convert alignments to unaligned reads</p></figcaption></figure>

During the conversion, the BAM files are converted to FASTQ files and a new *Unaligned reads* data node will be generated (Figure 2) .

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-20aedaeb3f408230176ee1fb596dcf2b9e02779b%2FConvertalignments-fig2.png?alt=media" alt=""><figcaption><p>Figure 2. Unaligned reads generated from aligned reads</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-20aedaeb3f408230176ee1fb596dcf2b9e02779b%2FConvertalignments-fig2.png?alt=media" alt=""><figcaption><p>Figure 2. Unaligned reads generated from aligned reads</p></figcaption></figure>

The filenames of the FASTQ files will be based on the sample names in the *Data tab*. The files generated are compressed with the extension \*.fq.gz. For samples containing BAM files with paired end reads, two FASTQ files will be generated for each, and the files names will be appended with \_1 and \_2. An example in Figure 3 shows 18 .fq.gz output files that came from 9 BAM files.

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-d30774bd4e4c51e9a32ac83c30c6a392bbd5e3e2%2FConvertalignments-fig3.png?alt=media" alt=""><figcaption><p>Figure 3. Task details of unaligned reads generated from aligned paired end samples</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-d30774bd4e4c51e9a32ac83c30c6a392bbd5e3e2%2FConvertalignments-fig3.png?alt=media" alt=""><figcaption><p>Figure 3. Task details of unaligned reads generated from aligned paired end samples</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.
