# Creating BED file from intersect with COSMIC and another BED file

**URL:** <https://help.galaxyproject.org/t/creating-bed-file-from-intersect-with-cosmic-and-another-bed-file/2875>\
**Category:** usegalaxy.org support\
**Tags:** workflow\
**Created:** [January 29, 2020, 3:16pm UTC](https://help.galaxyproject.org/t/creating-bed-file-from-intersect-with-cosmic-and-another-bed-file/2875 "2020-01-29T15:16:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bping](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@Bping](https://help.galaxyproject.org/u/Bping)\
**Post date:** [January 29, 2020, 3:16pm UTC](https://help.galaxyproject.org/t/creating-bed-file-from-intersect-with-cosmic-and-another-bed-file/2875/1 "2020-01-29T15:16:28Z")

</div>

Hello there

I have two inputs and I am trying to generate an output from an intersection of these.

**Input A - BED file**

Chr1 43814926 43814927 name\_tag

**Input B - COSMIC Database**

1 69224 COSV58737130 A C . . GENE=OR4F5;STRAND=+;LEGACY\_ID=COSM3677745;CDS=c.134A\>C;AA=p.D45A;CNT=1

**Desired output**

chr1 115256527 115256529 COSM33693\_\_p.Q61R 0 + REF=TT;OBS=CC;ANCHOR=C CHP2\_NRAS\_2

where REF is reference sequence, OBS is variant allelel, Anchor is base before reference. The “0” and “+” columns remain the same throughout.

Any ideas?

---

<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:** [October 13, 2022, 10:01pm UTC](https://help.galaxyproject.org/t/creating-bed-file-from-intersect-with-cosmic-and-another-bed-file/2875/2 "2022-10-13T22:01:13Z")

</div>



---

<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:** [October 13, 2022, 10:01pm UTC](https://help.galaxyproject.org/t/creating-bed-file-from-intersect-with-cosmic-and-another-bed-file/2875/3 "2022-10-13T22:01:17Z")

</div>


