Skip to content

SB Split to x records

paulgzlz edited this page Jan 19, 2018 · 1 revision

--split_to_x_records, -sxr

Description

Split records in a single input file into separate output files. The number of records in each output file is set by the user. Output files are named similar to the input file, followed by a number (if the input file is example.fa, output files are named example_0.fa, example_1.fa etc.). If the number of sequences in the input file is not divisible by the record number set by the user, the last file will contain less records.

Arguments

record_number ( int )

The number of records to write in each output file.

Examples

Input file: C-terms.fa

>Dme-Panxδ1
YKLLGSLKSYLKWQIQTDNAVFRLHNSFTTVLLLTCSLIITATQYVGQPI
>Dme-Panxδ11
MDVFGSVKGLLKIDQVDNNVFRMHYKATVIILIAFSLLVTSRQYIGDPID
>Dme-Panxδ3
GFIKIDNMVFRCHYRITAILFTCCIIVTANNLIGDPISCIIPMHVINTFC
>Dme-Panxδ4 Description line
MAAVKPLSKYLQFKVHIYDAIFTLHSKVTVALLLACTFLLSSKQYFGDPI
>Mle-Panxα1
MYWIFEICQEIKRAQSCRKFAIDGPFDWTNRIIMPTLMVICCFLQTFTFM
>Mle-Panxα5
MIYWVWAVFKRMAPFKVVTLDDRWDQMNRSFMMPLTMSFAYLIDYGIIAG
>Mle-Panxα6
MLLEILANFKGATPFKEIVLDDKWDQINRCYMFLLCVIFGTVVTFRQYTG
>Mle-Panxα9
MLDILSKFKGVTPFKGITIDDGWDQLNRSFMFVLLVVMGTTVTVRQYTGS

Usage example

$: sb C-terms.fa -sxr 2

Output

New file: /path/to/cwd/C-terms_0.fa
New file: /path/to/cwd/C-terms_1.fa
New file: /path/to/cwd/C-terms_2.fa
New file: /path/to/cwd/C-terms_3.fa

Main Toolkit Pages





Further Reading

Clone this wiki locally