I have a gene ontology obo file, and would like to rearrange the obo format file in a single column to a text file in three columns comprised of 'parent (id:GO:xxxxxxx)', 'child (is_a: GO:xxxxxxx, part_of GO:xxxxxxx, or positively/negatively_regulates GO:xxxxxxx. For example...
Thank you for your help in advance!
Original file:
[Term]
id: GO:0000001 # parent
name: mitochondrion inheritance
namespace: biological_process
def: "The distribution of mitochondria, including the mitochondrial genome, into daughter cells after mitosis or meiosis, mediated by interactions between mitochondria and the cytoskeleton." [GOC:mcc, PMID:10873824, PMID:11389764]
synonym: "mitochondrial inheritance" EXACT []
is_a: GO:0048308 ! organelle inheritance # child
is_a: GO:0048311 ! mitochondrion distribution # child
[Term]
id: GO:0000015 # parent
name: phosphopyruvate hydratase complex
namespace: cellular_component
def: "A multimeric enzyme complex, usually a dimer or an octamer, that catalyzes the conversion of 2-phospho-D-glycerate to phosphoenolpyruvate and water." [GOC:jl, ISBN:0198506732]
subset: goslim_metagenomics
synonym: "enolase complex" EXACT []
is_a: GO:1902494 ! catalytic complex # child
relationship: part_of GO:0005829 ! cytosol # child
[Term]
id: GO:0000122 # parent
name: negative regulation of transcription by RNA polymerase II
namespace: biological_process
alt_id: GO:0010553
alt_id: GO:0045816
def: "Any process that stops, prevents, or reduces the frequency, rate or extent of transcription mediated by RNA polymerase II." [GOC:go_curators, GOC:txnOH]
synonym: "down regulation of global transcription from RNA polymerase II promoter" RELATED []
synonym: "down regulation of transcription from RNA polymerase II promoter" EXACT []
synonym: "down-regulation of global transcription from RNA polymerase II promoter" RELATED []
synonym: "down-regulation of transcription from RNA polymerase II promoter" EXACT []
synonym: "downregulation of global transcription from RNA polymerase II promoter" RELATED []
synonym: "downregulation of transcription from RNA polymerase II promoter" EXACT []
synonym: "inhibition of global transcription from RNA polymerase II promoter" RELATED []
synonym: "inhibition of transcription from RNA polymerase II promoter" EXACT []
synonym: "negative regulation of gene-specific transcription from RNA polymerase II promoter" RELATED []
synonym: "negative regulation of global transcription from Pol II promoter" RELATED []
synonym: "negative regulation of transcription from Pol II promoter" EXACT []
synonym: "negative regulation of transcription from RNA polymerase II promoter" EXACT []
synonym: "negative regulation of transcription from RNA polymerase II promoter, global" RELATED []
is_a: GO:0006357 ! regulation of transcription by RNA polymerase II # child
is_a: GO:0045892 ! negative regulation of DNA-templated transcription # child
relationship: negatively_regulates GO:0006366 ! transcription by RNA polymerase II # child
Desired format:
Parent Child Relationship
GO:0000001 GO:0048308 is_a
GO:0000001 GO:0048311 is_a
GO:0000015 GO:1902494 is_a
GO:0000015 GO:0005829 part_of
GO:0000122 GO:0006357 is_a
GO:0000122 GO:0045892 is_a
GO:0000122 GO:0006366 negatively_regulates