def detect_flag(Flag):
    """
	identification of flag in BAM
		0 means unmapped read
		1 & 2 means primary mapping read with normal strand or reverse strand 
		3 & 4 means supplementary mapping read with normal strand or reverse strand
	"""
    Normal_foward = 1 >> 1
    Abnormal = 1 << 2
    Reverse_complement = 1 << 4
    Supplementary_map = 1 << 11
    signal = {Abnormal: 0, Normal_foward: 1, Reverse_complement: 2,
        Supplementary_map: 3, (Reverse_complement | Supplementary_map): 4}
    back_sig = signal[Flag] if Flag in signal else 0
    return back_sig
