Construct a gene arrow map to show the gene features
2
1
Entering edit mode
7.0 years ago
utkarsh.sood ▴ 40

Hello,

I want to generate a gene arrow map showing all the details like gene features, annotation etc. I have the data in the following format:

start   stop    strand  function
208 885 +   Chromosomal replication initiator protein DnaA
1576    1157    -   FIG00958722: hypothetical protein
2174    1578    -   Flavoprotein WrbA
2524    2171    -   Arsenate reductase (EC 1.20.4.1)
2649    3884    +   Inner membrane protein YihY, formerly thought to be RNase BN
4034    4228    +   FIG00956556: hypothetical protein

Please let me know about any software that can convert the above mentioned information to well formatted gene arrow map.

Thanks

gene map Coordinates Annotation • 2.9k views
ADD COMMENT
5
Entering edit mode
7.0 years ago

using awk :-D

 awk -F '\t ' -v chromStart=208.0 -v chromEnd=4228.0 '/^start/{next;} {L=60.0;x1=L*(int($1)-chromStart)/(chromEnd-chromStart);x2=L*(int($2)-chromStart)/(chromEnd-chromStart);if(x1>x2) { t=x1;x1=x2;x2=t;} for(i=0;i<L;++i) {c=" ";if(i>=int(x1) && i<=int(x2)) { c=$3=="+"?">":"<" } ; printf("%c",c);}printf("  %s\n",$4);}' input.tsv


>>>>>>>>>>>                                                   Chromosomal replication initiator protein DnaA
              <<<<<<<                                         FIG00958722: hypothetical protein
                    <<<<<<<<<<                                Flavoprotein WrbA
                             <<<<<<                           Arsenate reductase (EC 1.20.4.1)
                                    >>>>>>>>>>>>>>>>>>>       Inner membrane protein YihY, formerly thought to be RNase BN
                                                         >>>  FIG00956556: hypothetical protein

else see

ADD COMMENT
4
Entering edit mode

I'm usually amazed by the elegant awk solutions you offer, but today you took this a step too far o.O

ADD REPLY
1
Entering edit mode

he is a master at these , he always amazes me. I have learnt a lot from his blogs and posts here to be honest. Take a bow @Pierre

ADD REPLY
0
Entering edit mode
3 months ago

I have made an R package called geneviewer that is designed for drawing gene arrow maps like the example below. Have a look at the package website and github

enter image description here

ADD COMMENT

Login before adding your answer.

Traffic: 2118 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