Concatenate genes

Join FASTA records into one sequence, with an optional linker and a partition table.

Concatenated sequence

Joining FASTA records head to tail

The In order tab takes every record in the input and joins it to the next one, in the order you pasted them, and gives back a single record. It is the quick way to build a fusion construct out of its parts, to stitch contigs into one scaffold, or to glue an alignment back together after it was split. Whitespace, line breaks and position numbers are ignored, and gaps are kept, so an alignment survives the trip unchanged.

The partition table under Details gives the first and last position of every part in the joined sequence, plus the same information as partition lines a phylogenetics program can read. Those numbers are the only reliable way back: once the parts are joined, nothing in the sequence itself says where one ended and the next began.

Linkers between the parts

Choose a linker and it goes between every pair of neighbouring records, never at the start or the end. The presets cover the common cases:

LinkerSequenceLengthUsed for
GGGSGGCGGCGGCTCC12 bpA short flexible linker between two protein domains
GGGGSGGTGGCGGTGGCTCT15 bpThe classic flexible linker, often repeated two or three times
RBSAGGAGG6 bpA Shine-Dalgarno sequence before the next gene in an operon
StopTAA3 bpEnding one open reading frame before the next starts
BamHIGGATCC6 bpLeaving a cut site between the parts
10 NsNNNNNNNNNN10 bpA gap of unknown sequence between two contigs

For a protein fusion, keep every linker a multiple of three bases so the next domain stays in frame, and take the stop codon off every part except the last. Check the finished construct with the DNA to protein translator, and its cut sites with the restriction site finder.

Reverse complementing some of the records

Type record numbers into the Reverse complement field and those records are flipped before they are joined. Single numbers, a list and a range all work: 2, 1, 3or 2-4. Use it when a contig or a sequencing read came off the other strand. To flip everything instead, use the reverse complement tool.

Building a supermatrix for phylogenetics

The By name tab does the concatenation a multi-gene phylogeny needs: one aligned sequence per taxon, holding every gene in order. Paste the gene alignments one after another in a single FASTA, in the order you want the partitions:

  • Records are matched by the first word of the header, so the same taxon must be named the same way in every alignment.
  • A new gene starts wherever a name repeats, which is how the tool tells one alignment from the next without a separator line.
  • A taxon missing from a gene is filled with gaps across the whole length of that gene, so every output record has the same number of columns.
  • Within a gene, records shorter than the longest one are padded with gaps on the right and the padding is reported, because it usually means the alignment was truncated.

Worked example

"Try an example" on In order loads three parts, a 54 bp signal peptide, 120 bp of the EGFP coding sequence and an 18 bp His6 tag, with the 12 bp GGGS linker between them. The result is 216 bp, and the partition table reads 1-54, 67-186 and 199-216: each gap of 12 positions is the linker.

On By name the example loads three gene alignments for four taxa, withGallus gallus missing from the second gene. The result is 4 records of 63 columns, and the partitions are 1-24, 25-42 and 43-63. The Gallus record carries 18 gaps across gene 2, which is exactly how a supermatrix represents missing data.

DNA, gene1 = 1-24
DNA, gene2 = 25-42
DNA, gene3 = 43-63

Those three lines are the partition file for RAxML or IQ-TREE. To turn the output into PHYLIP or NEXUS, use thealignment format converter, and to strip gap-only columns first, the gap cleaner.

Frequently asked questions

How do I join several FASTA sequences into one?

Paste them all into the box, or choose a FASTA file, and the In order tab joins them head to tail in the order they appear, as one record. Nothing is reordered and nothing is trimmed. The partition table under Details gives the first and last position of each part in the joined sequence.

What linker should I put between two domains?

A flexible glycine and serine linker is the usual choice for a fusion protein, most often (GGGGS) repeated one to three times, or the shorter GGGS in the list here. Keep the linker a multiple of three bases so the downstream domain stays in frame, and remove the stop codon from every part except the last one.

How do I build a supermatrix from several gene alignments?

Paste the alignments one after another in a single FASTA and switch to the By name tab. Records are matched by the first word of the header, a new gene starts wherever a name repeats, and each taxon gets one record with all genes joined in order. A taxon missing from a gene is filled with gaps for the whole length of that gene, which is what a supermatrix expects.

What are the partition numbers for?

Phylogenetics programs need to know where each gene starts and ends in the concatenated alignment so they can give it its own model. The partition lines under Details are in the format RAxML and IQ-TREE read, one line per gene, which you can paste straight into a partition file.

Can I reverse complement one of the records?

Yes. Type the record numbers in the Reverse complement field, for example 2 or 1, 3 or 2-4. Those records are reverse complemented before they are joined, which is how you fix a fragment that was sequenced or assembled on the other strand. The numbers are the positions in the input, counted from 1.