def FindBarcodeInGenes(barcode, scaffold, strand, pos, ScaffoldGene_d):
    """
    Finds Genes in Which Barcode is located. Note we checked scaffold in ScaffoldGene_d
    
    Args:
        barcode: (str) 20 nucleotides ACTG
        scaffold: (str) Name of scaffold
        strand: (str) +/-
        pos: (int) Position of barcode within scaffold
        ScaffoldGene_d: (dict)
            scaffold (str) -> [{begin: int , end: int , strand: "+"/"-" , desc: (str), id: (str) }, {beg... }]

    Returns:
        genes_insertion_dict: "+" and "-" strands are optional keys.
            ["+"]: gene_id_dict (d) 
                gene_id -> bc_gene_info_d
                    bc_gene_info_d:
                        gene_pos_in_scaffold: (str) begin:end e.g. 2345:3456
                        bc_pos_within_gene: (int) location of barcode within the gene
                        gene_length: (int)
                        bc_loc_percent_within_gene: (float) Starting position of insertion within gene
                        gene_desc: (str) Description of Gene
            ["-"]: gene_id_dict (d) 
    """


    genes_insertion_dict = {"+":{}, "-":{}}

    # We previously checked if scaffold is indeed in ScaffoldGene_d 
    scaffold_gene_list = ScaffoldGene_d[scaffold]

    for gene_info in scaffold_gene_list:
        if pos >= gene_info["begin"] and pos <= gene_info["end"]:
            bc_gene_info_d = {
                "gene_pos_in_scaffold": str(gene_info["begin"]) + ":" + str(gene_info["end"]),
                "bc_pos_within_gene": pos - gene_info["begin"],
                "gene_length": gene_info["end"] - gene_info["begin"],
                "bc_loc_percent_within_gene": float(pos - gene_info["begin"])/\
                        float(gene_info["end"] - gene_info["begin"]),
                "gene_desc": gene_info["desc"]
            }
            genes_insertion_dict[gene_info["strand"]][gene_info["id"]] = bc_gene_info_d

    return genes_insertion_dict