---
name: "bp_index"
section: "1p"
platform: "linux"
package: "bioperl"
version: "1.7.8-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bp_index"
---

# bp\_index(1p)

indexes files for use by bp\_fetch.pl

## NAME

bp\_index.pl - indexes files for use by bp\_fetch.pl

## SYNOPSIS

bp\_index.pl index\_name file1 file2 etc.

## DESCRIPTION

bp\_index.pl builds a bioperl index for the sequence files given in the argument list, under the index name. For example

```
   bp_index.pl nrdb /data/nrdb/nrdb.fasta
```

would build an index called 'nrdb' as the index name for the file nrdb.fasta, and

```
   bp_index.pl -fmt EMBL swiss /data/swiss/*.dat
```

would build an index called swiss for all the files in /data/swiss which end in .dat which are in EMBL format.

The indexes are built using the Bio/Index/\* modules, in particular, Bio::Index::EMBL and the Bio::Index::Fasta modules. Any script which uses these modules can use the index. A good example script is bp\_fetch which fetches sequences and pipes them to STDOUT, for example

```
   bp_fetch swiss:ROA1_HUMAN
```

gets the ROA1\_HUMAN sequence from the swiss index and writes it as fasta format on STDOUT.

## OPTIONS

```
  -fmt  <format>   - Fasta (default), swiss or EMBL
  -dir  <dir>      - directory where the index files are found
                     (overrides BIOPERL_INDEX environment variable)
```

Options for expert use

```
  -type <db_type>  - DBM_file type.
                     (overrides BIOPERL_INDEX_TYPE environment variable)
  -v               - report every index addition (debugging)
```

## ENVIRONMENT

bp\_index and bp\_fetch coordinate where the databases lie using the environment variable BIOPERL\_INDEX. This can be overridden using the -dir option. There is no default value, so you must use the -dir option  or set BIOPERL\_INDEX.

The DB type is coordinated with BIOPERL\_INDEX\_TYPE which if it is not there, defaults to whatever the bioperl modules have installed, which itself defaults to SDBM\_File.

## USING IT YOURSELF

bp\_index.pl is a script that drives the Index modules. If you want to  use this script heavily in your work, if it is Perl based, it is  almost certainly better to look at the code in this script and copy it across (probably you will be more likely to want to use the bp\_fetch code).

## EXTENDING IT

bp\_index is just a wrapper around James Gilbert's excellent Index modules found in bioperl

## FEEDBACK

### Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list.  Your participation is much appreciated.

```
  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
```

### Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

```
  https://github.com/bioperl/bioperl-live/issues
```

## AUTHOR - Ewan Birney

Ewan Birney \<birney@ebi.ac.uk\>
