Skip to content

SB Split to x files

paulgzlz edited this page Jan 17, 2018 · 3 revisions

--split_to_x_files, -sxf

Description

Split input file into user-defined number of output files. The number of sequences in each output file is equal to the total number of sequences in the input file divided by the (user-defined) number of output files. 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 output files set by the user is greater than the number of records in the input file, the number of output files provided by the user will be overridden by the number of records (in order to avoid the creation of empty output files).

Arguments

file_number ( int )

The number of files to output.

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 -sxf 3

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

Main Toolkit Pages





Further Reading

Clone this wiki locally