Skip to content

Commit

Permalink
Added missing sections text file for test
Browse files Browse the repository at this point in the history
  • Loading branch information
dvklopfenstein committed Jul 6, 2018
1 parent 1bb94a2 commit 2754f35
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 4 deletions.
204 changes: 204 additions & 0 deletions data/gjoneska/sections_in.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# Versions:
# go-basic.obo: fmt(1.2) rel(2018-03-25) 47,185 GO Terms; optional_attrs(relationship)
# goslim_generic.obo: fmt(1.2) rel(None) 235 GO Terms

# GROUP NAME: init
# SECTION: immune
GO:0002376 # BP ** 59 uGOs 1796 19 L01 D01 R01 K .... .rdu immune system process
GO:0001816 # BP ** 20 uGOs 678 52 L02 D02 R02 D .... prdu cytokine production
GO:0045321 # BP ** 16 uGOs 443 6 L02 D03 R03 AK .... .rdu leukocyte activation
GO:0045087 # BP ** 8 uGOs 288 13 L03 D04 R04 FK .... prdu innate immune response
GO:0006954 # BP ** 4 uGOs 189 4 L04 D04 R04 F .... prdu inflammatory response
GO:0050900 # BP * 1 uGOs 157 9 L02 D05 R05 AGKN .... .rdu leukocyte migration
GO:0002263 # BP ** 2 uGOs 149 4 L03 D03 R03 AFK P... .... cell activation involved in immune response
GO:0007159 # BP * 3 uGOs 125 3 L04 D04 R04 Q .... .rdu leukocyte cell-cell adhesion
GO:0070661 # BP * 6 uGOs 88 5 L02 D02 R02 O .... .rdu leukocyte proliferation
GO:0071887 # BP ** 1 uGOs 75 5 L05 D05 R05 A .... .rdu leukocyte apoptotic process
GO:0001909 # BP * 5 uGOs 62 5 L02 D02 R02 S .... .rdu leukocyte mediated cytotoxicity

# SECTION: viral/bacteria
GO:0016032 # BP * 2 uGOs 361 47 L04 D04 R04 I .... prdu viral process
GO:0098542 # BP * 1 uGOs 149 8 L03 D05 R05 FI .... p... defense response to other organism
GO:0009617 # BP ** 5 uGOs 89 3 L03 D05 R05 FI .... p... response to bacterium
GO:0009620 # BP ** 1 uGOs 37 4 L03 D05 R05 FI .... p... response to fungus
GO:0009615 # BP ** 3 uGOs 30 4 L03 D05 R05 FI .... .... response to virus

# SECTION: neuro
GO:0007399 # BP ** 4 uGOs 1271 0 L04 D04 R05 DE .... prdu nervous system development
GO:0022008 # BP ** 9 uGOs 705 2 L04 D04 R06 ADE P... .rdu neurogenesis
GO:0007610 # BP ** 10 uGOs 280 26 L01 D01 R01 R .... .rdu behavior
GO:0099536 # BP * 6 uGOs 227 3 L03 D04 R04 AJ .... p... synaptic signaling
GO:0031175 # BP ** 3 uGOs 223 7 L05 D05 R10 ADEH P... prdu neuron projection development
GO:0050877 # BP ** 14 uGOs 199 12 L03 D03 R03 D .... .rdu nervous system process
GO:0006836 # BP ** 2 uGOs 175 18 L04 D04 R04 G .... .rdu neurotransmitter transport
GO:0048812 # BP ** 1 uGOs 155 5 L06 D07 R11 ADEH P... p... neuron projection morphogenesis
GO:0048667 # BP ** 9 uGOs 149 4 L06 D06 R10 ADEH P... p... cell morphogenesis involved in neuron differentiation
GO:0050808 # BP ** 6 uGOs 134 7 L03 D03 R03 AH .... prd. synapse organization
GO:0061351 # BP * 2 uGOs 75 8 L02 D02 R02 O .... .rdu neural precursor cell proliferation
GO:0099531 # BP * 1 uGOs 72 10 L01 D01 R08 AJU P... .... presynaptic process involved in chemical synaptic transmission
GO:0099504 # BP * 1 uGOs 61 0 L04 D04 R04 G .... pr.. synaptic vesicle cycle
GO:0097479 # BP * 3 uGOs 47 2 L05 D05 R05 G .... p... synaptic vesicle localization
GO:0048167 # BP ** 7 uGOs 28 11 L03 D07 R09 ABJ .... .... regulation of synaptic plasticity
GO:0035418 # BP ** 1 uGOs 22 5 L04 D04 R04 G .... .r.u protein localization to synapse
GO:0019228 # BP ** 1 uGOs 3 0 L05 D05 R05 ABDJ P... .rdu neuronal action potential
GO:0007158 # BP ** 1 uGOs 0 0 L04 D04 R04 Q .... .... neuron cell-cell adhesion

# SECTION: cell death
GO:0008219 # BP ** 11 uGOs 503 4 L02 D02 R02 A .... .rdu cell death
GO:0006915 # BP ** 12 uGOs 405 18 L04 D04 R04 A .... prdu apoptotic process
GO:0001906 # BP * 2 uGOs 113 3 L01 D01 R01 S .... .rdu cell killing
GO:0008637 # BP * 2 uGOs 16 4 L05 D05 R05 AH P... .... apoptotic mitochondrial changes

# SECTION: lipid
GO:0006629 # BP ** 14 uGOs 945 8 L03 D03 R03 C .... .rdu lipid metabolic process
GO:0010876 # BP * 5 uGOs 257 1 L03 D03 R03 G .... prdu lipid localization
GO:0033993 # BP * 2 uGOs 196 35 L04 D04 R04 F .... .... response to lipid
GO:0042157 # BP * 1 uGOs 64 3 L04 D05 R05 C .... .rdu lipoprotein metabolic process
GO:0097006 # BP ** 1 uGOs 47 0 L03 D03 R03 B .... p... regulation of plasma lipoprotein particle levels
GO:0071825 # BP * 2 uGOs 34 4 L04 D04 R04 AH .... .... protein-lipid complex subunit organization
GO:0055088 # BP ** 1 uGOs 12 8 L05 D05 R05 B .... .... lipid homeostasis
GO:0071402 # BP * 1 uGOs 10 4 L03 D03 R03 AF .... p... cellular response to lipoprotein particle stimulus

# SECTION: adhesion
GO:0022610 # BP ** 2 uGOs 350 4 L01 D01 R01 Q .... .... biological adhesion
GO:0007155 # BP ** 6 uGOs 311 8 L02 D02 R02 Q .... .rdu cell adhesion
GO:0031589 # BP ** 2 uGOs 44 7 L03 D03 R03 Q .... .rdu cell-substrate adhesion

# SECTION: mitosis
GO:0000278 # BP ** 13 uGOs 356 5 L03 D03 R03 A .... prdu mitotic cell cycle
GO:0140014 # BP * 13 uGOs 116 1 L04 D06 R06 AH .... prdu mitotic nuclear division
GO:0000281 # BP ** 1 uGOs 79 1 L04 D05 R06 A .... prdu mitotic cytokinesis
GO:0098763 # BP * 2 uGOs 12 3 L03 D03 R03 T .... .... mitotic cell cycle phase

# SECTION: mieosis
GO:0051321 # BP ** 6 uGOs 301 1 L02 D03 R03 ALM .... prdu meiotic cell cycle
GO:0045132 # BP ** 4 uGOs 90 5 L03 D04 R07 AHLM P... p... meiotic chromosome segregation
GO:0051327 # BP ** 1 uGOs 0 0 L04 D04 R04 T .... .... meiotic M phase

# SECTION: cell cycle
GO:0007049 # BP ** 14 uGOs 923 2 L02 D02 R02 A .... prdu cell cycle
GO:0051301 # BP ** 3 uGOs 232 18 L02 D02 R02 A .... prdu cell division
GO:0098813 # BP * 7 uGOs 223 2 L03 D03 R04 A .... p... nuclear chromosome segregation
GO:0044786 # BP ** 3 uGOs 80 3 L03 D09 R09 AC .... p... cell cycle DNA replication
GO:0022403 # BP ** 3 uGOs 46 12 L02 D02 R02 T .... .... cell cycle phase

# SECTION: damage/repair
GO:0006974 # BP ** 13 uGOs 212 10 L04 D04 R04 AF .... prdu cellular response to DNA damage stimulus
GO:0006281 # BP ** 9 uGOs 137 15 L05 D07 R07 ACF .... prdu DNA repair

# SECTION: chromatin
GO:0006325 # BP ** 9 uGOs 352 13 L03 D03 R05 AH P... prdu chromatin organization
GO:0040029 # BP ** 4 uGOs 126 5 L06 D06 R06 BC .... .... regulation of gene expression, epigenetic

# SECTION: DNA
GO:0051276 # BP ** 6 uGOs 674 18 L04 D04 R04 AH .... prdu chromosome organization
GO:0097659 # BP * 4 uGOs 617 2 L06 D08 R08 AC .... .rdu nucleic acid-templated transcription
GO:0006259 # BP ** 23 uGOs 578 44 L04 D06 R06 AC .... .rdu DNA metabolic process
GO:0007059 # BP ** 2 uGOs 231 1 L02 D02 R02 A .... prdu chromosome segregation
GO:0006397 # BP ** 1 uGOs 65 7 L07 D08 R08 AC .... prdu mRNA processing
GO:0051383 # BP ** 2 uGOs 9 1 L04 D05 R05 AH .... .... kinetochore organization

# SECTION: development
GO:0032502 # BP ** 5 uGOs 6473 22 L01 D01 R01 E .... .rdu developmental process
GO:0048856 # BP ** 26 uGOs 6065 195 L02 D02 R02 E .... p... anatomical structure development
GO:0048646 # BP * 1 uGOs 878 106 L02 D02 R04 E P... .... anatomical structure formation involved in morphogenesis
GO:0008283 # BP ** 9 uGOs 492 31 L01 D01 R01 O .... prdu cell proliferation
GO:0090066 # BP * 1 uGOs 162 7 L03 D03 R03 B .... .... regulation of anatomical structure size
GO:0048762 # BP ** 1 uGOs 76 8 L04 D04 R07 ADE P... p... mesenchymal cell differentiation

# SECTION: extracellular matrix
GO:0030198 # BP ** 2 uGOs 51 10 L04 D04 R04 AH .... prdu extracellular matrix organization

# SECTION: localization
GO:0051179 # BP ** 17 uGOs 4337 10 L01 D01 R01 G .... .r.. localization
GO:0006810 # BP ** 12 uGOs 2987 34 L03 D03 R03 G .... .rdu transport
GO:0006811 # BP ** 10 uGOs 1025 3 L04 D04 R04 G .... .rdu ion transport
GO:0040011 # BP ** 2 uGOs 843 9 L01 D01 R01 N .... .rdu locomotion
GO:0006928 # BP ** 8 uGOs 826 5 L02 D02 R02 A .... .rdu movement of cell or subcellular component
GO:0032409 # BP ** 6 uGOs 134 5 L03 D03 R03 B .... .... regulation of transporter activity
GO:0090130 # BP ** 2 uGOs 76 3 L02 D02 R02 D .... .... tissue migration

# SECTION: membrane
GO:0055085 # BP ** 9 uGOs 737 26 L04 D04 R04 G .... .rdu transmembrane transport
GO:0061024 # BP * 2 uGOs 379 30 L03 D03 R03 AH .... p... membrane organization
GO:0042391 # BP ** 4 uGOs 133 20 L03 D03 R03 B .... .... regulation of membrane potential
GO:0033619 # BP * 1 uGOs 9 3 L05 D06 R06 C .... .... membrane protein proteolysis

# SECTION: metabolic
GO:0008152 # BP ** 16 uGOs 9801 21 L01 D01 R01 C .... .rdu metabolic process
GO:0034641 # BP ** 7 uGOs 3607 23 L03 D03 R03 AC .... .... cellular nitrogen compound metabolic process
GO:0006091 # BP ** 3 uGOs 217 10 L03 D03 R03 AC .... .r.. generation of precursor metabolites and energy

# SECTION: phosphorylation
GO:0006793 # BP ** 7 uGOs 1378 28 L03 D03 R03 AC .... .rdu phosphorus metabolic process
GO:0006464 # BP ** 13 uGOs 1323 62 L05 D06 R06 AC .... .rdu cellular protein modification process

# SECTION: signaling
GO:0007154 # BP ** 3 uGOs 2447 14 L02 D02 R02 A .... prdu cell communication
GO:0023052 # BP ** 29 uGOs 2305 7 L01 D01 R01 J .... prdu signaling
GO:0007267 # BP ** 3 uGOs 652 31 L02 D03 R03 AJ .... p... cell-cell signaling

# SECTION: stimulus
GO:0050896 # BP ** 32 uGOs 6004 16 L01 D01 R01 F .... .rdu response to stimulus

# SECTION: vascular
GO:0072359 # BP * 9 uGOs 640 0 L04 D04 R05 DE .... p... circulatory system development
GO:0003013 # BP ** 3 uGOs 318 4 L03 D03 R03 D .... .... circulatory system process
GO:0086001 # BP * 1 uGOs 56 5 L05 D05 R05 B .... pr.. cardiac muscle cell action potential
GO:0050817 # BP ** 1 uGOs 42 2 L02 D02 R02 D .... .rdu coagulation
GO:0007596 # BP ** 5 uGOs 37 0 L03 D05 R05 BDF P... prdu blood coagulation

# SECTION: cytoskeleton
GO:0006928 # BP ** 8 uGOs 826 5 L02 D02 R02 A .... .rdu movement of cell or subcellular component
GO:0007010 # BP ** 1 uGOs 384 12 L04 D04 R04 AH .... .rdu cytoskeleton organization
GO:0030030 # BP ** 3 uGOs 382 5 L03 D03 R03 AH .... .rdu cell projection organization
GO:0007017 # BP ** 14 uGOs 298 8 L02 D02 R02 A .... .r.. microtubule-based process
GO:0030029 # BP ** 4 uGOs 242 4 L02 D02 R02 A .... .r.. actin filament-based process

# SECTION: reproduction
GO:0022414 # BP ** 2 uGOs 1219 106 L01 D01 R02 LM P... .rdu reproductive process
GO:0009790 # BP * 1 uGOs 649 2 L03 D04 R04 DE .... prdu embryo development
GO:0009792 # BP * 3 uGOs 170 2 L04 D05 R05 DE .... p... embryo development ending in birth or egg hatching

# SECTION: vesicle
GO:0016192 # BP ** 9 uGOs 463 20 L04 D04 R04 G .... pr.. vesicle-mediated transport
GO:0016050 # BP ** 1 uGOs 138 13 L04 D04 R04 AH .... .... vesicle organization

# SECTION: catalytic
GO:0050790 # BP * 13 uGOs 629 12 L03 D03 R03 B .... .... regulation of catalytic activity

# SECTION: activation
GO:0001775 # BP ** 4 uGOs 496 13 L02 D02 R02 A .... .rdu cell activation

# SECTION: hemostasis
GO:0042592 # BP ** 14 uGOs 468 6 L03 D03 R03 B .... p... homeostatic process
GO:0050878 # BP ** 1 uGOs 97 10 L03 D03 R03 B .... p... regulation of body fluid levels
GO:0042303 # BP * 2 uGOs 56 3 L02 D02 R02 D .... p... molting cycle
GO:0007599 # BP ** 1 uGOs 42 2 L04 D04 R04 B .... .rdu hemostasis
GO:0001503 # BP * 2 uGOs 32 6 L02 D02 R02 D .... prdu ossification

# SECTION: broad
GO:0008150 # BP ** 1 uGOs 29594 30 L00 D00 R00 .... .rdu biological_process
GO:0009987 # BP ** 1 uGOs 18685 56 L01 D01 R01 A .... .rdu cellular process
GO:0065007 # BP ** 8 uGOs 13031 3 L01 D01 R01 B .... .... biological regulation
GO:0032501 # BP ** 6 uGOs 7527 68 L01 D01 R01 D .... .rdu multicellular organismal process
GO:0009058 # BP * 3 uGOs 3664 19 L02 D02 R02 C .... .rdu biosynthetic process

# SECTION: Misc.
GO:0071840 # BP * 12 uGOs 3562 2 L01 D01 R01 H .... .... cellular component organization or biogenesis
GO:0044281 # BP ** 10 uGOs 2873 19 L02 D02 R02 C .... .rdu small molecule metabolic process
GO:0030154 # BP ** 9 uGOs 2423 80 L03 D03 R03 AE .... prdu cell differentiation
GO:0051704 # BP ** 4 uGOs 2369 17 L01 D01 R01 I .... .rdu multi-organism process
GO:0009056 # BP * 4 uGOs 1841 10 L02 D02 R02 C .... .rdu catabolic process
GO:0006950 # BP ** 10 uGOs 1603 30 L02 D02 R02 F .... .r.. response to stress
GO:0044403 # BP * 3 uGOs 1372 5 L03 D03 R03 I .... pr.. symbiont process
GO:0051186 # BP * 1 uGOs 550 24 L03 D03 R03 AC .... .rdu cofactor metabolic process
GO:0065003 # BP ** 4 uGOs 451 52 L04 D04 R04 AH .... .rdu protein-containing complex assembly
GO:0040007 # BP * 1 uGOs 432 11 L01 D01 R01 P .... .rdu growth
GO:0034655 # BP * 1 uGOs 316 4 L04 D05 R05 AC .... .... nucleobase-containing compound catabolic process
GO:0000902 # BP ** 6 uGOs 290 3 L04 D04 R05 AEH .... pr.. cell morphogenesis
GO:0042254 # BP * 1 uGOs 93 0 L04 D04 R04 H .... prdu ribosome biogenesis
GO:0044848 # BP ** 1 uGOs 72 5 L01 D01 R01 T .... .... biological phase
GO:0007568 # BP ** 3 uGOs 70 5 L02 D02 R02 E .... p... aging
GO:0006605 # BP * 1 uGOs 53 6 L05 D09 R09 G .... .r.. protein targeting

7 changes: 4 additions & 3 deletions goatools/grouper/read_goids.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,20 @@ def read_txt(self, fin_txt, get_goids_only, exclude_ungrouped, prt=sys.stdout):
return sections

def read_py(self, fin_txt, get_goids_only, exclude_ungrouped, prt=sys.stdout):
"""Get user list of GO IDs either from a list or from GO IDs on the command-line"""
"""Read GO IDs or sections data from a Python file."""
goids_fin = self._read_txt(fin_txt, get_goids_only, exclude_ungrouped)
self._read_finish(goids_fin, prt)
sections = self._read_finish(goids_fin, prt)
# Print summary of GO IDs read
if prt is not None:
self._prt_read_msg(prt, fin_txt, exclude_ungrouped)
return sections

def read_sections(self, sections_file, get_goids_only, exclude_ungrouped):
"""Read sections variable from a text file of from a Python file."""
ext = os.path.splitext(sections_file)
file_contents = None
if ext and ext == ".py":
file_contents = self.read_txt(sections_file, get_goids_only, exclude_ungrouped)
file_contents = self.read_py(sections_file, get_goids_only, exclude_ungrouped)
else:
file_contents = self.read_txt(sections_file, get_goids_only, exclude_ungrouped)
if file_contents:
Expand Down
9 changes: 8 additions & 1 deletion tests/test_wr_sections_txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ def test_wr_sections_txt():
# ------------------------------------------------------------------
sec1 = _read_sections("./data/gjoneska/sections_in.txt")
# Print usrgos in sections, showing how they were grouped under hdrgos
_wr_sections_txt("sec0_hdr1.txt", usrgos, sec1, grprdflt=grprdflt)
_wr_sections_txt("a_ec0_hdr1.txt", usrgos, sec1, grprdflt=grprdflt)

# ------------------------------------------------------------------
# Print usrgos in txt using sections containing hdrgos
# ------------------------------------------------------------------
# sec2 = _read_sections("goatools/test_data/sections/gjoneska_pfenning.py")
# # Print usrgos in sections, showing how they were grouped under hdrgos
# _wr_sections_txt("b_sec0_hdr1.txt", usrgos, sec2, grprdflt=grprdflt)


def _read_sections(fin):
Expand Down

0 comments on commit 2754f35

Please sign in to comment.