please help, I have a huge file with blocks of data which I need to convert to a tabular format.
Input
sample
[Term]
id: GO:0000017
name: alpha-glucoside transport
namespace: biological_process
def: "The directed movement of alpha-glucosides into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore. Alpha-glucosides are glycosides in which the sugar group is a glucose residue, and the anomeric carbon of the bond is in an alpha configuration." [GOC:jl, http://www.biochem.purdue.edu/, ISBN:0198506732]
is_a: GO:0042946 ! glucoside transport
[Term]
id: GO:0000018
name: regulation of DNA recombination
namespace: biological_process
def: "Any process that modulates the frequency, rate or extent of DNA recombination, a DNA metabolic process in which a new genotype is formed by reassortment of genes resulting in gene combinations different from those that were present in the parents." [GOC:go_curators, ISBN:0198506732]
subset: gosubset_prok
is_a: GO:0051052 ! regulation of DNA metabolic process
relationship: regulates GO:0006310 ! DNA recombination
Each block starts with [Term] and has fields id, name, namspace etc.
Note that the def sometimes carries over to the next line in the input, I would like that to be in a column in the output
I want to have a table with the four columns
id name namespace def
Desired output (tab delimited possibly)
id name namespace def
GO:0000017 alpha-glucoside transport biological_process "The directed movement of alpha-glucosides into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore. Alpha-glucosides are glycosides in which the sugar group is a glucose residue, and the anomeric carbon of the bond is in an alpha configuration." [GOC:jl, http://www.biochem.purdue.edu/, ISBN:0198506732]
GO:0000018 regulation of DNA recombination biological_process "Any process that modulates the frequency, rate or extent of DNA recombination, a DNA metabolic process in which a new genotype is formed by reassortment of genes resulting in gene combinations different from those that were present in the parents." [GOC:go_curators, ISBN:0198506732]