Skip to main content

Crate rsomics_rereplicate

Crate rsomics_rereplicate 

Source
Expand description

Rereplicate: expand ;size=N abundance annotations back into N individual FASTA records. Inverse of vsearch --derep_fulllength.

Behaviour matches vsearch --rereplicate v2.31.0 (BSD-2):

  • Each input record with ;size=N is emitted N times in order.
  • The ;size=N annotation is stripped from the output header (vsearch sets opt_xsize=true unconditionally for this command).
  • With --sizeout, each copy receives ;size=1 appended instead.
  • Records with no ;size= annotation are treated as abundance 1 (emitted once), with a warning logged.
  • No minseqlength or maxseqlength filtering is applied (those options are not in the --rereplicate allowed-option set).
  • Sequence bytes are preserved exactly (case + U kept); the tool does not normalise for this operation.
  • FASTA output wraps at fasta_width columns (default 80).
  • Output order mirrors input order; each record’s copies appear together.

Structs§

FastaRecord
One parsed FASTA record.

Functions§

parse_fasta
Parse FASTA records from a buffered reader.
rereplicate
Core rereplicate logic.
strip_size
Strip the first ;size=N token from a label.
write_record
Write one FASTA record to out, wrapping sequence at width columns. width == 0 means no wrapping.