I have a ruby script that creates a HTML file as the output with certain letters coloured.
e.g.
<p>
<b>>aug3me.g5.t1</b> has a signal p with a cleavage site between positions 19 and 20.<br>
<b class="SignalP">MLRSMMLMIAMGCFLNAFG</b>QSGQELE<b class="motif_site">KR</b>VI<b class="motif_site">KNAR</b>QLIYEG<b class="motif_site">KR</b>SGEGYFSKDGK<b class="motif_site">HLIFQSER</b>EEENPYYQIYILDLESGDINRVSPGQGKTTCSYFDWSSDNNVLFGSTHHDPKAKEKQQAELDF<b class="motif_site">RASGKKRR</b>YSWDYDKEMDIFSAN<b class="motif_site">RDGSNVKR</b>ITTEEGYDAEGSYSPDG<b class="motif_site">KK</b>IAFCSLRDAYN<b class="motif_site">KK</b>LSEKEIKTLEVDAAYFGEIYIMDADGSNQ<b class="motif_site">KR</b>LTNVPEPVRITHTDGFDGLPVFSPNGKNIAWTSVRTSD<b class="motif_site">KK</b>SQIFYASWDHQAALSLLKQAPAKGQDAKDPNFTGEIKSDEIKSKVAYLASDELEGRMTGSEGI<b class="motif_site">KK</b>ASDYITGQF<b class="motif_site">KK</b>IGLNSIESREEYLQEFPFVSSVEVNAAGTSFSTTN<b class="motif_site">KK</b>KPKAWVLYENFVPLPFSMNGEFEGEVVFAGYGIKTPDKSEVEYNSYANIEVKDKAVMILFDVPPHFNDDEEKELI<b class="motif_site">RYASPR</b>Y<b class="motif_site">KALVAR</b>ELGAKAVIFISE<b class="motif_site">REREFR</b>GVSKDNVPGNAGILALKVKSDLANEMLKSKETDFEKVKTQFENYNPHSENEFPLPGQTIGITTQLDKVESSDNNVIGILYADEPTDHYLMVGAHYD<b class="motif_site">HLGR</b>GEAGTLAHGEEKEEIHNGADDNASGTAAVMELAEYFVQLKNENPGSLTKNLLFALWSGEEMGLVGSAHYTKQSSKEIEGMDAYLNFDMIGMLNDNKLILQGLGSSPAWNKIVE<b class="motif_site">KK</b>NVAAGFDLTLQDDPYVPTDGMSFYQAGVPMLCFFSGIHDYYH<b class="motif_site">KPTDDIER</b>LNYEGAERIIKFSAEIIKELMKVDTLAYA<b class="motif_site">KVEMVKNR</b>AAGSKGFSVYLGTIPDYVAEVEGV<b class="motif_site">KLSGVR</b>AGGPAEKAVFRPN<b class="motif_site">KALR</b>LYGLNPLRGPH
</p>
With the above sequence, certain residues (letters) are coloured in colour or another etc.
I need to make a script that makes a text file of some kind (ideally a .doc file) that has all these formattings.
Is it possible to make a script to create a word document with formatting. If so, how would I approach this?