ANFO-TOOL(1)
π NAME π
okay bestie, the manual name is anfo-tool and it's all about processing native ANFO binary files π¦
πΈ SYNOPSIS πΈ
anfo-tool [ option | pattern ... ]
π§ DESCRIPTION π§
okay so, anfo-tool is the one that filters, processes and converts the files that anfo makes π
. Every pattern you hand it gets wildcard expanded β¨. Then, for every input file (or stdin if you don't give a pattern), it builds a chain of input filters π, merges those input streams in one of several ways π₯, and splits the result into multiple output streams. Each output stream can have its own chain of output filters π. Main character energy, literally.
β¨ OPTIONS β¨
π General Options
These options are global, so they change how the whole program behaves π. They can go anywhere on the command line π«Ά.
-V,--versionβ prints the version number and exits π-q,--quietβ shhh π€«, suppresses all output except fatal error messages-v,--verboseβ gives you more output, including progress indicators for most operations π--debugβ debugging output on top of the progress info π-n,--dry-runβ parses the command line, can optionally print what it intends to do, then exits π--vmem Xβ limits virtual memory to X megabytes. If memory runs out, anfo-tool tries to free some up by forgetting about big files, e.g. genomes π. Use this to avoid swapping or out-of-memory situations when you're dealing with big or multiple genomes π
π Setting Parameters
A parameter can be set multiple times on the command line, and each new one overwrites the last π. Any filter option that needs a parameter picks up the last definition that showed up before it.
--set-slope Sβ sets the slope to S. Slope works together with intercept where filters check alignment scores. Alignments scoring no worse thanslope * (length - intercept)count as good π¦. Default is 7.5.--set-intercept Lβ sets the intercept to L. Same deal as slope, since they team up for scoring. Default is 20.--set-context Cβ sets the context to C, which is the number of surrounding bases of the reference included when alignments get printed in text form. Default is 0.--set-genome Gβ sets the genome to G. When it's set, lots of filters only look at the best alignments to that specific genome π§¬. If no genome is set, the globally best alignment gets used π.--clear-genomeβ clears the genome parameter π§Ή. Filters apply to the globally best alignment afterwards.
π₯ Filter Options
Filters can go before merging the inputs or after splitting the back up π.
-s,--sort-pos=nβ sorts by alignment position while buffering no more than n MiB in memory. If a genome is set, alignments to that genome are used.-S,--sort-name=nβ sorts by read name while buffering no more than n MiB in memory.-l,--filter-length=Lβ keeps alignments only for reads that are at least L bases long π. The reads themselves stick around too.-f,--filter-scoreβ keeps alignments only if their score is good enough. Uses slope and intercept.--filter-mapq=Qβ removes alignments with mapping quality below Q.-h,--filter-hit=SEQβ keeps only reads that have a hit to a sequence named SEQ. If SEQ is empty, reads are kept if they have any hit at all. If the genome parameter is set, only hits to that genome count.--delete-hit=SEQβ deletes alignments to SEQ. If SEQ is empty, all alignments get deleted π. If the genome parameter is set, only alignments to that genome are deleted.--filter-qual=Qβ masks out bases with quality below Q. Each one gets replaced by the N ambiguity code π«₯.--multiplicity=Nβ keeps only reads from molecules that have been sequenced at least N times. Reads count as coming from the same original molecule if their aligned coordinates are identical.--subsample=Fβ subsamples a fraction F of the results π². Every read is independently and randomly chosen to be kept or not.--inside-regions=FILEβ reads a list of regions from FILE, then keeps only alignments that overlap an annotated region.--outside-regions=FILEβ reads a list of regions from FILE, then keeps only alignments that do not overlap an annotated region.
π Special Filters
-d,--rmdup=Qβ removes PCR duplicates and clamps quality scores to Q π§Ό. Two reads count as duplicates if their aligned coordinates are identical. If a genome is set, the best alignment to that genome is used, otherwise the globally best alignment is used. Both alignments have to be good, as determined by slope and intercept. For a set of duplicates, a consensus is called, which generally bumps the quality scores up. If a resulting quality score goes above Q, it's set to Q. This filter requires the input to be sorted by alignment coordinate on the selected genome.--duct-tape=NAMEβ duct-tapes overlapping alignments into contigs and calls a consensus for them π©Ή. If a genome is set, alignments to that genome are used, otherwise the globally best alignments are used. This filter requires input sorted by alignment coordinate on the genome. The output is a set of contigs. Every position gets assigned a consensus base, a quality score, and likelihoods for every possible diallele. (It's called duct-taping because it kinda looks like an assembly, but it's not nearly as solid.)
--edit-header=EDβ invokes the editor ED on the text representation of the stream's header. This is handy for cleaning up headers that have accumulated too much cruft π§Ή.
π Merging Filters
Exactly one merging filter should be given on the command line π§©. All filter options that come before it are part of the input filter chains, and all further filters become output chains. If no merging filter is given, --concat is assumed and all filters are input filters.
-c,--concatβ concatenates all input streams in the order they appear on the command line.-m,--mergeβ merges sorted input streams, producing a sorted result. All inputs must be sorted in the same way.-j,--joinβ joins input streams and retains the single best hits to each genome. Every input stream must contain a record for every read. Reads are buffered in memory until all of their hits are collected, so joining works well if all inputs are nearly in the same order. If reads are missing from some streams, joining them will waste memory π¬.--mega-mergeβ merges many streams, such as those produced by running anfo-sge. Streams that operated on the same reads are joined first, then everything is merged.
π€ Output Options
If an output option is given on the command line, the current output filter chain ends and a new one starts π. If no output option is given, a textual representation of the final stream is written to stdout. All output options accept - to write to stdout.
-o,--output FILEβ writes a native binary stream (a compressed protobuf message) to FILE. Writing a binary stream and reading it back in is lossless π.--output-text FILEβ writes a protobuf text stream to FILE. If the necessary genomes are available, a textual representation of the alignments is included. If the context parameter is set, that many additional bases of the reference upstream and downstream from the alignment are included.--output-sam=FILEβ writes alignments in SAM format to FILE.--output-glz FILEβ writes contigs in GLZ 0.9 format to FILE. Generating GLZ only works after--duct-tape, and every contig becomes a GLZ record.--output-3aln FILEβ writes contigs in a table-based format to FILE. The format is still subject to change, so see the source code for detailed documentation.--output-fasta FILEβ writes alignments(!) in FastA format to FILE. Each alignment is written as a pair of reference and query sequence, and the aligned coordinates are indicated in the description of the query sequence. If the context parameter is set, that many additional bases of the reference upstream and downstream from the alignment are included. This format is not suggested for any serious use. It only exists to support legacy applications π¦.--output-fastq FILEβ writes sequences(!) in FastQ format to FILE. Writing FastQ effectively reconstitutes the input to ANFO if no filtering was done on the results.--output-table FILEβ writes per-alignment statistics to FILE. The file has three columns: sequence length, alignment score, and difference to the next best alignment. It's mainly useful for analyzing and visualizing the distribution of alignment scores π.--stats FILEβ writes simple statistics to FILE π. You get summary stats for a whole stream: number of aligned sequences, average length, and GC content.
π ENVIRONMENT π
ANFO_PATHβ a colon-separated list of directories searched for genome and index files ποΈ.ANFO_TEMPβ temporary space used for sorting large files.
π FILES π
/etc/poptβ the system-wide configuration file forpopt(3). anfo-tool identifies itself as"anfo-tool"to popt.~/.poptβ the per-user configuration file forpopt(3).
π BUGS π
The command line of this tool is way too complicated, and its semantics are counterintuitive. Using anfo-tool is probably best avoided in most cases. The guile bindings should provide a much more scalable and easier-to-understand interface π.
π¦ AUTHOR π¦
Udo Stenzel <udo_stenzel@eva.mpg.de>
π SEE ALSO π
anfo(1), fa2dna(1), popt(3), fasta(5)
bestie, that's the whole tea π«Ά Pulled from the Applications pages, last updated October 2009 πβ¨
π¦ where this page comes from
- ubuntu jammy: anfo 0.98-9 Β· GPL-3.0-or-later
- (C) 2009 Udo Stenzel
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms