Project: s41467-025-62292-x | Function: tab_to_wig (python)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** Implements the core transposon insertion quantification algorithm that converts raw sequencing read counts to insertion site densities by mapping reads to TA sites and accounting for sequencing orientation, enabling fitness analysis across different environmental conditions

**KEY TERMS:** {
  "tabular": "raw sequencing alignment data with read positions",
  "TAdict": "dictionary mapping TA site positions to insertion counts",
  "pos": "genomic position of sequencing reads",
  "info[4]": "forward strand read count",
  "info[5]": "reverse strand read count"
}

**CONTEXT CODE:** # Goal: Convert tabular files to wig files that can be used with the TRANSIT essential gene identification platform. 
# To run: python make_wigs.py TAList.txt data.tabular

import sys

def make_TAdict(TAfile):
	TAs = {}
	for line in open(TAfile,'r').readlines():
		if not line.startswith(';'):
			info = line.split('\t')
			pos = int(info[4])
			TAs[pos]=0
	return TAs

def tab_to_wig(tabular,TAdict):
	raise NotImplementedError("tab_to_wig function has been masked for testing purposes")
	
#RUN
#-------------------------
if __name__ == "__main__":
	TAs = make_TAdict(sys.argv[1])
	tab_to_wig(sys.argv[2],TAs)

Complete the function implementation replacing "raise NotImplementedError".