Description
Take a random sample of records from BED/GFF/VCF/BAM files using reservoir sampling algorithm.
bedtools sample uses the reservoir sampling algorithm to randomly select a specified number
of records from genomic interval files. This is particularly useful for creating representative
subsets of large datasets for testing, quality control, or downstream analysis.
This tool is commonly used for:
Creating representative subsets of large genomic datasets
Quality control and validation with smaller sample sizes
Testing pipelines with manageable data volumes
Generating training datasets for machine learning applications
Reducing file sizes while maintaining statistical properties
Type
bash_script
License
MIT
Keywords
Contributors
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.bed"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.4.0 \
-main-script target/nextflow/bedtools/bedtools_sample/main.nf \
-params-file params.yaml Name | Type & Properties |
|---|---|
--input -i | file required |
Name | Type & Properties |
|---|---|
--output | file required output |
Name | Type & Properties |
|---|---|
--number -n | integer |
--seed | integer |
Name | Type & Properties |
|---|---|
--strand_requirement -s | string |
Name | Type & Properties |
|---|---|
--output_bed -bed | boolean_true |
--uncompressed_bam -ubam | boolean_true |
--include_header -header | boolean_true |
Name | Type & Properties |
|---|---|
--no_buffer -nobuf | boolean_true |
--input_buffer -iobuf | string |