# How to filter SNP in usegalaxy

**URL:** <https://help.galaxyproject.org/t/how-to-filter-snp-in-usegalaxy/5688>\
**Category:** Uncategorized\
**Tags:** troubleshooting, filter, usinggalaxy, variant-analysis\
**Created:** [March 23, 2021, 9:18pm UTC](https://help.galaxyproject.org/t/how-to-filter-snp-in-usegalaxy/5688 "2021-03-23T21:18:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![agrieng3](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/agrieng3/32/378_2.png) [@agrieng3](https://help.galaxyproject.org/u/agrieng3)\
**Post date:** [March 23, 2021, 9:18pm UTC](https://help.galaxyproject.org/t/how-to-filter-snp-in-usegalaxy/5688/1 "2021-03-23T21:18:57Z")

</div>

How to filter SNP in file (A)as region in defined range in file (B) in usegalaxy?  
A:  
chr1 186 187 rs378896312  
chr1 703 704 rs136740087  
chr1 833 834 rs136710007  
chr1 864 865 rs43096727  
chr1 1610 1611 rs132965558  
chr1 1611 1612 rs134909289  
chr1 1628 1629 rs136933083

B:  
chr1 185 190  
chr1 800 840  
chr1 1600 1620  
chr1 1625 1630

output:  
chr1 186 187 rs378896312  
chr1 833 834 rs136710007  
chr1 1610 1611 rs132965558  
chr1 1611 1612 rs134909289  
chr1 1628 1629 rs136933083

---

<div class="post-metadata">

**Author:** ![Flow](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/flow/32/211_2.png) [@Flow](https://help.galaxyproject.org/u/Flow)\
**Post date:** [March 24, 2021, 8:52am UTC](https://help.galaxyproject.org/t/how-to-filter-snp-in-usegalaxy/5688/2 "2021-03-24T08:52:47Z")

</div>

I hope I understand your question correctly. You want to have the SNPs in file A that are to 100% in the ranges listed in your file B, and thus generating your desired output?

The tool you are searching for is **bedtools Intersect intervals**. Make sure to tick the option: **Write the original A entry _once_ if _any_ overlaps found in B.** and under **Required overlap** that you give **Minimum overlap required as a fraction of A** the value **1.0**.

A detailed explaination of the tool is given in Galaxy and [here](https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html).

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 17, 2026, 6:14am UTC](https://help.galaxyproject.org/t/how-to-filter-snp-in-usegalaxy/5688/3 "2026-03-17T06:14:59Z")

</div>


