AMAP

Docs / How it works

Duplication metrics

AMAP looks at gene duplication twice: within each genome, and across the whole set.

How the families are found#

Each corrected proteome is searched against itself with Diamond, excluding self-hits. A pair is kept when the identical residues of the alignment cover 80% or more of either the query or the subject, so a short domain match between two otherwise unrelated proteins is not counted as duplication. Kept pairs become links in a graph, and its connected pieces become the duplication families, listed in DUPLICATIONS/{sample}/duplications_{sample}_groups.tsv.

in the familya link: identical residues cover 80% or more of one of the twoa hit under 80%: no linka protein outside the family
CDC1551's corrected proteome against itself, run as GET_DUPLICATIONS runs it: six transposases make one family. Each line is a pair Diamond matched, with the larger of the two shares its identical residues cover; the size of a protein is its length. Point at a protein or a line for its numbers.

Because the rule takes the larger of the two shares, a fragment joins the family of the gene it came from: a match that covers almost all of a short protein counts, however little of the long one it covers.

How the communities are built#

The proteins of every sample's families are then pooled and searched all against all. Within each genome, the pairs that pass the same rule make a network, which the Louvain method splits into communities, with a fixed seed so that a rerun splits it the same way. Two communities are homologous when at least one hit joins them, and each homologous pair is one row of DUPLICATIONS/homologous_communities.tsv, with an interactive network in the matching HTML file.

a link in this genomea link only the other genome has
The same family in GET_ALLDUP, pooled with M. bovis AF2122/97's families: one community in each genome, joined by their hits, and the row of homologous_communities.tsv they make. Each protein of M. bovis sits where its closest match in CDC1551 does.

The columns#

A row describes two communities: the columns ending in 1 are the first, those ending in 2 the second. The first is the one whose sample comes first by name, or the one with the lower number when both are in the same sample, and the rows come in that order too, so a rerun writes the same file. For each:

Reading them together#

Density and clustering at 1 mean copies that all match each other: a recent expansion of near-identical copies. In CDC1551 these are the transposases of insertion sequences, the ESAT-6-like Esx proteins and PE proteins.

Lower density and longer paths mean copies that have drifted apart, each still matching some of the others but not all, as M. bovis's copies of the transposases above have. Or, less happily, an artefact of assembly fragmentation, where one gene broken across contigs looks like several partial copies. Cross-checking against the contig count in *-AMAP.qc.tsv tells the two apart.

Duplications and assembly quality

Repetitive families are exactly what short-read assemblers collapse or fragment. A genome with markedly fewer duplications than its relatives may have collapsed them rather than lost them. The metrics describe the assembly you provided, not necessarily the organism.

Next steps#

Edit this page on GitHub