def depth_file_reader(depth_file):
<EOL>depth_dic_coverage = {}<EOL>for line in depth_file:<EOL><INDENT>tab_split = line.split()  <EOL>reference = "<STR_LIT:_>".join(tab_split[<NUM_LIT:0>].strip().split("<STR_LIT:_>")[<NUM_LIT:0>:<NUM_LIT:3>])  <EOL>position = tab_split[<NUM_LIT:1>]<EOL>num_reads_align = float(tab_split[<NUM_LIT:2>].rstrip())<EOL>if reference not in depth_dic_coverage:<EOL><INDENT>depth_dic_coverage[reference] = {}<EOL><DEDENT>depth_dic_coverage[reference][position] = num_reads_align<EOL><DEDENT>logger.info("<STR_LIT>")<EOL>depth_file.close()<EOL>logger.debug("<STR_LIT>".format(<EOL>asizeof(depth_dic_coverage)/<NUM_LIT>))<EOL>return depth_dic_coverage<EOL>
Function that parse samtools depth file and creates 3 dictionaries that
will be useful to make the outputs of this script, both the tabular file
and the json file that may be imported by pATLAS

Parameters
----------
depth_file: textIO
    the path to depth file for each sample

Returns
-------
depth_dic_coverage: dict
        dictionary with the coverage per position for each plasmid