GRINDER(1)
β¨ GRINDER(1) β grinder π (User Commands)
π NAME π
grinder β Versatile omics shotgun and amplicon sequencing read simulator π¦
π DESCRIPTION π
Okay bestie, this is the whole what even is this moment. grinder is your versatile omics shotgun and amplicon sequencing read simulator β yes, it's giving main character energy for fake reads. πβ¨
π οΈ Usage:
Here's the CLI shape, exactly as it slays:
grinder -rf <reference_file> | -reference_file <reference_file> |
-gf <reference_file> | -genome_file <reference_file> [cli
optional arguments] grinder --help grinder --man grinder --usage
grinder --version
π― Cli required arguments:
-rf <reference_file>,-reference_file <reference_file>,-gf <reference_file>,-genome_file <reference_file>β FASTA file that contains the input reference sequences (full genomes, 16S rRNA genes, transcripts, proteins...) or'-'to read them from the standard input. See theREADMEfile for examples of databases you can use and where to get them from. Default:-.
π Cli optional arguments:
-tr <total_reads>,-total_reads <total_reads>β Number of shotgun or amplicon reads to generate for each library. Do not specify this if you specify the fold coverage. Default:100.-cf <coverage_fold>,-coverage_fold <coverage_fold>β Desired fold coverage of the input reference sequences (the output FASTA length divided by the input FASTA length). Do not specify this if you specify the number of reads directly.-rd <read_dist>...,-read_dist <read_dist>...β Desired shotgun or amplicon read length distribution specified as: average length, distribution ('uniform'or'normal') and standard deviation.
Only the first element is required. Examples:
- All reads exactly
101bp long (Illumina GA 2x):101 - Uniform read distribution around
100+-10bp:100 uniform 10 - Reads normally distributed with an average of
800and a standard deviation of100bp (Sanger reads):800 normal 100 - Reads normally distributed with an average of
450and a standard deviation of50bp (454 GS-FLX Ti):450 normal 50
Reference sequences smaller than the specified read length are not used. Default: 100.
-id <insert_dist>...,-insert_dist <insert_dist>...β Create paired-end or mate-pair reads spanning the given insert length. Important: the insert is defined in the biological sense, i.e. its length includes the length of both reads and of the stretch of DNA between them:0: off, or: insert size distribution in bp, in the same format as the read length distribution (a typical value is2,500bp for mate pairs) Two distinct reads are generated whether or not the mate pair overlaps. Default:0.-mo <mate_orientation>,-mate_orientation <mate_orientation>β When generating paired-end or mate-pair reads (see<insert_dist>), specify the orientation of the reads (F: forward,R: reverse):FR:---> <---e.g. Sanger, Illumina paired-end, IonTorrent mate-pairFF:---> --->e.g. 454RF:<--- --->e.g. Illumina mate-pairRR:<--- <---
Default: FR
-ec <exclude_chars>,-exclude_chars <exclude_chars>β Do not create reads containing any of the specified characters (case insensitive). For example, use'NX'to prevent reads with ambiguities (NorX). Grinder will error if it fails to find a suitable read (or pair of reads) after10attempts. Consider using<delete_chars>, which may be more appropriate for your case. Default:''-dc <delete_chars>,-delete_chars <delete_chars>β Remove the specified characters from the reference sequences (case-insensitive), e.g.'-~*'to remove gaps (-or~) or terminator (*). Removing these characters is done once, when reading the reference sequences, prior to taking reads. Hence it is more efficient than<exclude_chars>. Default: (empty)-fr <forward_reverse>,-forward_reverse <forward_reverse>β Use DNA amplicon sequencing using a forward and reverse PCR primer sequence provided in a FASTA file. The reference sequences and their reverse complement will be searched for PCR primer matches. The primer sequences should use the IUPAC convention for degenerate residues and the reference sequences that that do not match the specified primers are excluded. If your reference sequences are full genomes, it is recommended to use<copy_bias>=1and<length_bias>=0to generate amplicon reads. To sequence from the forward strand, set<unidirectional>to1and put the forward primer first and reverse primer second in the FASTA file. To sequence from the reverse strand, invert the primers in the FASTA file and use<unidirectional>=-1. The second primer sequence in the FASTA file is always optional. Example:AAACTYAAAKGAATTGRCGGandACGGGCGGTGTGTRCfor the926Fand1392Rprimers that target theV6toV9region of the16SrRNA gene.-un <unidirectional>,-unidirectional <unidirectional>β Instead of producing reads bidirectionally, from the reference strand and its reverse complement, proceed unidirectionally, from one strand only (forward or reverse). Values:0(off, i.e. bidirectional),1(forward),-1(reverse). Use<unidirectional>=1for amplicon and strand-specific transcriptomic or proteomic datasets. Default:0.-lb <length_bias>,-length_bias <length_bias>β In shotgun libraries, sample reference sequences proportionally to their length. For example, in simulated microbial datasets, this means that at the same relative abundance, larger genomes contribute more reads than smaller genomes (and all genomes have the same fold coverage).0= no,1= yes. Default:1.-cb <copy_bias>,-copy_bias <copy_bias>β In amplicon libraries where full genomes are used as input, sample species proportionally to the number of copies of the target gene: at equal relative abundance, genomes that have multiple copies of the target gene contribute more amplicon reads than genomes that have a single copy.0= no,1= yes. Default:1.-md <mutation_dist>...,-mutation_dist <mutation_dist>...β Introduce sequencing errors in the reads, under the form of mutations (substitutions, insertions and deletions) at positions that follow a specified distribution (with replacement): model (uniform,linear,poly4), model parameters. For example, for a uniform0.1%error rate, use:uniform 0.1. To simulate Sanger errors, use a linear model where the errror rate is1%at the5'end of reads and2%at the3'end:linear 1 2. To model Illumina errors using the 4th degree polynome3e-3 + 3.3e-8 * i^4(Korbel et al 2009), use:poly4 3e-3 3.3e-8. Use the<mutation_ratio>option to alter how many of these mutations are substitutions or indels. Default:uniform 0 0.-mr <mutation_ratio>...,-mutation_ratio <mutation_ratio>...β Indicate the percentage of substitutions and the number of indels (insertions and deletions). For example, use'80 20'(4substitutions for each indel) for Sanger reads. Note that this parameter has no effect unless you specify the<mutation_dist>option. Default:80 20.-hd <homopolymer_dist>,-homopolymer_dist <homopolymer_dist>β Introduce sequencing errors in the reads under the form of homopolymeric stretches (e.g.AAA,CCCCC) using a specified model where the homopolymer length follows a normal distributionN(mean, standard deviation)that is function of the homopolymer lengthn:Margulies:N(n, 0.15 * n), Margulies et al. 2005.Richter:N(n, 0.15 * sqrt(n)), Richter et al. 2008.Balzer:N(n, 0.03494 + n * 0.06856), Balzer et al. 2010.
Default: 0
-cp <chimera_perc>,-chimera_perc <chimera_perc>β Specify the percent of reads in amplicon libraries that should be chimeric sequences. The'reference'field in the description of chimeric reads will contain the ID of all the reference sequences forming the chimeric template. A typical value is10%for amplicons. This option can be used to generate chimeric shotgun reads as well. Default:0 %-cd <chimera_dist>...,-chimera_dist <chimera_dist>...β Specify the distribution of chimeras: bimeras, trimeras, quadrameras and multimeras of higher order. The default is the average values from Quince et al. 2011:'314 38 1', which corresponds to89%of bimeras,11%of trimeras and0.3%of quadrameras. Note that this option only takes effect when you request the generation of chimeras with the<chimera_perc>option. Default:314 38 1-ck <chimera_kmer>,-chimera_kmer <chimera_kmer>β Activate a method to form chimeras by picking breakpoints at places where k-mers are shared between sequences.<chimera_kmer>representsk, the length of the k-mers (in bp). The longer the kmer, the more similar the sequences have to be to be eligible to form chimeras. The more frequent a k-mer is in the pool of reference sequences (taking into account their relative abundance), the more often this k-mer will be chosen. For example, CHSIM (Edgar et al. 2011) uses this method with a k-mer length of10bp. If you do not want to use k-mer information to form chimeras, use0, which will result in the reference sequences and breakpoints to be taken randomly on the"aligned"reference sequences. Note that this option only takes effect when you request the generation of chimeras with the<chimera_perc>option. Also, this option is quite memory intensive, so you should probably limit yourself to a relatively small number of reference sequences if you want to use it. Default:10 bp-af <abundance_file>,-abundance_file <abundance_file>β Specify the relative abundance of the reference sequences manually in an input file. Each line of the file should contain a sequence name and its relative abundance (%), e.g.'seqABC 82.1'or'seqABC 82.1 10.2'if you are specifying two different libraries.-am <abundance_model>...,-abundance_model <abundance_model>...β to be continued in part 2, bestie β¨
okay so bestie, picking up right where we left off: the relative abundance model for your input reference sequences can be uniform, linear, powerlaw, logarithmic or exponential. The uniform and linear ones? No parameter needed, they're lowkey chill. But the others? They take a parameter in the range [0, infinity). And if you don't specify it? It gets randomly chosen. It's giving mystery. β¨ Examples:
uniformdistribution:uniformpowerlawdistribution with parameter0.1:powerlaw 0.1exponentialdistribution with automatically chosen parameter:exponential
Default: uniform 1
Now the rest of the options, bestie! π
-nl <num_libraries>,-num_libraries <num_libraries>β Number of independent libraries to create. You can control how diverse and similar they are with<diversity>,<shared_perc>and<permuted_perc>. Give them different MID tags with<multiplex_mids>. Default:1π-mi <multiplex_ids>,-multiplex_ids <multiplex_ids>β Give an optional FASTA file that has multiplex sequence identifiers (a.k.a MIDs or barcodes) to add to the sequences (one sequence per library, in the order given). The MIDs are included in the length you set with the-read_distoption and can be altered by sequencing errors. Wanna generate MID sequences? Check out the MIDesigner or BarCrawl programs. π§¬-di <diversity>...,-diversity <diversity>...β This one sets alpha diversity, specifically the richness β i.e. the number of reference sequences to take randomly and include in each library. Use0for the maximum richness possible (based on how many reference sequences you have). Give one value to make all libraries have the same diversity, or one richness value per library otherwise. Default:0π-sp <shared_perc>,-shared_perc <shared_perc>β This controls an aspect of beta-diversity. When you're creating multiple libraries, specify the percent of reference sequences they should have in common (relative to the diversity of the least diverse library). Default:0 %π¦-pp <permuted_perc>,-permuted_perc <permuted_perc>β Another beta-diversity knob. For multiple libraries, choose the percent of the most-abundant reference sequences to permute (aka randomly shuffle) the rank-abundance of. Default:100 %π-rs <random_seed>,-random_seed <random_seed>β Seed number to use for the pseudo-random number generator. You know, for when you want your results to be reproducible, bestie. π²-dt <desc_track>,-desc_track <desc_track>β Track read information (reference sequence, position, errors, ...) by writing it in the read description. Default:1π-ql <qual_levels>...,-qual_levels <qual_levels>...β Generate basic quality scores for the simulated reads. Good residues get a specified good score (e.g.30) and residues that are the result of an insertion or substitution get a specified bad score (e.g.10). On the command line, specify the good score first and then the bad score, e.g.:30 10. Default: πΆ-fq <fastq_output>,-fastq_output <fastq_output>β Whether to write the generated reads in FASTQ format (with Sanger-encoded quality scores) instead of FASTA and QUAL or not (1: yes,0: no). You need to specify<qual_levels>for this option to be effective. Default:0π§¬-bn <base_name>,-base_name <base_name>β Prefix of the output files. Default:grinderπ-od <output_dir>,-output_dir <output_dir>β Directory where the results should be written. This folder will be created if needed. Default:.π-pf <profile_file>,-profile_file <profile_file>β A file that contains Grinder arguments. This is useful if you use many options or often use the same options. Lines with comments (#) are ignored. Consider the profile file,simple_profile.txt:
# A simple Grinder profile -read_dist 105 normal 12 -total_reads 1000
Running: grinder -reference_file viral_genomes.fa -profile_file simple_profile.txt
Translates into: grinder -reference_file viral_genomes.fa -read_dist 105 normal 12 -total_reads 1000
β οΈ Note: the arguments specified in the profile should not be specified again on the command line. π«
π SEE ALSO π
That's all, bestie! This was grinder 0.5.4 from December 2020. Stay slay! πβ¨
π¦ where this page comes from
- debian bookworm: grinder 0.5.4-6 Β· GPL-3.0-or-later
- debian trixie: grinder 0.5.4-6 Β· GPL-3.0-or-later
- ubuntu jammy: grinder 0.5.4-6 Β· GPL-3.0-or-later
- ubuntu noble: grinder 0.5.4-6 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms