Random DNA Regions
Replace or preserve specific regions of a DNA sequence with random bases

Raw DNA sequence or one or more FASTA sequences. Non-DNA characters are removed automatically. Input limit: 500,000,000 characters.

Use ".." or "-" for ranges (e.g. 10..20 or 10-20). Separate entries with commas. Positions are 1-based.

💡 Quick Summary

Random DNA Regions selects specific positions or ranges within a DNA sequence and either replaces those regions with random bases (leaving the rest intact) or preserves those regions and randomises everything else. Random sequences generated this way can serve as controls for evaluating the significance of sequence analysis results.

📋 How to Use
  1. Paste a raw DNA sequence or one or more FASTA sequences into the textarea. Input limit: 500,000,000 characters.
  2. Enter the base positions or ranges of interest. Use .. or - to specify a range and a comma to separate entries — for example: 1, 5, 10..20, 50-60. Positions are 1-based.
  3. Choose the mode: Replace ranges with random bases fills the specified positions with random DNA and leaves the rest of the sequence unchanged. Preserve ranges keeps the specified positions intact and randomises everything else.
  4. Click Run. Each input sequence is processed independently and output as a FASTA record. Use Copy to copy the plain-text result.
📊 Result Interpretation
Replace ranges mode

Only the bases at the specified positions are changed to random G, A, C, or T. The sequence length does not change.

Preserve ranges mode

Every base that is not covered by a range is replaced with a random base. The specified positions are output unchanged.

Overlapping ranges

Overlapping or duplicate ranges are handled correctly — each base position is considered once.

Out-of-bounds ranges

Range endpoints are automatically clamped to the actual sequence length. Positions beyond the end of the sequence are silently ignored.

🔬 Applications
  • Generating negative-control sequences that preserve specific motifs (e.g. a binding site) while randomising the background
  • Destroying specific features (restriction sites, promoters, codons) within a sequence for in silico experiments
  • Producing synthetic sequences that retain fixed structural elements while randomising variable regions
  • Testing pattern-search or alignment tools against partially-randomised inputs
⚠️ Common Mistakes & Warnings
Non-DNA characters are stripped before processing

Digits, spaces, and any non-IUPAC characters are removed from the input before ranges are applied. The position numbers you enter refer to the cleaned sequence.

Randomisation uses the standard four bases only

Random positions are always replaced with one of G, A, C, or T (each with equal probability). The original base at that position is never guaranteed to be preserved.

Ranges are 1-based

Position 1 refers to the first base of the cleaned sequence. If your ranges were derived from a tool that uses 0-based coordinates, add 1 to each boundary.

❓ Frequently Asked Questions

What is the difference between "Replace" and "Preserve" mode?
In Replace mode the ranges are the target — those positions become random and the rest stays. In Preserve mode the ranges are protected — those positions stay exactly as they were and everything outside is randomised.
Can I use both ".." and "-" as range separators in the same input?
Yes — 1..10, 20-30 is valid. Both separators are recognised and may be mixed freely.
Does the output sequence have the same length as the input?
Yes. Only bases are changed; no bases are inserted or deleted. The output sequence has the same length as the cleaned input sequence.
Can I process multiple FASTA sequences at once?
Yes — paste multiple FASTA records and each is processed independently with the same ranges and mode. The output preserves the original FASTA headers.