---
name: "GO::Parsers::base_parser"
section: "3pm"
platform: "linux"
package: "libgo-perl"
version: "0.15-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GO::Parsers::base_parser"
---

# GO::Parsers::base\_parser(3pm)

## NAME

```
  GO::Parsers::base_parser     - base class for parsers
```

## SYNOPSIS

```
  do not use this class directly; use GO::Parser
```

## DESCRIPTION

## AUTHOR

### show\_messages

```
  Usage   -
  Returns -
  Args    -
```

### normalize\_files

```
  Usage   - @files = $parser->normalize_files(@files)
  Returns -
  Args    -
```

takes a list of filenames/paths, "glob"s them, uncompresses any compressed files and returns the new file list

### litemode

```
  Usage   - $p->litemode(1)
  Returns -
  Args    - bool
```

when set, parser will only throw the following events:

id\|name\|is\_a\|relationship\|namespace

(optimisation for fast parsing)

### acc2name\_h

```
  Usage   - $n = $p->acc2name_h->{'GO:0003673'}
  Returns - hashref
  Args    - hashref [optional]
```

gets/sets a hash mapping IDs to names

this will be automatically set by an ontology parser

a non-ontology parser will use this index to verify the parsed data (see `$p`-\>acc\_not\_found($id), below)

### acc\_not\_found

```
  Usage   - if ($p->acc_not_found($go_id)) { warn("$go_id not known") }
  Returns - bool
  Args    - acc string
```

uses acc2name\_h - if this hash mapping has been created AND the acc is not in the hash, THEN it is considered not found

This is useful for non-ontology parsers (xref\_parser, go\_assoc\_parser) to check whether a referenced ID is actually present in the ontology

note that if acc2name\_h has not been created, then accs cannot be considered not-found, and this will always return 0/false
