Sequence cleaner
Strips gaps, spaces, numbers and line breaks. FASTA headers stay. Nothing leaves the browser.
Strips gaps, spaces, numbers and line breaks. FASTA headers stay. Nothing leaves the browser.
Sequences copied from papers, databases and alignment viewers rarely arrive as a clean run of letters. They carry spaces and tabs between blocks, position numbers at the start of lines, gap characters from an alignment, and line breaks every 60 or 70 characters. Most analysis tools either reject those characters or, worse, count them as part of the sequence. Cleaning strips everything that is not a residue so the length, composition and downstream results are right.
GenBank ORIGIN blocks and EMBL SQ blocks list the sequence in groups of ten bases with a position number on every line, for example1 atggtgagca agggcgagga. With Numbers and Spaces selected the digits and gaps between blocks vanish and only the bases remain. Case is preserved unlessUppercase is on, so lowercase soft-masked regions stay marked.
Alignment programs insert - or . to line residues up across sequences. To get a single ungapped sequence back, for example to design primers or re-run a search, those characters must go. The Gaps option removes both symbols. Leave it off when you want to clean spacing but keep the alignment columns intact.
Any line beginning with > is a header and is passed through untouched, so record names, accessions and descriptions survive. Cleaning applies to the sequence lines under each header. With Line breaks on, each record becomes a header line followed by one line of sequence, which some tools require. Blank lines are dropped.
Letters are never touched, including IUPAC ambiguity codes such as N, R or Y, protein one-letter codes, and the stop symbol *. Other punctuation is also left in place so nothing meaningful disappears silently. If a sequence still contains unexpected characters after cleaning, they were letters or symbols the cleaner deliberately keeps.
Spaces and tabs, alignment gaps written as - or ., digits such as GenBank position numbers, and optionally line breaks. FASTA header lines starting with > are kept unchanged. Each of these can be switched off.
Paste the numbered text as it is. GenBank and EMBL records interleave position numbers and blocks of ten bases; the cleaner drops every digit and space and leaves only the sequence letters.
Yes. The cleaner does not interpret the letters, so DNA, RNA and protein sequences, including IUPAC ambiguity codes, all pass through untouched. Only the chosen characters are removed.
No. Every line beginning with > is treated as a header and kept as its own line. With "Line breaks" selected, the sequence lines of each record are joined into one line under its header.
Paste the aligned sequence or the whole aligned FASTA. Every - and . is removed and each record is left as its ungapped sequence under its original header. Positions no longer correspond to alignment columns afterwards, so keep the aligned file if you still need the column numbering.