# 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, mycosporine
    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)
                and not alpha_am_amid   # Fungal lysine primary metabolism
                )

RULE PKS-like
    CATEGORY PKS
    DESCRIPTION Catches PKS-like fragments that are not detected by another PKS rule
    SUPERIORS T2PKS, benzoxazole
    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 ANY_KS and not PKS_AT)

RULE RiPP-like
    CATEGORY RiPP
    DESCRIPTION Fallback rule containing known RiPP-related profiles
    SUPERIORS azole-containing-RiPP, bottromycin, cyanobactin, fungal-RiPP, guanidinotides,
              lanthipeptide-class-i, lanthipeptide-class-ii,
              lanthipeptide-class-iii, lanthipeptide-class-iv,
              lanthipeptide-class-v,
              lassopeptide, lipolanthine, microviridin, proteusin, RaS-RiPP,
              sactipeptide, thioamitides, 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 azole-containing-RiPP, bottromycin, cyanobactin, fungal-RiPP, guanidinotides,
              lanthipeptide-class-i, lanthipeptide-class-ii,
              lanthipeptide-class-iii, lanthipeptide-class-iv,
              lanthipeptide-class-v,
              lassopeptide, lipolanthine, microviridin, proteusin, RaS-RiPP,
              sactipeptide, thioamitides, ranthipeptide,
              glycocin, redox-cofactor, RiPP-like
    CUTOFF 10
    NEIGHBOURHOOD 10
    CONDITIONS ANY_RRE

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

##### Precursor-related rules
RULE terpene-precursor
    CATEGORY terpene
    DESCRIPTION Compound likely used as a terpene precursor
    SUPERIORS terpene
    CUTOFF 10
    NEIGHBOURHOOD 10
    CONDITIONS PT_FPPS_like and not PT_HPP
