How to convert Mummer coords output to a Bed file?
1
0
Entering edit mode
10 weeks ago
Biologist ▴ 290

I'm trying to check the sequence similarity between two genes using mummer.

I have nucmer.coords file with the following information:

  [S1]     [E1]  |     [S2]     [E2]  |  [LEN 1]  [LEN 2]  |  [% IDY]  |  [LEN R]  [LEN Q]  |  [COV R]  [COV Q]  | [TAGS]
 ===============================================================================================================================
  5080     5651  |     12880    13453  |    572      574  |    78.97  |     3568     4514  |     3.69     5.84  | Gene1    Gene2
  5083     6078  |     39063    40043  |    996      981  |    79.75  |     3568     4514  |     1.92     3.21  | Gene1    Gene2
  5217     6079  |     20844    21712  |    863      869  |    89.96  |     3568     4514  |     8.98    14.53  | Gene1    Gene2
  5330     6079  |     36215    35465  |    750      751  |    59.60  |     3568     4514  |     3.85     5.95  | Gene1    Gene2

How to convert the above information into BED file?

nucmer mummer bed • 285 views
ADD COMMENT
0
Entering edit mode

Why did you delete the post, Biologist ?

ADD REPLY
0
Entering edit mode
10 weeks ago
Nikhita • 0

Try

awk -F '|' '!/^=/{gsub(/^[ \t]+|[ \t]+$/, "", $0); split($1, coords, " +"); split($15, tags, " +"); print tags[1] "\t" coords[1] "\t" coords[2] "\t" tags[2] "\t0\t+"}' nucmer.coords > output.bed
ADD COMMENT

Login before adding your answer.

Traffic: 1724 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6