MASON_FRAG_SEQUENCING(1)
π MASON_FRAG_SEQUENCING π
ok bestie, so mason_frag_sequencing is a manual page from section 1, and it's giving fragment sequencing simulation realness. let's get into it π«Ά
β¨ NAME β¨
mason_frag_sequencing β Fragment Sequencing Simulation
like literally, that's the whole name. short. iconic. no notes. π
πΈ SYNOPSIS πΈ
mason_frag_sequencing [OPTIONS] -i IN.fa -o OUT.{fa,fq} [-or OUT2.{fa,fq}]
so you feed it an input with -i (IN.fa), you get yourself an output with -o (OUT.{fa,fq}), and if you're feeling extra you can also drop a second output file with -or (OUT2.{fa,fq}). the {fa,fq} is doing the most β it means FASTA or FASTQ, whichever you vibe with. and yeah, [OPTIONS] is up there front and center bc there's a whole menu of them. iykyk. β¨
π¦ DESCRIPTION π¦
okay so here's the tea: you hand it a FASTA file that's full of fragments, and it simulates the sequencing of those fragments. that's the whole gig. fragment in, reads out, slay. π«
now let's talk about what it is vs what it isn't, bc this matters:
- it's a more lightweight version of
mason_sequencingβ the cute minimalist sibling basically π - it does not support the application of VCF π (no variant calling chaos here, sorry)
- it does not support fragment sampling π
- output of SAM is also not available π like, that format is simply not invited to this party
BUT β and this is the part where it eats β it uses the same code for the simulation of the reads as the more powerful mason_simulator. so even though it's the smaller one, the actual read-simulating engine is highkey the same. no cap. π₯
so when should you reach for this one instead of the big kids? the manpage says: use mason_frag_sequencing if you want to implement your own fragmentation behaviour β like, for example, if you've already implemented your own bias models. that's your moment. main character energy, honestly. π§
fr fr, if you want VCF support, fragment sampling, or SAM output, this is not the tool for you β this one is deliberately the lightweight one. π
β¨ OPTIONS β¨
okay bestie, here's the whole command-line menu π every flag, every default, no skips, no cap.
-h,--helpβ pops up the help message. your emotional support flag π«Ά--versionβ tells you what version you're running.-q,--quietβ low verbosity. she's shy.-v,--verboseβ higher verbosity. she's talking more.-vv,--very-verboseβ highest verbosity. she is telling you EVERYTHING π--seed UINT64β the seed for the random number generator. Default:0.-i,--in INPUT_FILEβ path to your input file. valid filetypes are:.sam[.*],.raw[.*],.gbk[.*],.frn[.*],.fq[.*],.fna[.*],.ffn[.*],.fastq[.*],.fasta[.*],.fas[.*],.faa[.*],.fa[.*],.embl[.*], and.bam, where*is any of the following extensions:gz,bz2, andbgzffor transparent (de)compression. so yes, the[.*]thing is just built-in (de)compression glow-up β¨-o,--out OUTPUT_FILEβ output for single-end reads / left end reads. valid filetypes are:.sam[.*],.raw[.*],.frn[.*],.fq[.*],.fna[.*],.ffn[.*],.fastq[.*],.fasta[.*],.fas[.*],.faa[.*],.fa[.*], and.bam, where*is any of the following extensions:gz,bz2, andbgzffor transparent (de)compression.-or,--out-right OUTPUT_FILEβ output for the right reads. giving this option is what turns on paired-end simulation π valid filetypes are:.sam[.*],.raw[.*],.frn[.*],.fq[.*],.fna[.*],.ffn[.*],.fastq[.*],.fasta[.*],.fas[.*],.faa[.*],.fa[.*], and.bam, where*is any of the following extensions:gz,bz2, andbgzffor transparent (de)compression.--force-single-endβ forces single-end simulation even though you literally handed her--out-right. she said no paired-end today π
π Global Read Simulation Options
--seq-technology STRINGβ which sequencing technology to simulate. one ofillumina,454, andsanger. Default:illumina.--seq-mate-orientation STRINGβ orientation for paired reads. go read the Read Orientation section below, bestie. one ofFR,RF,FF, andFF2. Default:FR.--seq-strands STRINGβ which strands to simulate from, only applies to paired sequencing simulation. one offorward,reverse, andboth. Default:both.--embed-read-infoβ whether or not to embed read information.--read-name-prefix STRINGβ your read names get this prefix. Default:simulated..
π BS-Seq Options
--enable-bs-seqβ enables BS-seq simulation.--bs-seq-protocol STRINGβ the protocol to use for BS-Seq simulation. one ofdirectionalandundirectional. Default:directional.--bs-seq-conversion-rate DOUBLEβ conversion rate for unmethylated Cs to turn into Ts. In range[0..1]. Default:0.99.
π§ Illumina Options
--illumina-read-length INTEGERβ read length for Illumina simulation. In range[1..inf]. Default:100.--illumina-error-profile-file INPUT_FILEβ path to the file with the Illumina error profile. it has to be a text file with floating point numbers separated by space, each one giving a positional error rate. valid filetype is:.txt.--illumina-prob-insert DOUBLEβ per-base probability of insertion in Illumina sequencing. In range[0..1]. Default:0.00005.--illumina-prob-deletion DOUBLEβ per-base probability of deletion in Illumina sequencing. In range[0..1]. Default:0.00005.--illumina-prob-mismatch-scale DOUBLEβ scaling factor for Illumina mismatch probability. In range[0..inf]. Default:1.0.--illumina-prob-mismatch DOUBLEβ average per-base mismatch probability in Illumina sequencing. In range[0.0..1.0]. Default:0.004.--illumina-prob-mismatch-begin DOUBLEβ per-base mismatch probability of the first base in Illumina sequencing. In range[0.0..1.0]. Default:0.002.--illumina-prob-mismatch-end DOUBLEβ per-base mismatch probability of the last base in Illumina sequencing. In range[0.0..1.0]. Default:0.012.--illumina-position-raise DOUBLEβ the point where the error curve raises, relative to read length. In range[0.0..1.0]. Default:0.66.--illumina-quality-mean-begin DOUBLEβ mean PHRED quality for non-mismatch bases of the first base in Illumina sequencing. Default:40.0.--illumina-quality-mean-end DOUBLEβ mean PHRED quality for non-mismatch bases of the last base in Illumina sequencing. Default:39.5.--illumina-quality-stddev-begin DOUBLEβ standard deviation of PHRED quality for non-mismatch bases of the first base in Illumina sequencing. Default:0.05.--illumina-quality-stddev-end DOUBLEβ standard deviation of PHRED quality for non-mismatch bases of the last base in Illumina sequencing. Default:10.0.--illumina-mismatch-quality-mean-begin DOUBLEβ mean PHRED quality for mismatch bases of the first base in Illumina sequencing. Default:40.0.--illumina-mismatch-quality-mean-end DOUBLEβ mean PHRED quality for mismatch bases of the last base in Illumina sequencing. Default:30.0.--illumina-mismatch-quality-stddev-begin DOUBLEβ standard deviation of PHRED quality for mismatch bases of the first base in Illumina sequencing. Default:3.0.--illumina-mismatch-quality-stddev-end DOUBLEβ standard deviation of PHRED quality for mismatch bases of the last base in Illumina sequencing. Default:15.0.--illumina-left-template-fastq INPUT_FILEβ a FASTQ file to use as a template for the left-end reads. valid filetypes are:.sam[.*],.raw[.*],.gbk[.*],.frn[.*],.fq[.*],.fna[.*],.ffn[.*],.fastq[.*],.fasta[.*],.fas[.*],.faa[.*],.fa[.*],.embl[.*], and.bam, where*is any of the following extensions:gz,bz2, andbgzffor transparent (de)compression.--illumina-right-template-fastq INPUT_FILEβ a FASTQ file to use as a template for the right-end reads. valid filetypes are:.sam[.*],.raw[.*],.gbk[.*],.frn[.*],.fq[.*],.fna[.*],.ffn[.*],.fastq[.*],.fasta[.*],.fas[.*],.faa[.*],.fa[.*],.embl[.*], and.bam, where*is any of the following extensions:gz,bz2, andbgzffor transparent (de)compression.
π¦ Sanger Sequencing Options
--sanger-read-length-model STRINGβ the model used to sample the Sanger read length. one ofnormalanduniform. Default:normal.--sanger-read-length-min INTEGERβ the minimal read length when the read length is sampleduniformly. In range[0..inf]. Default:400.--sanger-read-length-max INTEGERβ the maximal read length when the read length is sampleduniformly. In range[0..inf]. Default:600.--sanger-read-length-mean DOUBLEβ the mean read length when the read length is sampled with a normal distribution. In range[0..inf]. Default:400.--sanger-read-length-error DOUBLEβ the read length standard deviation when the read length is sampleduniformly. In range[0..inf]. Default:40.--sanger-prob-mismatch-scale DOUBLEβ scaling factor for Sanger mismatch probability. In range[0..inf]. Default:1.0.--sanger-prob-mismatch-begin DOUBLEβ per-base mismatch probability of the first base in Sanger sequencing. In range[0.0..1.0]. Default:0.005.--sanger-prob-mismatch-end DOUBLEβ per-base mismatch probability of the last base in Sanger sequencing. In range[0.0..1.0]. Default:0.001.--sanger-prob-insertion-begin DOUBLEβ per-base insertion probability of the first base in Sanger sequencing. In range[0.0..1.0]. Default:0.0025.--sanger-prob-insertion-end DOUBLEβ per-base insertion probability of the last base in Sanger sequencing. In range[0.0..1.0]. Default:0.005.--sanger-prob-deletion-begin DOUBLEβ per-base deletion probability of the first base in Sanger sequencing. In range[0.0..1.0]. Default:0.0025.--sanger-prob-deletion-end DOUBLEβ per-base deletion probability of the last base in Sanger sequencing. In range[0.0..1.0]. Default:0.005.--sanger-quality-match-start-mean DOUBLEβ mean PHRED quality for non-mismatch bases of the first base in Sanger sequencing. Default:40.0.--sanger-quality-match-end-mean DOUBLEβ mean PHRED quality for non-mismatch bases of the last base in Sanger sequencing. Default:39.5.--sanger-quality-match-start-stddev DOUBLEβ mean PHRED quality for non-mismatch bases of the first base in Sanger sequencing. Default:0.1.--sanger-quality-match-end-stddev DOUBLEβ mean PHRED quality for non-mismatch bases of the last base in Sanger sequencing. Default:2.--sanger-quality-error-start-mean DOUBLEβ mean PHRED quality for erroneous bases of the first base in Sanger sequencing. Default:30.--sanger-quality-error-end-mean DOUBLEβ mean PHRED quality for erroneous bases of the last base in Sanger sequencing. Default:20.--sanger-quality-error-start-stddev DOUBLEβ mean PHRED quality for erroneous bases of the first base in Sanger sequencing. Default:2.--sanger-quality-error-end-stddev DOUBLEβ mean PHRED quality for erroneous bases of the last base in Sanger sequencing. Default:5.
π 454 Sequencing Options
--454-read-length-model STRINGβ the model used to sample the 454 read length. one ofnormalanduniform. Default:normal.--454-read-length-min INTEGERβ the minimal read length when the read length is sampleduniformly. In range[0..inf]. Default:10.--454-read-length-max INTEGERβ the maximal read length when the read length is sampleduniformly. In range[0..inf]. Default:600.--454-read-length-mean DOUBLEβ the mean read length when the read length is sampled with a normal distribution. In range[0..inf]. Default:400.--454-read-length-stddev DOUBLEβ the read length standard deviation when the read length is sampled with a normal distribution. In range[0..inf]. Default:40.--454-no-sqrt-in-std-devβ for the error model: if this is set,(sigma = k * r))is used, otherwise(sigma = k * sqrt(r)).--454-proportionality-factor DOUBLEβ proportionality factor for calculating the standard deviation proportional to the read length. In range[0..inf]. Default:0.15.--454-background-noise-mean DOUBLEβ mean of the lognormal distribution used for the noise. In range[0..inf]. Default:0.23.--454-background-noise-stddev DOUBLEβ standard deviation of the lognormal distribution used for the noise. In range[0..inf]. Default:0.15.
β SEQUENCING SIMULATION β
couple of things you truly need to know before you hit enter, bestie:
- base quality simulation is disabled when you're writing out FASTA files. so if you wanted qualities, FASTA is not the vibe π
- paired-end sequencing simulation gets enabled when you specify two output files. two files in, two reads out, that's the math π
Reads are not all floating around doing their own thing, bestie β paired-end has β¨orientationβ¨ and you get to pick it with --mate-orientation. Here are the valid values, no cap:
FRβ reads are inward-facing, same energy as Illumina paired-end reads:R1 --> <-- R2.The classic. The main character. πRFβ reads are outward-facing, exactly like Illumina mate-pair reads:R1 <-- --> R2.Backwards but make it fashion π¦FFβ reads are on the same strand:R1 --> --> R2.Matching fits, slay πΈFF2β reads are on the same strand BUT the "right" reads get sequenced to the left of the "left" reads, same as 454 paired:R2 --> --> R1.iconic chaotic energy fr fr π
β¨ PARALLELISM β¨
π General
So here's the vibe: the contigs are processed sequentially, one after another, no cutting the line πΆβοΈ
But within each contig? Oh she's fast. The fragments/reads get simulated in parallel by --num-threads many threads, and each of those threads simulates batches of chunks-size many fragments at a time. They just keep going like little worker bees until no more fragments are left to be simulated πβ¨
π CPU-Utilization
Okay so here's the tea, and it's lowkey important π
When the number of fragments to simulate per contig is low, it can happen that NOT all your threads get utilized. Not a bug, just math, bestie. Example time, because I know you love one:
When there are 20,000 fragments to simulate for a contig, 32 threads are available, and each thread simulates batches of 1000 (--chunk-size) fragments β only 20 threads are utilized. The other 12 are just sitting there, hydrated, unbothered, doing nothing π
So yeah: --chunk-size affects CPU-utilization. That's the whole point of mentioning it.
BUT. Very low chunk-sizes also lead to a large overhead, especially when you're using only one thread. The bookkeeping eats your gains, and it's giving diminishing returns π
We set a sensible default, so don't stress β but perfomance gains may be achieved by trying different chunk-sizes. Tinker, queen π
π Randomization
Heads up: both --chunk-size and --num-threads affect randomization. Different values for these parameters yield different results. So if you're chasing reproducibility of a specific run, don't just go changing these and then act surprised, iykyk π
β tl;dr β sequential contigs, parallel fragments,--mate-orientationcontrols which way your pairs point, and--chunk-size+--num-threadsquietly change your results too. Change them on purpose, not by accident π«Ά
That's the whole page, bestie β this was mason_frag_sequencing 2.0.13, from the [tarball], living in the MASON_FRAG_SEQUENCING(1) manual. Now go simulate some fragments, you got this πβ¨π§
π¦ where this page comes from
- ubuntu stonking: seqan-apps 2.5.2-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms