{"id":25501958,"url":"https://github.com/opengene/slicer","last_synced_at":"2026-02-15T22:05:30.401Z","repository":{"id":90140219,"uuid":"107348753","full_name":"OpenGene/slicer","owner":"OpenGene","description":"Slice a text file (like FastQ) to smaller files by lines, with gzip supported","archived":false,"fork":false,"pushed_at":"2017-10-18T13:16:31.000Z","size":73,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-02-13T08:51:52.344Z","etag":null,"topics":["file-cutter","file-slicer","file-splitter","slicer","splitter"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenGene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-18T02:27:25.000Z","updated_at":"2023-04-18T08:33:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"fff13645-56bf-4068-99a0-d54cec88c7d8","html_url":"https://github.com/OpenGene/slicer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/OpenGene/slicer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2Fslicer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2Fslicer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2Fslicer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2Fslicer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenGene","download_url":"https://codeload.github.com/OpenGene/slicer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2Fslicer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29490360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-cutter","file-slicer","file-splitter","slicer","splitter"],"created_at":"2025-02-19T04:59:48.499Z","updated_at":"2026-02-15T22:05:30.396Z","avatar_url":"https://github.com/OpenGene.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slicer\nSlice a text file to smaller files by lines, with gzip compression for input/output supported. This tool can be used to slice big `FASTQ` files to smaller ones for parallel processing.\n\n# Usage\n```shell\n# simplest\nslicer -i \u003cinput_file_name\u003e -l \u003chow_many_lines_per_slice\u003e\n\n# specify a folder to store the sliced files\nslicer -i \u003cinput_file_name\u003e -l \u003chow_many_lines_per_slice\u003e -o \u003coutput_dir\u003e\n\n# force gzip\nslicer -i \u003cinput_file_name\u003e -l \u003chow_many_lines_per_slice\u003e -o \u003coutput_dir\u003e --gzip\n```\n\n# Example\nAssuming that you have a text file called `filename.for.test.data` with 400000 lines, you want to cut it to 4 slices (100000 lines for each). You'd like to gzip all the slices, keep the file extension `.data`, and store them in a folder `sliced`. You can use following command:\n```shell\nslicer -i filename.for.test.data -l 100000 -o sliced -e data -z -s\n```\nThen you will get four files in the folder `sliced`:\n```\n├── filename.for.test.data\n└── sliced\n    ├── 0001.data.gz\n    ├── 0002.data.gz\n    ├── 0003.data.gz\n    └── 0004.data.gz\n```\n\n# Get slicer\n## Download\nGet latest\n```shell\n# download by http\nhttps://github.com/OpenGene/slicer/archive/master.zip\n\n# or clone by git\ngit clone https://github.com/OpenGene/slicer.git\n```\nGet the stable releases  \nhttps://github.com/OpenGene/slicer/releases/latest\n\n## Build\nslicer only depends on `libz`, which is always available on Linux or Mac systems. If your system has no `libz`, install it first.\n```shell\ncd slicer\nmake\n```\n\n## Install\nAfter build is done, run\n```\nsudo make install\n```\n\n# Full options\n```\nusage: ./slicer --input=string --line=int [options] ... \noptions:\n  -i, --input          input file name (string)\n  -o, --outdir         the output folder, default is currently working directory (string [=.])\n  -l, --line           how many lines per slice (int)\n  -d, --digits         the digits for the slice number padding (1~10), default is 4, so the filename will be padded as 0001.xxx, 0 to disable padding (int [=4])\n  -z, --gzip           force gzip output, default the gzip setting is following the input\n  -n, --nogzip         don't use gzip output, default the gzip setting is following the input\n  -c, --compression    the gzip compression level (0 ~ 9), 0 for best speed, 9 for best compression ratio, default is 2 (int [=2])\n  -s, --simple_name    use the simple file name like 0001, and discard the original file name\n  -e, --ext            set the file extension to be added to the output if using simple_name. This option only works when --simple_name enabled (string [=])\n  -?, --help           print this message\n```\n\n# Work with FASTQ\n* Make sure you set the line number (-l xxxx, or --line=xxxx) correctly as a multiple of 4, since each record always has 4 lines.\n* If you want to keep the `.fq` or `.fastq` file extension, you can set the extension by `--ext=fq` or `--ext=fastq`\n* If your data are paired-end sequencing files, you can run this tool for the pair of files separately.\n* If your data are paired-end sequencing files, and you enable the `simple_name` to use short file name. For read1, you can set the extension as R1.fq by `--ext=R1.fq`, and for read2 you can set R2.fq by `--ext=R2.fq`, then you will get the sliced files like `0001.R1.fq`, `0002.R2.fq`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengene%2Fslicer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengene%2Fslicer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengene%2Fslicer/lists"}