Toolyard

How to Align Two DNA or Protein Sequences

What an alignment does

An alignment lines two sequences up so that matching positions sit in the same column. Where one sequence has extra bases or residues, gaps (-) are put in the other. The result shows where the two agree, where they differ and where something was inserted or deleted.

Align two sequences

  1. Open Pairwise Align DNA or Pairwise Align Protein.
  2. Paste the two sequences.
  3. Read the alignment with the identity, number of gaps and score underneath.

Both tools align the sequences end to end, a global alignment. That suits two versions of the same gene or protein. To find a short piece inside a long sequence, a pattern search is the better tool.

Gaps and scores

Each match adds to the score and each mismatch and gap takes away from it. Opening a gap costs more than making an existing one longer, which is called an affine gap penalty. It reflects biology: one insertion of six bases is more likely than six separate insertions of one. Protein alignments score mismatches with the BLOSUM62 matrix, which treats swaps between similar amino acids, such as leucine and isoleucine, as nearly matches.

Identity vs similarity

Identity is the percentage of aligned positions that are exactly the same. Similarity, for proteins, also counts positions with chemically similar amino acids. Two proteins can be 40% identical and 60% similar. For several sequences that are already aligned, Identity and Similarity gives the figures for every pair.

Tools in this guide

More guides

How to Open HEIC Files on WindowsHow to Reduce PDF File SizeHow to Remove Location Data from PhotosHow to Extract Audio from a VideoHow to Make a Wi-Fi QR CodeHow to Sign a PDFHow to Verify a File Checksum (SHA-256)PNG vs JPG vs WebP: Which Image Format to UseHow to Merge PDF FilesHow to Copy Text from an ImageHow to Convert JPG to PDFHow to Convert a PDF to JPGHow to Split a PDF or Extract PagesHow to Rotate a PDF PermanentlyHow to Add Page Numbers to a PDFHow to Watermark a PDFHow to Convert HEIC to JPG on a MacHow to Convert WebP to JPGHow to Reduce Image File SizeHow to Convert a Video to GIFHow to Convert WAV to MP3How to Create a Strong PasswordHow to Convert Celsius to FahrenheitGB vs GiB: Why Your Drive Shows Less SpaceHow to Calculate PercentagesHow to Calculate the Number of Days Between Two DatesWhat Is a Unix Timestamp?How to Compare Two Text FilesHow to Count Words in a DocumentHow to Scan a QR Code from a Screenshot or ImageWhat Is a Hash? MD5, SHA-1 and SHA-256 ExplainedHow to Compress a Photo to 20 KB (or Any Size)How to Remove the Background From a PhotoHow to Test Your MicrophoneHow to Check a Screen for Dead PixelsHow to Record Your ScreenHow to Make a Ringtone for iPhoneHow to Compress a Video to Send ItHow to Remove a Password From a PDFHow to Password Protect a PDFHow to Fill In a PDF FormHow to Convert a PDF to WordHow to Blur a Face in a PhotoHow to Calculate Your BMIHow to Calculate a Mortgage PaymentHow to Schedule a Meeting Across Time ZonesWhat Is a Cron Expression?How to Reverse Complement a DNA SequenceHow to Translate DNA to ProteinHow to Convert GenBank to FASTAHow to Find Restriction Sites in a DNA SequenceHow to Design and Check PCR PrimersHow to Calculate Molar MassHow to Balance a Chemical EquationHow to Make a Solution of a Given MolarityHow to Calculate a Dilution (C1V1 = C2V2)How to Calculate pHHow to Calculate DNA Concentration From A260How to Calculate Insert Amount for a LigationHow to Convert RPM to g (RCF)How to Count Cells With a HemocytometerHow to Use a Punnett SquareHow to Make a Budget With the 50/30/20 RuleDebt Snowball vs Debt AvalancheHow Much Do I Need to Retire?How to Convert Salary to Hourly PayProfit Margin vs MarkupHow to Calculate VAT and Sales TaxHow to Make an InvoiceHow Much House Can I Afford?How to Read Resistor Color CodesHow to Choose a Resistor for an LEDHow to Calculate Voltage Drop in a CableHow Much Concrete Do I Need?How Much Paint Do I Need?How to Calculate a SubnetSignificant Figures Rules