TreeSAK 1.47.6__tar.gz → 1.47.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. {TreeSAK-1.47.6/TreeSAK.egg-info → TreeSAK-1.47.7}/PKG-INFO +2 -2
  2. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE.py +1 -1
  3. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/GeneTree.py +2 -2
  4. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PlotMcmcNode.py +31 -50
  5. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/VERSION +1 -1
  6. TreeSAK-1.47.7/TreeSAK/tmp_1.py +19 -0
  7. {TreeSAK-1.47.6 → TreeSAK-1.47.7/TreeSAK.egg-info}/PKG-INFO +2 -2
  8. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/bin/TreeSAK +1 -3
  9. TreeSAK-1.47.6/TreeSAK/tmp_1.py +0 -0
  10. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/LICENSE +0 -0
  11. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/MANIFEST.in +0 -0
  12. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/README.md +0 -0
  13. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE1.py +0 -0
  14. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE2.py +0 -0
  15. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE2RTC.py +0 -0
  16. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE3.py +0 -0
  17. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE4.py +0 -0
  18. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE5.py +0 -0
  19. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE6.py +0 -0
  20. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE7.py +0 -0
  21. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ALE_backup.py +0 -0
  22. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/AssessCVG.py +0 -0
  23. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/AssessMarker.py +0 -0
  24. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  25. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/AssessMarkerPA.py +0 -0
  26. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/AssessPB.py +0 -0
  27. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/BMGE.jar +0 -0
  28. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/BMGE.py +0 -0
  29. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/CompareMCMC.py +0 -0
  30. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ConcateMSA.py +0 -0
  31. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ConvertMSA.py +0 -0
  32. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/Dir.rb +0 -0
  33. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ExtractMarkerSeq.py +0 -0
  34. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/FastRoot.py +0 -0
  35. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/FastRoot_backup.py +0 -0
  36. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/FigTree.py +0 -0
  37. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/GTDB_tree.py +0 -0
  38. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/KEGG_Luo17.py +0 -0
  39. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/LcaToLeaves.py +0 -0
  40. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/MarkerRef2Tree.py +0 -0
  41. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  42. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/MarkerSeq2Tree.py +0 -0
  43. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/MarkerSeq2Tree_backup.py +0 -0
  44. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ModifyTopo.py +0 -0
  45. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/Newick_tree_plotter.py +0 -0
  46. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/OMA.py +0 -0
  47. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/OMA2.py +0 -0
  48. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/OneLineAln.py +0 -0
  49. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PB.py +0 -0
  50. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PMSF.py +0 -0
  51. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PhyloBiAssoc.R +0 -0
  52. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PhyloBiAssoc.py +0 -0
  53. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PlotMCMC.py +0 -0
  54. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/PlotMcmcNode_old.py +0 -0
  55. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/RootTree.py +0 -0
  56. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/RootTreeGTDB214.py +0 -0
  57. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/RootTreeGTDB220.py +0 -0
  58. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SequentialDating.py +0 -0
  59. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SingleAleHGT.py +0 -0
  60. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SingleLinePhy.py +0 -0
  61. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SliceMSA.py +0 -0
  62. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SplitScore.py +0 -0
  63. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SplitScore1.py +0 -0
  64. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SplitScore1OMA.py +0 -0
  65. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/SplitScore2.py +0 -0
  66. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/TaxaCountStats.R +0 -0
  67. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/TaxonTree.py +0 -0
  68. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/TreeSAK_config.py +0 -0
  69. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/VisHPD95.R +0 -0
  70. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/VisHPD95.py +0 -0
  71. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/__init__.py +0 -0
  72. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ale_parser.py +0 -0
  73. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/ale_splitter.py +0 -0
  74. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/alignment_pruner.pl +0 -0
  75. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/assessOG.py +0 -0
  76. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/catfasta2phy.py +0 -0
  77. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/cogTree.py +0 -0
  78. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/compare_trees.R +0 -0
  79. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/compare_trees.py +0 -0
  80. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/dating.py +0 -0
  81. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/dating_ss.py +0 -0
  82. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/deltall.py +0 -0
  83. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/do_rrtc.rb +0 -0
  84. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/fa2phy.py +0 -0
  85. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/format_leaf_name.py +0 -0
  86. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/gap_stats.py +0 -0
  87. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/get_SCG_tree.py +0 -0
  88. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/get_arCOG_seq.py +0 -0
  89. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/global_functions.py +0 -0
  90. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/gnm_leaves.py +0 -0
  91. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/iTOL.py +0 -0
  92. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/iTOL_gene_tree.py +0 -0
  93. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/keep_highest_rrtc.py +0 -0
  94. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/koTree.py +0 -0
  95. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/label_tree.R +0 -0
  96. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/label_tree.py +0 -0
  97. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/mad.py +0 -0
  98. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/mcmc2tree.py +0 -0
  99. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/mcmcTC copy.py +0 -0
  100. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/mcmcTC.py +0 -0
  101. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/merge_pdf.py +0 -0
  102. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/pRTC.py +0 -0
  103. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/phy2fa.py +0 -0
  104. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/plot_distruibution_th.py +0 -0
  105. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  106. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/print_leaves.py +0 -0
  107. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/pruneMSA.py +0 -0
  108. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/recode.py +0 -0
  109. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/remove_bias.R +0 -0
  110. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/rename_leaves.py +0 -0
  111. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/replace_clade.py +0 -0
  112. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/root_with_out_group.py +0 -0
  113. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  114. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/subsample_drep_gnms.py +0 -0
  115. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/subset.py +0 -0
  116. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  117. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/supertree.py +0 -0
  118. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK/weighted_rand.rb +0 -0
  119. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK.egg-info/SOURCES.txt +0 -0
  120. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK.egg-info/dependency_links.txt +0 -0
  121. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK.egg-info/requires.txt +0 -0
  122. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/TreeSAK.egg-info/top_level.txt +0 -0
  123. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/setup.cfg +0 -0
  124. {TreeSAK-1.47.6 → TreeSAK-1.47.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.47.6
3
+ Version: 1.47.7
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -24,4 +24,4 @@ Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
  Requires-Dist: dendropy
26
26
 
27
- TreeSAK v1.47.6
27
+ TreeSAK v1.47.7
@@ -5,7 +5,7 @@ ALE_usage = '''
5
5
  # ALE modules
6
6
  TreeSAK ALE1 -> Step 1: get gene tree
7
7
  TreeSAK ALE2 -> Step 2: run ALE
8
- TreeSAK ALE3 -> Step 3: parse ALE outputs (including ancestral genome reconstruction, gene family transfer propensity and verticality)
8
+ TreeSAK ALE3 -> Step 3: parse ALE outputs (ancestral genome reconstruction, transfer propensity/verticality and gain/loss)
9
9
  TreeSAK ALE4 -> Filter ALE identified HGTs
10
10
  TreeSAK ALE5 -> Get RTC file based on ALE detected HGTs
11
11
  TreeSAK SingleAleHGT -> Perform HGT analysis using ALE for single protein family
@@ -5,11 +5,11 @@ from distutils.spawn import find_executable
5
5
 
6
6
 
7
7
  GeneTree_usage = '''
8
- ================ GeneTree example commands ================
8
+ ============= GeneTree example commands =============
9
9
 
10
10
  TreeSAK GeneTree -i amoA.faa -o amoA_tree -t 36 -f
11
11
 
12
- ===========================================================
12
+ =====================================================
13
13
  '''
14
14
 
15
15
 
@@ -15,11 +15,11 @@ TreeSAK PlotMcmcNode -i McmcTree_op_files -n topo123_nodes.txt -o topo123_age.pd
15
15
  # column 2: node id
16
16
  # column 3: file name on the figure
17
17
  # column 4: node name on the figure
18
- topo1_clock3_mcmc t_n171 Topo1 Symbiosis_event_1
19
- topo1_clock3_mcmc t_n151 Topo1 Symbiosis_event_2
20
- topo1_clock3_mcmc t_n131 Topo1 Symbiosis_event_3
21
- topo2_clock3_mcmc t_n171 Topo2 Symbiosis_event_1
22
- topo2_clock3_mcmc t_n171 Topo3 Symbiosis_event_1
18
+ path/to/topo1_clock3_mcmc.txt t_n171 Topo1 Symbiosis_event_1
19
+ path/to/topo1_clock3_mcmc.txt t_n151 Topo1 Symbiosis_event_2
20
+ path/to/topo1_clock3_mcmc.txt t_n131 Topo1 Symbiosis_event_3
21
+ path/to/topo2_clock3_mcmc.txt t_n171 Topo2 Symbiosis_event_1
22
+ path/to/topo2_clock3_mcm.txtc t_n171 Topo3 Symbiosis_event_1
23
23
 
24
24
  ===================================================================================
25
25
  '''
@@ -69,73 +69,56 @@ def plot_distribution(df_txt, output_plot):
69
69
 
70
70
  def PlotMcmcNode(args):
71
71
 
72
- mcmc_in = args['i']
73
- mcmc_file_ext = args['x']
74
- node_txt = args['n']
75
- output_plot = args['o']
76
-
77
- # check MCMCTree output file/dir
78
- if os.path.isfile(mcmc_in) is True:
79
- mcmc_file_list = [mcmc_in]
80
- else:
81
- mcmc_file_re = '%s/*.%s' % (mcmc_in, mcmc_file_ext)
82
- mcmc_file_list = glob.glob(mcmc_file_re)
83
-
84
- if len(mcmc_file_list) == 0:
85
- print('mcmc file not found, program exited!')
86
- exit()
72
+ node_txt = args['i']
73
+ output_plot = args['o']
87
74
 
88
75
  if output_plot[-4:] not in ['.PDF', '.pdf']:
89
76
  output_plot = output_plot + '.pdf'
90
77
  op_df_tmp = output_plot + '.txt'
91
78
 
92
- mcmc_file_full_path_dict = dict()
93
- for each_mcmc_file in mcmc_file_list:
94
- mcmc_path, mcmc_base, mcmc_ext = sep_path_basename_ext(each_mcmc_file)
95
- mcmc_file_full_path_dict[mcmc_base] = each_mcmc_file
96
-
97
- # read in nodes to plot
79
+ # read in txt file
98
80
  file_to_node_dict = dict()
99
81
  file_rename_dict = dict()
100
82
  node_rename_dict = dict()
101
83
  not_found_file_set = set()
102
84
  for each_node in open(node_txt):
103
- each_node_split = each_node.strip().split()
104
- file_name = each_node_split[0]
105
- if '/' in file_name:
106
- file_name = file_name.split('/')[-1]
85
+ line_split = each_node.strip().split()
86
+ mcmc_file = line_split[0]
87
+ node_id = line_split[1]
107
88
 
108
- if file_name not in mcmc_file_full_path_dict:
109
- not_found_file_set.add(file_name)
89
+ if os.path.isfile(mcmc_file) is False:
90
+ not_found_file_set.add(mcmc_file)
110
91
 
111
- node_id = each_node_split[1]
112
- node_id_with_file_name = '%s_____%s' % (file_name, node_id)
92
+ _, mcmc_f_base, _ = sep_path_basename_ext(mcmc_file)
93
+ node_id_with_file_name = '%s_____%s' % (mcmc_file, node_id)
113
94
 
114
- if file_name not in file_to_node_dict:
115
- file_to_node_dict[file_name] = set()
116
- file_to_node_dict[file_name].add(node_id)
95
+ # get file_to_node_dict
96
+ if mcmc_file not in file_to_node_dict:
97
+ file_to_node_dict[mcmc_file] = set()
98
+ file_to_node_dict[mcmc_file].add(node_id)
117
99
 
118
- if len(each_node_split) >= 3:
119
- file_short_name = each_node_split[2]
120
- file_rename_dict[file_name] = file_short_name
100
+ # get file_rename_dict
101
+ if len(line_split) >= 3:
102
+ file_rename_on_plot = line_split[2]
103
+ file_rename_dict[mcmc_file] = file_rename_on_plot
121
104
 
122
- if len(each_node_split) == 4:
123
- node_desc = each_node_split[3]
124
- node_rename_dict[node_id_with_file_name] = node_desc
105
+ # get node_rename_dict
106
+ if len(line_split) == 4:
107
+ node_rename_on_plot = line_split[3]
108
+ node_rename_dict[node_id_with_file_name] = node_rename_on_plot
125
109
 
126
- # report not found files and exit
127
110
  if len(not_found_file_set) > 0:
128
- print('MCMC file not found, program exited!')
111
+ print('The following files not found program exited!')
112
+ print('\n'.join(sorted(list(not_found_file_set))))
129
113
  exit()
130
114
 
131
115
  found_matched_node = False
132
116
  op_df_tmp_handle = open(op_df_tmp, 'w')
133
117
  op_df_tmp_handle.write('Value,Node,Setting\n')
134
118
  for mcmc_file in file_to_node_dict:
135
- pwd_mcmc_file = mcmc_file_full_path_dict[mcmc_file]
136
119
  current_node_set = file_to_node_dict.get(mcmc_file, set())
137
120
  file_name_to_plot = file_rename_dict.get(mcmc_file, mcmc_file)
138
- mcmc_df = pd.read_table(pwd_mcmc_file, index_col=0)
121
+ mcmc_df = pd.read_table(mcmc_file, index_col=0)
139
122
  for each_col in mcmc_df:
140
123
  if each_col in current_node_set:
141
124
  node_desc_to_plot = node_rename_dict.get(('%s_____%s' % (mcmc_file, each_col)), each_col)
@@ -162,9 +145,7 @@ def PlotMcmcNode(args):
162
145
  if __name__ == '__main__':
163
146
 
164
147
  PlotMcmcNode_parser = argparse.ArgumentParser()
165
- PlotMcmcNode_parser.add_argument('-i', required=True, help='folder holds the *mcmc.txt files')
166
- PlotMcmcNode_parser.add_argument('-x', required=False, default='txt', help='file extension, default is txt')
167
- PlotMcmcNode_parser.add_argument('-n', required=True, help='nodes to plot')
148
+ PlotMcmcNode_parser.add_argument('-i', required=True, help='input txt file')
168
149
  PlotMcmcNode_parser.add_argument('-o', required=True, help='output plot')
169
150
  args = vars(PlotMcmcNode_parser.parse_args())
170
151
  PlotMcmcNode(args)
@@ -1,4 +1,4 @@
1
- 1.47.6
1
+ 1.47.7
2
2
  - fixed bugs
3
3
 
4
4
  1.47.0
@@ -0,0 +1,19 @@
1
+
2
+ def gene_gain_and_loss(TableEvents_tsv):
3
+
4
+ for each_line in open(TableEvents_tsv):
5
+ if not each_line.startswith('Family\tBranchType\tBranch'):
6
+ each_line_split = each_line.strip().split('\t')
7
+ protein_family_id = each_line_split[0]
8
+ node_id = each_line_split[2]
9
+ Losses = float(each_line_split[5])
10
+ Originations = float(each_line_split[6])
11
+ Extinctinonprob = float(each_line_split[9])
12
+
13
+ print('%s\t%s\t%s\t%s\t%s' % (protein_family_id, node_id, Losses, '', Extinctinonprob))
14
+
15
+
16
+ TableEvents_tsv = '/Users/songweizhi/Desktop/Sponge_r220/10_dRep95_255_ALE_wd/dRep95_255_ALE3_op_dir_80/TableEvents.tsv'
17
+
18
+ gene_gain_and_loss(TableEvents_tsv)
19
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.47.6
3
+ Version: 1.47.7
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -24,4 +24,4 @@ Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
  Requires-Dist: dendropy
26
26
 
27
- TreeSAK v1.47.6
27
+ TreeSAK v1.47.7
@@ -354,9 +354,7 @@ if __name__ == '__main__':
354
354
  elif sys.argv[1] == 'PlotMcmcNode':
355
355
  from TreeSAK import PlotMcmcNode
356
356
  PlotMcmcNode_parser = subparsers.add_parser('PlotMcmcNode', usage=PlotMcmcNode.PlotMcmcNode_usage)
357
- PlotMcmcNode_parser.add_argument('-i', required=True, help='folder holds the *mcmc.txt files')
358
- PlotMcmcNode_parser.add_argument('-x', required=False, default='txt', help='file extension, default is txt')
359
- PlotMcmcNode_parser.add_argument('-n', required=True, help='nodes to plot')
357
+ PlotMcmcNode_parser.add_argument('-i', required=True, help='input txt file')
360
358
  PlotMcmcNode_parser.add_argument('-o', required=True, help='output plot')
361
359
  args = vars(parser.parse_args())
362
360
  PlotMcmcNode.PlotMcmcNode(args)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes