https://github.com/alexpreynolds/subset
Draw a subset of lines from a text file
https://github.com/alexpreynolds/subset
cplusplus-14 genomics sample sampling subset text-processing
Last synced: about 1 year ago
JSON representation
Draw a subset of lines from a text file
- Host: GitHub
- URL: https://github.com/alexpreynolds/subset
- Owner: alexpreynolds
- License: gpl-3.0
- Created: 2017-06-09T18:21:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-09T20:11:55.000Z (about 9 years ago)
- Last Synced: 2025-02-17T16:38:49.280Z (over 1 year ago)
- Topics: cplusplus-14, genomics, sample, sampling, subset, text-processing
- Language: C++
- Size: 26.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# subset
Draw a subset of lines from an input text file, using either a start index and length or by specifying a file of 0-indexed line numbers.
When specifying a file containing line numbers, the indices are first sorted to allow fast filtering of the input file in one pass.
Output can be written to the standard output stream (`stdout`) or to a regular file via `--output=`
For debugging, you can use the `--prefix-with-indices` option to write lines with their associated line number.
See the `test/makefile` tests for a quick demonstration of options and usage.