pub struct Simulate {Show 25 fields
pub reference: ReferenceOptions,
pub vcf: VcfOptions,
pub bed: BedOptions,
pub output: OutputPrefixOptions,
pub seed: SeedOptions,
pub coverage: f64,
pub read_length: usize,
pub fragment_mean: usize,
pub fragment_stddev: usize,
pub min_fragment_length: usize,
pub single_end: bool,
pub adapter_r1: String,
pub adapter_r2: String,
pub min_error_rate: f64,
pub max_error_rate: f64,
pub max_n_frac: f64,
pub methylation_mode: Option<MethylationMode>,
pub methylation_conversion_rate: Option<f64>,
pub methylation_failure_rate: Option<f64>,
pub cpg_truth_bedgraph: Option<PathBuf>,
pub golden_bam: bool,
pub golden_vcf: bool,
pub simple_names: bool,
pub compression: u8,
pub threads: usize,
}Expand description
Simulate sequencing reads from a reference genome.
Generates paired-end or single-end FASTQ files with optional ground-truth BAM and VCF outputs for benchmarking alignment and variant calling pipelines. Variants are applied from an input VCF to construct haplotype sequences, and reads are sampled with a position-dependent Illumina error model.
Fields§
§reference: ReferenceOptions§vcf: VcfOptions§bed: BedOptions§output: OutputPrefixOptions§seed: SeedOptions§coverage: f64Mean sequencing coverage depth.
read_length: usizeLength of each read in bases.
fragment_mean: usizeMean insert size (outer distance between read pair ends).
fragment_stddev: usizeStandard deviation of the insert size distribution.
min_fragment_length: usizeMinimum fragment length in bases; sampled lengths below this are clamped up. Fragments shorter than the read length are padded with adapter sequence. Must be at least 1.
single_end: boolGenerate single-end reads instead of paired-end.
adapter_r1: StringAdapter sequence appended to read 1 when the fragment is shorter than the read length.
adapter_r2: StringAdapter sequence appended to read 2 when the fragment is shorter than the read length.
min_error_rate: f64Minimum per-base error rate, applied at the start of reads.
max_error_rate: f64Maximum per-base error rate, applied at the end of reads.
max_n_frac: f64Maximum fraction of a read’s bases that may come from ambiguous
reference positions (IUPAC codes or N). Reference bases resolved
from ambiguity codes are flagged at load time and counted per read;
read pairs whose R1 or R2 exceeds this fraction are rejected and
resampled. Setting this to 1.0 disables the filter; setting it to
0.0 requires every base to come from an unambiguous reference
position. Value must be in [0.0, 1.0].
methylation_mode: Option<MethylationMode>Enable methylation chemistry simulation. em-seq (or bisulfite)
converts unmethylated cytosines to thymine and preserves methylated
ones (matches both bisulfite and em-seq protocols). taps is the
inverse: methylated cytosines convert to thymine while unmethylated
ones are preserved. When omitted, no methylation chemistry is
applied. Requires a methylation-annotated VCF (MT/MB FORMAT fields)
produced by holodeck methylate.
methylation_conversion_rate: Option<f64>Probability that the converting class of cytosines (unmethylated
for em-seq/bisulfite, methylated for TAPS) is converted to thymine
in a molecule that converted normally. 1.0 is perfect chemistry;
real protocols typically achieve 0.99–0.999. Only takes effect
when --methylation-mode is set; passing this flag without a mode is
rejected. Defaults to 0.999 when --methylation-mode is set
without this flag.
methylation_failure_rate: Option<f64>Fraction of molecules that are whole-molecule conversion failures.
Real bisulfite/EM-seq conversion is bimodal: most molecules convert
near-completely, a small fraction (fragments that fail to denature or
re-anneal too fast) escape conversion as a coherent unit. A failed
molecule converts its should-convert cytosines at
1 - methylation-conversion-rate (near-zero), so it retains almost
all of them as C across both mates. The golden BAM stamps each
record with cf:i:{0|1} recording which camp the molecule was in.
Only takes effect when --methylation-mode is set; passing this flag
without a mode is rejected. Defaults to 0.01 (1%) when
--methylation-mode is set without this flag; pass 0.0 to disable.
cpg_truth_bedgraph: Option<PathBuf>Write a per-CpG ground-truth methylation tally in MethylDackel’s
extract CpG bedGraph format. Columns: chrom start end rate (0–100) n_methylated n_unmethylated. For every reference CpG
covered by at least one simulated read, counts how many reads called
the site as methylated vs unmethylated according to the simulator’s
per-haplotype, per-strand methylation bitmap (NOT the post-conversion
sequenced base). Lets downstream evaluators measure aligner-derived
methylation calls against ground truth using the same code paths
that consume MethylDackel output. Requires --methylation-mode.
golden_bam: boolWrite a ground-truth BAM file with correct alignments.
golden_vcf: boolWrite a ground-truth VCF annotated with simulated coverage.
simple_names: boolUse simple read names (holodeck::N) instead of encoding truth
coordinates in the read name.
compression: u8BGZF compression level (0-12). Lower values are faster with larger output files; higher values produce smaller files at the cost of speed. Level 0 is no compression; 1 is fastest; 12 is maximum compression.
threads: usizeNumber of threads for parallel BGZF output compression.
Trait Implementations§
Source§impl Args for Simulate
impl Args for Simulate
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Simulate
impl CommandFactory for Simulate
Source§impl FromArgMatches for Simulate
impl FromArgMatches for Simulate
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Simulate
impl Parser for Simulate
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Simulate
impl RefUnwindSafe for Simulate
impl Send for Simulate
impl Sync for Simulate
impl Unpin for Simulate
impl UnsafeUnpin for Simulate
impl UnwindSafe for Simulate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.