11# %%
2- import os , sys , argparse
3- from time import gmtime , localtime
2+ import os
3+ import sys
4+ import argparse
5+ from time import localtime
46from time import strftime
57from datetime import datetime
68import pandas as pd
79import numpy as np
810import Bio .SeqIO as SeqIO
911import guacamole .library as lib
1012import matplotlib .pyplot as plt
11- import seaborn as sns
1213from math import floor
1314from numpy .random import uniform
14- from shutil import copyfile
15- import subprocess
16- import contextlib
17- import argparse
1815
1916
2017np .seterr (divide = 'ignore' , invalid = 'ignore' )
@@ -293,10 +290,6 @@ def main():
293290 time_start = strftime ("%m-%d-%Y %H:%M:%S" , localtime ())
294291 sys .stdout .write ("PROGRAM START TIME: " + time_start + '\n ' )
295292
296- lvl_dict = {'D' : 'domains' , 'P' : 'phylums' , 'O' : 'orders' , 'C' : 'classes' , 'F' : 'families' , 'G' : 'genuses' ,
297- 'S' : 'species' }
298- if level in lvl_dict :
299- abundance_lvl = lvl_dict [level ]
300293 branch = 0
301294 if len (level ) > 1 :
302295 branch = int (level [1 :])
@@ -312,7 +305,6 @@ def main():
312305 n_lvl_total = 0
313306 n_lvl_est = 0
314307 n_lvl_del = 0
315- lvl_nodes = []
316308 leaf_nodes = []
317309
318310 all_nodes = {}
@@ -334,10 +326,6 @@ def main():
334326 [name , taxid , level_num , level_id , all_reads , level_reads ] = report_vals
335327 total_reads += level_reads
336328 # Skip unclassified
337- if level_id == 'U' :
338- unclassified_line = line
339- u_reads = level_reads
340- continue
341329 # Tree Root
342330 if taxid == '1' :
343331 root_node = Tree (name , taxid , level_num , 'R' , all_reads , level_reads )
0 commit comments