List compare

Paste two or three lists of IDs, one per line. Overlap, unique entries and counts.

Overlap

Venn diagram of the lists

Matching

Comparing two gene lists

Two lists of identifiers, one per line, split into three groups: the entries in both, the entries only in the first, and the entries only in the second. The overlap is the headline number because it is almost always the question, whether the lists are differentially expressed genes from two experiments, hits from two screens, a panel against a result, or two sets of sample IDs that ought to agree.

Each list is read as a set. Blank lines are ignored, an identifier repeated in the same list is counted once, and the result says how many repeats were collapsed. That matters more than it sounds: a list exported per transcript or per probe can hold the same gene five times, and counting it five times inflates both the list size and the overlap.

How the matching works

OptionDefaultWhat it does
Ignore caseonTP53, Tp53 and tp53 are one identifier
Trim spacesonLeading and trailing whitespace is removed
Strip version suffixoffENSG00000141510.17 becomes ENSG00000141510

The entries are compared as text, exactly as given once those rules are applied. There is no synonym lookup: TP53 and P53 are two different identifiers here, and a symbol will never match an Ensembl or Entrez ID. Map both lists to the same identifier type before comparing them, or the overlap will be too small for a reason that has nothing to do with biology.

Worked example

The example loads a 13-line list A of tumour-suppressor and oncogene symbols, in which TP53 appears twice in different case, and a 10-line list B. A collapses to 12 unique entries, and the comparison gives:

  • 4 in both: EGFR, KRAS, PTEN and TP53, which is 33 % of A and 40 % of B.
  • 8 only in A and 6 only in B, for a union of 18 identifiers.

Switch to three lists and a 7-entry repair-gene panel C joins in. Now 2 entries are in all three, TP53 and PTEN; 3 more are in A and C only, 2 in A and B only, 1 in B and C only, and 19 different identifiers appear in total. Turn "Ignore case" off and list A has 13 unique entries instead of 12, because tp53 and TP53 stop being the same thing.

Reading the Venn diagram

With two lists the circles are drawn to scale: each area is proportional to the size of its list and the circles are pushed together until the lens between them is proportional to the overlap, so the picture is a true two-set Venn diagram and not a decoration. Three circles cannot be drawn to scale and stay readable, so the three-list diagram uses the usual symmetric layout with the seven counts written in. Every count in the diagram is also a set you can copy under Details.

What the counts do and do not show

  • An overlap is not a p-value. Two lists of 1,000 genes drawn at random from 20,000 share 50 by chance. To ask whether yours is more than that, run a hypergeometric test with the size of the measured universe as the fourth number.
  • Identifier type decides the answer. Symbols change over time, Ensembl IDs carry versions, and one gene can hold several RefSeq accessions. Map first, compare second.
  • Direction is lost. A gene up in one experiment and down in another still lands in the overlap. Split each list by direction and compare the four sets if that matters.
  • Order is lost. Rank the lists and compare the ranks if the strength of each hit matters, rather than reducing them to membership.

For sequences rather than identifiers, the FASTA deduplicator finds duplicate records in a file, and thesequence comparison tool compares two sequences base by base.

Frequently asked questions

How do I find the genes shared by two lists?

Paste one list in each box, one gene per line. The overlap, the entries in both lists, is the headline number, and the full membership of every set is behind Details with a copy button for each. Nothing is uploaded; the comparison runs in your browser.

Does case matter?

Not by default. TP53, Tp53 and tp53 are treated as the same identifier, which is what you want when one list came from a mouse annotation and the other from a human one. Turn "Ignore case" off if you are comparing something where case is meaningful, such as protein isoform suffixes or case-sensitive sample names.

What happens to duplicate entries?

Each list is reduced to a set, so an identifier that appears twice in the same list is counted once, and the result says how many repeated lines were collapsed. That is almost always right for gene lists, where a duplicate usually comes from two probes or transcripts of the same gene rather than from two findings.

Can it match Ensembl IDs with different versions?

Yes, with "Strip version suffix" on. ENSG00000141510.17 and ENSG00000141510.2 both become ENSG00000141510 and match. The option removes a trailing full stop followed by digits, so it also handles versioned RefSeq and transcript identifiers, and leaves plain gene symbols alone.

Is the overlap between two gene lists significant?

This page counts the overlap; it does not test it. For a p-value you need the size of the universe the lists were drawn from, usually the number of genes measured, and a hypergeometric or Fisher exact test. The counts here, the two list sizes and the overlap, are three of the four numbers that test needs.