# Contains rules for partially present clusters, missing one or more functional parts

# Cutoffs and neighbourhoods are given in kilobases

RULE NRPS-like
    CATEGORY NRPS
    DESCRIPTION Catches NRPS-like fragments that are not detected by the NRPS rule
    SUPERIORS NRPS, NAPAA, isocyanide-nrp
    CUTOFF 0  # since we're really looking at single CDS fragments
    NEIGHBOURHOOD 20
    CONDITIONS cds((PP-binding or NAD_binding_4) and (AMP-binding or A-OX))

RULE PKS-like
    CATEGORY PKS
    DESCRIPTION Catches PKS-like fragments that are not detected by another PKS rule
    SUPERIORS T2PKS
    CUTOFF 10
    NEIGHBOURHOOD 20
    CONDITIONS t2pks2 or ksIII

RULE transAT-PKS-like
    CATEGORY PKS
    DESCRIPTION Marks partial transAT-PKS clusters, specifically those with an AT-docking domain,
            but no AT domain.
    SUPERIORS transAT-PKS
    CUTOFF 45
    NEIGHBOURHOOD 20
    CONDITIONS cds(ATd and (PKS_KS or ene_KS or mod_KS or hyb_KS or itr_KS or tra_KS) and not PKS_AT)

RULE RiPP-like
    CATEGORY RiPP
    DESCRIPTION Fallback rule containing known RiPP-related profiles
    SUPERIORS bottromycin, cyanobactin, fungal-RiPP, guanidinotides,
              lanthipeptide-class-i, lanthipeptide-class-ii,
              lanthipeptide-class-iii, lanthipeptide-class-iv,
              lanthipeptide-class-v,
              LAP, lassopeptide, lipolanthine, microviridin, proteusin, RaS-RiPP,
              sactipeptide, thioamitides, thiopeptide, ranthipeptide,
              glycocin, redox-cofactor, methanobactin
    CUTOFF 20
    NEIGHBOURHOOD 5
    CONDITIONS strepbact or Antimicrobial14 or Bacteriocin_IId or BacteriocIIc_cy
                or Bacteriocin_II or Bacteriocin_IIi or Lactococcin
                or Antimicrobial17 or Lactococcin_972 or Bacteriocin_IIc
                or LcnG-beta or Cloacin or Linocin_M18
                or TIGR03651 or TIGR03693
                or TIGR03601 or TIGR03795
                or TIGR03975 or DUF692 or TIGR01193
                or all_YcaO

RULE RRE-containing
    CATEGORY RiPP
    DESCRIPTION RRE-element containing cluster
    SUPERIORS bottromycin, cyanobactin, fungal-RiPP, guanidinotides,
              lanthipeptide-class-i, lanthipeptide-class-ii,
              lanthipeptide-class-iii, lanthipeptide-class-iv,
              lanthipeptide-class-v,
              LAP, lassopeptide, lipolanthine, microviridin, proteusin, RaS-RiPP,
              sactipeptide, thioamitides, thiopeptide, ranthipeptide,
              glycocin, redox-cofactor, RiPP-like
    CUTOFF 10
    NEIGHBOURHOOD 10
    CONDITIONS ANY_RRE

RULE fungal-RiPP-like
    CATEGORY RiPP
    DESCRIPTION fungal RiPP-like clusters
    SUPERIORS fungal-RiPP
    CUTOFF 20
    NEIGHBOURHOOD 30
    CONDITIONS DUF3328

RULE phosphonate-like
    CATEGORY other
    DESCRIPTION Phosphonate-like
    SUPERIORS phosphonate
    CUTOFF 20
    NEIGHBOURHOOD 20
    CONDITIONS phosphonates-like
