PlasmidPop user guide All pages Open the app

Pairwise alignment

The Align tab aligns another sequence to the open document, for example a Sanger read against the plasmid, or a synthesised fragment against its design. In front of a protein it aligns two proteins, scored by BLOSUM62.

How to align

  1. Paste the other sequence into the box: bare bases, a FASTA record or a GenBank record all work. Or drop a file on the box, or click Choose file…: GenBank, FASTA, SnapGene, AB1 and FASTQ files (gzipped too) are read into the box without opening a tab. To align against a document already open in another tab, pick it from Open tab… (the same kind only: protein against protein); its current sequence is used, unsaved edits, topology and, for a read, its qualities and trace included. Choose or drop several files at once to align all of their records together (below).
  2. If the box holds several records (a FASTA file of several reads, say), pick the one to align from the list that appears — or align them all, see Aligning a batch of reads.
  3. Click Align, the button just under the box and the file controls. Both orientations of the other sequence are considered and the better one is shown; the heading says when it was the reverse complement. The defaults suit most sequences; the Options group under the button holds the rest:
  4. In Options, choose Global (end to end) to align the whole of both sequences (Needleman–Wunsch), or Local (best region) to find the best-matching stretch (Smith–Waterman). Local is the right choice for a read against a plasmid, and is chosen for you when the box holds a read (a file with base qualities) or a sequence under half as long as what it is aligned to; the note in the Options group says so. Global would score such a sequence across the whole of the plasmid and report a perfect read at 17% identity. A mode you choose yourself stays chosen while the Align tab is open, whatever you then put in the box.
  5. Tick Against selection only to align against the selected part of the document instead of all of it (it is greyed out until something is selected). Click Align again to re-run with the new options.

The result appears in a Result group under Options, and reports the score, percent identity, the number of columns and of gap columns. It does not print the alignment itself, which is too wide for a side panel: click Large view to read it in a window of its own, along the whole sequence (see below). Identity counts only the identical columns.

Point at the result's summary line (a bordered button with a › at its end; hover it, or Tab to it) to see where the alignment sits: the region it covers is drawn in the map and the sequence view, in the same dashed purple as other previews, without touching your selection. A region that runs through the origin of a circular plasmid is drawn at both ends. Click it (or press Enter) to select the covered bases, so you can annotate or copy them, and scroll to them; the highlight steps aside for the selection. On a phone, tap to select. The highlight goes when the pointer or focus leaves, when you edit, or when you leave the tab. The same works for each read in a batch's list, where the whole row is the target, not just the name.

A result belongs to its input

A result stays on screen only while it describes what is in the panel. Pasting or editing the sequence box, choosing or dropping a file, taking another open tab or picking another record clears the result and its group (or the batch's list) and stops an alignment that is still running, so an old result never looks like the new input's. Changing Mode or Against selection only is different, since people tweak these while comparing: the result stays but is dimmed, "Input changed, align again" shows under the Result group's name, and its summary line and Large view buttons are disabled until you click Align again. A Large view window that is already open keeps its own result until you close it.

Aligning a batch of reads

A FASTQ file of reads, or a FASTA of several Sanger reads, can be aligned all at once — the usual way to check a batch of clones.

  1. Drop the file on the box, or click Choose file…. The note under the box says how many records it has. To check clones sequenced as separate files, pick or drop all the files at once, in any mix of formats: their records become the samples, in file order, and the box is emptied (its text would be unwieldy). Rows are named by record and file. A new pick replaces the samples loaded, as does typing in the box; a file that cannot be read is named and the others kept. The 96-record limit counts across all the files.
  2. Leave the mode as it is, and each record is aligned in the mode it would get on its own: Local for a read or anything under half the document's length, Global otherwise. A mode you choose is used for every record. Tick Against selection only if the reads should be looked for in part of the document only.
  3. Choose All N records in the record list under the box; the Align button then reads Align all. Click it. Each record is aligned against the document in turn, in the background; the bar counts reads (12 of 96) and Cancel stops the batch, keeping the reads already aligned. Leaving the Align tab cancels it too.
  4. The reads are listed as they finish, in a Results group, one row each: the name, its length and whether it aligned reversed, the identity, the number of differences on confident bases (Q20+ diffs, following Confident from; a read without qualities counts all of its differences, as Diffs), and the stretch of the document it covers. Click Identity to sort lowest first — the clones to look at — then highest first, then back to the file's order.
  5. Click a read's name to pick it, then click Large view of all (the highlighted button above the list): the window stacks every read, with the one you picked already selected, its score line showing.

A read that could not be aligned (nothing good enough after trimming, too large) is listed with the reason, and the rest carry on. At most 96 records (a plate) are aligned at once; for a larger file the note says so and the list has no All records choice: pick one record, or split the file. A batch is aligned in a band around the words each read shares with the document, then checked against every alignment there that could score higher (see long reads below), which takes about a second for a plate of Sanger reads against a 5 kb plasmid. A read gets the score it would get aligned on its own, unless it matched better somewhere else in the document that its words do not point to; where two alignments score the same (an indel in a repeat can sit in either copy), the batch may show the other one.

Assembling reads into a contig

Reads of an insert whose sequence you do not know yet, or reads you want one consensus from, can be joined with no reference. Load the reads as for a batch (a FASTQ, AB1 files or a FASTA of two or more records, at most 96) and click Assemble reads, beside Align. Nothing is aligned against the document; the document is not used at all.

Each read is first trimmed by its qualities (Trim poor ends, in the Reads group, as for an alignment). The longest read starts a contig, and every other read is joined to it if it overlaps an end, or lies inside it, by at least 25 bases at 90% identity or better. A read may be on either strand: those turned over to fit are paler in the layout. Reads that join nothing start contigs of their own, listed in the Contig picker, biggest first. A read with nothing left after trimming is counted as left out.

The Assembly group shows the picked contig: its length, depth, a layout with a bar for each read and a red mark at each disagreement, and the disagreements listed with the position, the call and each read's base and quality there. The consensus is called from every read at once, weighted by quality: one high-quality base outweighs several poor ones; where reads at Q20 or better differ and none is clearly right, the consensus has an IUPAC code (R for A or G, and so on); a base most reads lack is left out. A disagreement is such a code, or a base a confident read calls differently from the consensus. Reads without qualities (a FASTA) count every base as Q20, which the note says.

Save consensus as document opens the consensus in a new tab, named after the first read, with its call qualities when the reads had any. To check it against the intended construct, open that tab's Align tab and drop or paste the construct there.

Assembly is greedy and meant for a few to a few dozen Sanger reads of one region. It does not resolve repeats, and a read is placed at the first contig it fits.

Verifying a plate of clones

A whole-plasmid sequencing run returns one consensus a clone, often a plate of them, and the question is which clones are the construct you meant to make. File ▸ Verify clones… answers it for the whole plate at once.

  1. Open the construct each clone should be (or several constructs, for a mixed plate) in their own tabs. The dialog lists the open DNA documents; tick the expected ones. The document in front is ticked to begin with.
  2. Add consensus files… takes FASTA, GenBank, SnapGene and the other formats the app opens, as many files as you like and several records to a file, up to 384 clones. A file with one record is named by the file, one with several by the file and the record.
  3. Verify checks them one after another; Stop keeps what is done.

Each clone is lined up with its construct through the origin and on either strand, so a consensus written from another start, or reverse complemented, is not a difference. It is then aligned end to end, and the table gives the clone's Verdict, its Identity, and what differs, each difference placed on the construct's features:

VerdictMeaning
MatchesNo difference at all.
Differs inside a featureA difference lies in an annotated feature (the whole-molecule source aside).
Differs outside featuresDifferences, but only in sequence no feature covers.
Wrong constructUnder 75% identical to its construct, or sharing almost nothing.
Could not be checkedToo large to align, or empty; the row says why.

A difference is an SNV (one base), a substitution (several adjacent bases), an insertion or deletion (fewer than 20 bases) or an extra or missing region (20 or more), with its position in the construct's numbering. In a feature it reads as "frameshift in CDS bla" (an insertion or deletion of a number of bases that is not a multiple of three in a CDS), "in-frame deletion of 3 bp in CDS bla", "promoter pLac changed" or "CDS bla deleted". An insertion at the very edge of a feature is next to it, not in it. Ambiguity codes in the consensus (an N) are not counted as differences; the row says how many there were.

Mixed plates. With several constructs ticked, each clone goes to the one it shares the most sequence with. To send clones by name instead, type text in the box beside a construct: a clone whose file name contains it (case does not matter) goes to that construct, the longest text winning. A clone with no match by name is placed by sequence.

Click a clone's name to open Compare with… between it and its construct, as for any two documents. Export CSV saves the table, a row a clone with every difference in the last column. Nothing leaves your browser and no file is changed.

Aligning a read with its qualities

An AB1 or FASTQ file dropped on the box (or chosen with Choose file…) keeps its base qualities for the alignment; the note under the box says with base qualities. They last while the box holds the file's text: edit it and it is read as plain bases again. See Sequencing reads for what the qualities are.

A Reads group, under Options, appears when the box (or the document) holds a read.

The panel does not draw a read's poor bases or an AB1 trace; the large view does (below).

When the document is the read

Opened the AB1 or FASTQ itself, and want to check it against the plasmid? Paste or drop the plasmid (or any reference) into the box. While the open document is a read — opened from an AB1 or FASTQ, its bases unedited — and the box holds a sequence without qualities of its own, the note above the box says … is a read, and the document is aligned _to_ the box: the box is the reference, the document the read. Its qualities and trace are then used as above — trimming, confident and poor differences.

Aligning several sequences together

Pairwise alignment lines two sequences up. To compare several variants of a construct, or several homologous coding sequences or proteins, align them all at once: paste a multi-record FASTA or GenBank text into the box, or drop or choose several files, and the Multiple alignment group appears under the Align button.

  1. Put three to fifty sequences in the box (one record each). Include this document adds the open document as one more, so a box of two records is enough for three.
  2. Click Align N together. It runs in the background, with a progress bar and Cancel, and opens a window of its own.
  3. The window shows every sequence in one column space. Over them are the consensus (the commonest letter in each column; blank where most sequences have a gap) and a bar of how conserved the column is. Each column's cells are shaded by the share of sequences that carry the commonest letter, so conserved stretches stand out. For bases, the Shading menu can instead colour each base A, C, G and T. Names stay in place as you scroll sideways.
  4. Save aligned FASTA and Save Clustal download the alignment; Copy FASTA copies it. Clustal files carry the usual conservation line (* where every sequence agrees, : where every pair of residues of a protein scores above zero in BLOSUM62).

Bases are scored as in pairwise alignment, and proteins (when the open document is a protein) by BLOSUM62. The method is progressive: a guide tree is built from how many short words each pair of sequences shares, the sequences are joined along it, and the result is refined by re-aligning the two sides of each branch where that scores better. Gaps at either end of the alignment are cheap, so a fragment is not penalised for being short. It does not match the best programs (MAFFT, Clustal Omega) column for column; on simulated sets it finds about 96% as many of the true residue pairs as MAFFT does, and it is exact for sequences that differ by a few substitutions and indels. The sequences are taken as they are: it does not reverse-complement one that is on the other strand, and a circular plasmid is aligned from the first base it is written from. All of it runs in your browser.

Scoring and limits

Scores use match +5, mismatch −4, gap open −10 and gap extend −0.5 (the EMBOSS DNAfull scheme). Ambiguity codes score by the same scheme, by the bases they stand for: A against R (A or G) +1, A against N −2. An N is therefore neither a match nor a full mismatch, and a run of them does not attract the alignment.

Alignment runs in a background thread and the interface stays responsive. A long one shows a progress bar with the percentage done and a Cancel button; leaving the Align tab cancels it too. For large inputs the orientation is picked first from the short words the two sequences share, so only one alignment runs; when neither orientation clearly wins, both are aligned.

A long read against the plasmid it came from — a nanopore read of 10 kb, say — is aligned in a band around the words the two share rather than over every pair of bases, which takes a fraction of a second rather than several. The answer is then checked: the score found limits how many gaps any better alignment could have, and so how far from the band it could stray, and that whole region is searched too. A Global alignment is then the best there is; a Local one is the best among alignments that run through the stretch the shared words point to. The check is skipped when it would cost as much as aligning in full, mostly for a long, noisy read in Local (a 10 kb nanopore read, say): its alignment is then the best the band found, which is usually but not always the best there is, since a tandem repeat or a long insertion near an end of the read can lead the band astray. Such an alignment is marked: its heading says "not checked against the best possible alignment", and in a batch of reads its identity carries an asterisk with the same words on hover. Two sequences that share too little for a band, and would need more than 150 million cells in full (about 12 kb × 12 kb), are refused to protect the browser's memory; align against a selection for those.

Reads through the origin

On a circular document, a Local alignment against the whole document finds a read that runs through the origin, such as a whole-plasmid nanopore read that happens to start in the middle. That holds for a read with only a few bases before the origin too, singly or in Align all: those bases, and any difference among them, are part of the alignment. Positions are numbered as the document's, going from its last base back to 1, and Select aligned region in this document selects across the origin.

In the large view, reads that run through the origin and reads that stop short of it are combined by base: coverage, the feature verdicts' read and strand counts, and the "samples disagree" flag treat a base as one base whichever side of the origin a read reaches it from. The protein effect of a difference in a coding sequence across the origin is read the same way, including a codon split by the origin, when the read that carries the difference runs through it; a read that stops at the origin holds only part of such a codon and shows no effect for it.

Large view

Large view on a result (the highlighted button under the score line) opens the alignment in a window of its own, and Large view of all on an Align all batch stacks every aligned read at once, starting with the read picked in the list selected. The document sits at the top with a position ruler and each sample is a row under it, all moving together under one scroll, so a column reads straight down through the document and every sample. Differences from the document have a coloured background, by where the column falls in the document: red in a CDS or an ORF (a difference that may change a protein), blue in any other feature, grey outside every feature. A column in several features takes the highest, CDS first. A key sits in the toolbar, and the heading counts the differing columns in each. Colour is not the only cue: a changed base is a plain block, a base the sample lacks (a dash) has a bar along its foot, a base the sample adds has one along its head, and a match through an ambiguity code is a paler block. The colours are from the whole document, whether or not Features and ORFs are on; ORFs count once the ORFs panel has found them. With no document behind the reference (a pasted sequence) every difference is grey and there is no key.

An insertion in one sample opens gap columns in the document row and in every other sample, so the rows stay in register. This is each sample aligned to the document alone, laid side by side; it is not a multiple sequence alignment, and two samples are not aligned to each other. The A read's bases below the confident quality sit on a grey block, faded, so a difference there is easy to discount. A read opened from an AB1 file has its chromatogram drawn under its row, each base's peak under its letter and the base qualities as faint bars behind; press Trace in the window's toolbar (shown when any sample has one, on by default) to hide it and see more rows.