fasta
Strategies for generating FASTA formatted sequences.
fasta_entry()
@composite
def fasta_entry(draw, comment_source: SearchStrategy = None, sequence_source: SearchStrategy = None, wrap_length: Optional[int] = None, allow_windows_line_endings=True) -> str
Generates individual FASTA entries.
Warning
Unless you specifically want to generate single FASTA-formatted entries, use fasta
instead when testing code that expects FASTA strings.
Arguments
comment_source
: The source of the comments. Defaults totext(alphabet=characters(min_codepoint=32, max_codepoint=126))
)sequence_source
: The source of the sequence. Defaults todna
.wrap_length
: The width to wrap the sequence on. IfNone
, mixed sizes are used.allow_windows_line_endings
: Whether to allow\\r\\n
in the linebreaks.
fasta()
@composite
def fasta(draw, entry_source: Optional[SearchStrategy] = None, min_reads: int = 1, max_reads: int = 100) -> str
Generates string representations of FASTA files.
Arguments
entry_source
: The search strategy to use for generating FASTA entries. The default (None
) will usefasta_entry
with default settings.min_reads
: Minimum number of FASTA entries to generate.max_reads
: Maximum number of FASTA entries to generate.