Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 6 revisions

Biopiece: count_records

Description

count_records count the number of records in the stream and outputs the count as a record who's count is not included. Using count_recrods with the -x switch is a lot faster because this prevents the need for parsing and emitting the records.

Usage

... | count_records [options]

Options

[-?         | --help]               #  Print full usage description.
[-x         | --no_stream]          #  Do not emit records.
[-o <file>  | --data_out=<file>]    #  Write result to file.
[-I <file!> | --stream_in=<file!>]  #  Read input from stream file  -  Default=STDIN
[-O <file>  | --stream_out=<file>]  #  Write output to stream file  -  Default=STDOUT
[-v         | --verbose]            #  Verbose output.

Examples

To count the records in the stream and saving the result to file, do:

... | count_record -o <file>

The resulting file will then contain some thing like this:

RECORDS_COUNT: 1234
---

See also

count_vals

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

[email protected]

August 2007

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

count_records is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally