# How to extract unique reads from SAM file

**URL:** <https://help.galaxyproject.org/t/how-to-extract-unique-reads-from-sam-file/1426>\
**Category:** usegalaxy.org support\
**Tags:** mapping, sam\
**Created:** [May 29, 2019, 1:23pm UTC](https://help.galaxyproject.org/t/how-to-extract-unique-reads-from-sam-file/1426 "2019-05-29T13:23:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbkaram](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jbkaram](https://help.galaxyproject.org/u/jbkaram)\
**Post date:** [May 29, 2019, 1:23pm UTC](https://help.galaxyproject.org/t/how-to-extract-unique-reads-from-sam-file/1426/1 "2019-05-29T13:23:23Z")

</div>

Hi.  
How can I extract uniquely and concordantly paired-end mapped reads (aligned concordantly exactly 1 time) from HISAT2?  
Thanks

---

<div class="post-metadata">

**Author:** ![bwlang](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/bwlang/32/612_2.png) [@bwlang](https://help.galaxyproject.org/u/bwlang)\
**Post date:** [May 29, 2019, 1:36pm UTC](https://help.galaxyproject.org/t/how-to-extract-unique-reads-from-sam-file/1426/2 "2019-05-29T13:36:26Z")

</div>

I think you want samtools view:  
[https://usegalaxy.org/root?tool\_id=toolshed.g2.bx.psu.edu/repos/devteam/samtool\_filter2/samtool\_filter2/1.8](https://usegalaxy.org/root?tool_id=toolshed.g2.bx.psu.edu/repos/devteam/samtool_filter2/samtool_filter2/1.8)  
e.g.:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/1X/719a917ce8f75d62078d2f6becbd2b4e27965119.png)
