1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# [ `fxtools sample` ]
## Summary
This command will randomly downsample the number of records in your input `fastx`
by some frequency `f`.
### Expected Input
```text
>AP2S1_a
ACTG
>AP2S1_b
ACTT
>AP2S2_a
CCCT
>AP2S2_b
CCCC
```
### Expected Output
With frequency 0.75.
```text
>AP2S1_a
ACTG
>AP2S2_a
CCCT
>AP2S2_b
CCCC
```
## Usage
```bash
# standard sampling 50% of records
fxtools sample -i <fastx> -f 0.5
# from pipeline subsampling 30% of records
fxtools filter -i <fastx> -p "ACTCGCG" | fxtools sample -f 0.3
```