---
name: "cdbyank"
section: "1"
platform: "linux"
package: "cdbfasta"
version: "1.00+git20230710.da8f5ba+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdbyank"
---

# cdbyank(1)

Query an index file created with cdbfasta.

## NAME

cdbyank - Query an index file created with cdbfasta.

## DESCRIPTION

### Usage:

-

  cdbyank \<index\_file\> \[-d \<fasta\_file\>\] \[-a \<key\>\|-n\|-l\|-s\]

-

  \[-o \<outfile\>\] \[-q \<char\>\|-Q\]\[-F\] \[-R\] \[-P\] \[-x\] \[-w\] \[-z \<dbfasta.cdbz\>

-

  \<index\_file\> is the index file created previously with cdbfasta

-

  (usually having a ".cidx" suffix)

**-a** \<key\> the sequence name (accession) for a fasta record to be

-

  retrieved; if not given, a list of accessions is expected at stdin

**-d** \<fasta\_file\> is the fasta file to pull records from;

-

  if not specified, cdbyank will look in the same directory where \<index\_file\> resides, for a file with the same name but without the ".cidx" suffix

**-o** the records found are written to file \<outfile\> instead of stdout

**-x** allows retrieval of multiple records per key, if the indexed

-

  database had records with the same key (non-unique keys); (without **-x** only one record for a given key is retrieved)

**-i** case insensitive query (expects the \<index\_file\> to have been

-

  created with cdbfasta **-i** option)

**-Q** output the query key surrounded by character '%' before the

-

  corresponding record

**-q** same as **-Q** but use character \<char\> instead of '%'

**-w** enable warnings (sent to stderr) when a key is not found

**-F** pulls only the defline for each record (discard the sequence)

**-P** only displays the position(s) (file offset) within the

-

  database file, for the requested record(s)

**-R** sequence range extraction: expects the input \<key(s)\> to have

-

  the format: '\<seq\_name\> \<start\> \<end\>' and pulls only the specified sequence range

**-z** decompress the entire file \<dbfasta.cdbz\>

-

  (assumes it was built using cdbfasta with '-z' option)

**-v** show version number and exit

-

  Index file statistics (no database file needed): **-n** display the number of records indexed **-l** list all keys stored in \<index\_file\> **-s** display indexing summary info

-
