Anatomy of .missnp Files in PLINK

This guide explains the structure of .missnp files, detailing why certain SNPs are flagged during dataset merging and how to resolve strand flips biologically and computationally using PLINK commands.
anil0w0 avatar
anil0w0
markdown
02/12/2026 1:51 PM
6.4 KB
11
Indexable

Excellent โ€” now weโ€™ll do a complete anatomy of .missnp like a forensic lab.

Iโ€™ll explain:

  1. EXACT types inside .missnp

  2. For each type:

    • what it really means biologically
    • what --flip does
    • whether it is legally rescuable
  3. Why iterative merge โ†’ new .missnp(2) is the correct logic.


๐Ÿงช 1) What is .missnp in one sentence

.missnp = โ€œSNPs for which PLINK could not prove compatibility between A and B.โ€

It is NOT only strand problems โ€” it is a mixed crime scene.


๐Ÿงฌ 2) The 5 REAL categories inside missnp

TYPE 1 โ€” Simple strand flip (RESOLVABLE)

Example

Dataset A

rs100   A G

Dataset B

rs100   T C

These are complements:

A โ†” T
G โ†” C

Why in missnp?

Because --bmerge by itself does not auto-flip.

What --flip does

For every genotype at rs100:

BeforeAfter
AATT
AGTC
GGCC

Now alleles become A/G โ†’ match A.

LEGAL?

โœ… 100% legal No biological assumption.


TYPE 2 โ€” Ambiguous AT/CG (NOT RESOLVABLE)

Example

A:

rs200   A T

B:

rs200   T A

Why impossible?

If you flip B:

T/A โ†’ A/T

โ†’ looks identical again.

You cannot know:

  • real orientation difference?
  • or true opposite allele coding?

What --flip does

It flips but result still mismatches โ†’ remains in missnp(2).

LEGAL?

โŒ Not safely resolvable without external manifest.


TYPE 3 โ€” True allele conflict (NOT RESOLVABLE)

Example

A:

rs300   A G

B:

rs300   A C

These represent:

  • different mutation
  • different build
  • mis-annotation
  • genotyping error.

Flip result

Flip B โ†’ T/G Still not {A,G}.

LEGAL?

โŒ Must be removed.


TYPE 4 โ€” Multiallelic in one dataset

Example

B:

rs400   A G T

A:

rs400   A G

Why?

  • sequencing called third allele
  • conversion artifact.

Flip result

Still multiallelic โ†’ unmergeable.

LEGAL?

โŒ Remove.


TYPE 5 โ€” Position/ID discordance

Same rsid but:

A:

chr1:1000

B:

chr1:1020

Flip cannot help

โ†’ structural conflict.

LEGAL?

โŒ Remove.


๐Ÿง  3) What --flip ACTUALLY does per type

TypeAfter flip
Type1 resolvableโ†’ becomes compatible
Type2 AT/CGโ†’ still ambiguous
Type3 conflictโ†’ still conflict
Type4 multiโ†’ still multi
Type5 posโ†’ unchanged

So:

ONLY Type1 is rescued.


๐Ÿ” 4) Why iterative merge is CORRECT

Your idea is exactly right.

Step A

merge โ†’ missnp1

Step B

flip missnp1
merge again โ†’ missnp2

Step C

exclude missnp2

This workflow:

  • rescues Type1
  • isolates Types 2โ€“5.

๐Ÿงฉ 5) Detailed walk-through example

Assume missnp1 contains:

rs1   โ† type1
rs2   โ† type2
rs3   โ† type3
rs4   โ† type1
rs5   โ† type4

After:

plink --flip missnp1

Merge again

  • rs1 โ†’ fixed
  • rs4 โ†’ fixed
  • rs2, rs3, rs5 โ†’ still bad

missnp2 now contains:

rs2
rs3
rs5

These are the TRUE unresolvable set.


๐Ÿงพ 6) Legal philosophy

Allowed operations

  • strand complement
  • allele order swap
  • removal of impossible sites.

Forbidden operations

  • inventing allele to match A
  • guessing AT/CG orientation
  • forcing multiallelic โ†’ biallelic.

๐Ÿงฎ 7) Visual genotype examples

Type1 person genotype

B before:

TC

After flip:

AG

Matches A โ†’ real rescue.


Type2 person genotype

B before:

TA

After flip:

AT

Still indistinguishable โ†’ unsafe.


Type3

B before:

AC

After flip:

TG

Never equals AG โ†’ must die.


8) Answer to your question

โ€œshould not we try to merge again to create another missnp(2) and then exclude those SNPs?โ€

YES โ€” that is EXACTLY the correct and legal workflow.

Because:

  1. First missnp = mixture
  2. After flip โ†’ separation
  3. Second missnp = genuinely unfixable.

๐Ÿงช 9) Final decision table

missnp typeFlip?Keep?
ComplementaryYESYES
AT/CGNONO
Allele conflictNONO
MultiallelicNONO
Position clashNONO

๐Ÿ” Bottom line

.missnp is NOT โ€œstrand errors.โ€ It is:

the set of SNPs where PLINK cannot establish a bijection between allele sets.

Only a subset can be legally salvaged.


If you want next, I can help you:

  • parse PLINK log lines that reveal the exact reason
  • classify your real missnp into the 5 types with a script.

Just paste 20 lines of your .missnp and matching .bim ๐Ÿ‘

Leave a Comment