#!/usr/bin/env -S awk -f
# Filter BLASTp format 6 file
# to keep only the records
# with no ID in records.list
#
# Usage:
# awk -f filter_blastp_sequence_id.awk \
# records.list records.blastp.tsv

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

NR==FNR {
    sequence_id=$1
    kept[sequence_id]=1
    next
}

{
    if (!($1 in kept) && !($2 in kept)) {
        print $0
    }
}
