# global defaults
MEM = 80
JAVA_MEM_FRACTION = 0.85
PREALLOCATE_RAM = "t"


MERGING_FLAGS = "ecct iterations=1"
MERGING_EXTEND2 = 50
MERGING_K = 62

CONTAMINANT_MAX_INDEL = 20
CONTAMINANT_MIN_RATIO = 0.65
CONTAMINANT_MINIMUM_HITS = 1
CONTAMINANT_AMBIGUOUS = "best"
CONTAMINANT_KMER_LENGTH = 13

DUPLICATES_ONLY_OPTICAL = False
DUPLICATES_ALLOW_SUBSTITUTIONS = 2

NORMALIZATION_KMER_LENGTH = 21

# almost no filtering unless grossly over-represented
NORMALIZATION_TARGET_DEPTH = 1000  # 500
# allow very low represented kmers to remain
NORMALIZATION_MINIMUM_KMERS = 3  # 15

ASSEMBLY_MEMORY = 250
ASSEMBLY_THREADS = 8
MEGAHIT_MIN_COUNT = 2
MEGAHIT_K_MIN = 21
MEGAHIT_K_MAX = 121
MEGAHIT_K_STEP = 20
MEGAHIT_MERGE_LEVEL = "20,0.98"
MEGAHIT_PRUNE_LEVEL = 2
MEGAHIT_LOW_LOCAL_RATIO = 0.2
SPADES_K = "auto"

# this is bumped up slightly to filter non-merged R1 and R2 sequences
MINIMUM_CONTIG_LENGTH = 300  # 2200

# leave all contigs
MINIMUM_AVERAGE_COVERAGE = 1  # 5
MINIMUM_PERCENT_COVERED_BASES = 20  # 40
MINIMUM_MAPPED_READS = 0
CONTIG_TRIM_BP = 0  # 100

# bases
MINIMUM_REGION_OVERLAP = 1
FEATURE_COUNTS_ALLOW_OVERLAP = True
MAXIMUM_COUNTED_MAP_SITES = 10
# default bbmap
CONTIG_MIN_ID = 0.76
CONTIG_MAP_PAIRED_ONLY = True
CONTIG_MAX_DISTANCE_BETWEEN_PAIRS = 1000
# only best
CONTIG_COUNT_MULTI_MAPPED_READS = False
# set minimum map quality
MINIMUM_MAP_QUALITY = 0

PROKKA_KINGDOM = "Bacteria"

MAXBIN_MAX_ITERATION = 50
MAXBIN_MIN_CONTIG_LENGTH = 1000
MAXBIN_PROB_THRESHOLD = 0.9

DIAMOND_TOP_SEQS = 2
DIAMOND_E_VALUE = 0.000001
DIAMOND_MIN_IDENTITY = 50
DIAMOND_QUERY_COVERAGE = 60
DIAMOND_GAP_OPEN = 11
DIAMOND_GAP_EXTEND = 1
DIAMOND_BLOCK_SIZE = 2
DIAMOND_INDEX_CHUNKS = 4

SUMMARY_METHOD = "lca"
AGGREGATION_METHOD = "lca-majority"
MAJORITY_THRESHOLD = 0.51
MIN_BITSCORE = 0
MIN_LENGTH = 20
MAX_HITS = 100


EGGNOG_HEADER = [
    "Query",
    "Seed",
    "Seed_evalue",
    "Seed_Score",
    "eggNOG",
    "max_annot_lvl",
    "COG_cat",
    "Description",
    "Name",
    "GO_terms",
    "EC",
    "KO",
    "KEGG_Pathway",
    "KEGG_Module",
    "KEGG_Reaction",
    "KEGG_rclass",
    "BRITE",
    "KEGG_TC",
    "CAZy",
    "BiGG_Reaction",
    "PFAMs",
]
