#!/usr/bin/env -S awk -f

BEGIN {
    on_good_sequence = 0
}

/^>/ {
    locus=$3
    split(locus, arr, ":")
    chromosome=arr[3]
    if (chromosome == "Mt" || chromosome == "Pt" || chromosome ~ /supercontig/) {
        on_good_sequence = 0
    } else {
        on_good_sequence = 1
        print $0
    }
}

/^[^>]/ && on_good_sequence == 1 {
    print $0
}
