#!/usr/bin/env -S awk -f
# Convert mcl output into tsv output
# with two columns 'gene id, family identifier'

BEGIN {
    family_identifier=0
    OFS="\t"
    FS=" "
}

{
    family_identifier++
    if (NF > 1) {
        for (i=1; i <= NF; i++) {
            print $i, family_identifier
        }
    }
}
