TreeSAK 1.31.3__tar.gz → 1.31.4__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 (97) hide show
  1. {TreeSAK-1.31.3/TreeSAK.egg-info → TreeSAK-1.31.4}/PKG-INFO +2 -2
  2. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/PhyloBiAssoc.py +13 -7
  3. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/VERSION +1 -1
  4. TreeSAK-1.31.4/TreeSAK/tmp_4.py +0 -0
  5. {TreeSAK-1.31.3 → TreeSAK-1.31.4/TreeSAK.egg-info}/PKG-INFO +2 -2
  6. TreeSAK-1.31.3/TreeSAK/tmp_4.py +0 -58
  7. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/LICENSE +0 -0
  8. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/MANIFEST.in +0 -0
  9. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/README.md +0 -0
  10. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE.py +0 -0
  11. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE1.py +0 -0
  12. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE2.py +0 -0
  13. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE2RTC.py +0 -0
  14. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE3.py +0 -0
  15. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE4.py +0 -0
  16. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE5.py +0 -0
  17. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE6.py +0 -0
  18. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ALE_backup.py +0 -0
  19. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/AlignmentPruner.py +0 -0
  20. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/AssessCVG.py +0 -0
  21. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/AssessMarker.py +0 -0
  22. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  23. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/AssessMarkerPA.py +0 -0
  24. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/BMGE.jar +0 -0
  25. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/BMGE.py +0 -0
  26. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/CompareMCMC.py +0 -0
  27. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ConcateMSA.py +0 -0
  28. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ConvertMSA.py +0 -0
  29. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/Dating.py +0 -0
  30. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/Dir.rb +0 -0
  31. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ExtractMarkerSeq.py +0 -0
  32. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/FastRoot.py +0 -0
  33. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/FastRoot_backup.py +0 -0
  34. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/GTDB_tree.py +0 -0
  35. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/KEGG_Luo17.py +0 -0
  36. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/LcaToLeaves.py +0 -0
  37. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/MCMCtreeR.py +0 -0
  38. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/MarkerRef2Tree.py +0 -0
  39. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  40. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/MarkerSeq2Tree.py +0 -0
  41. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ModifyTopo.py +0 -0
  42. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/OMA.py +0 -0
  43. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/OMA2.py +0 -0
  44. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/OneLineAln.py +0 -0
  45. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/PMSF.py +0 -0
  46. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/PhyloBiAssoc.R +0 -0
  47. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/PlotMcmcNode.py +0 -0
  48. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/RootTree.py +0 -0
  49. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SequentialDating.py +0 -0
  50. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SingleAleHGT.py +0 -0
  51. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SingleLinePhy.py +0 -0
  52. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SliceMSA.py +0 -0
  53. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SplitScore.py +0 -0
  54. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SplitScore1.py +0 -0
  55. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SplitScore1OMA.py +0 -0
  56. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/SplitScore2.py +0 -0
  57. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/TaxaCountStats.R +0 -0
  58. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/TreeSAK_config.py +0 -0
  59. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/VisHPD95.R +0 -0
  60. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/VisHPD95.py +0 -0
  61. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/__init__.py +0 -0
  62. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ale_parser.py +0 -0
  63. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/ale_splitter.py +0 -0
  64. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/compare_trees.R +0 -0
  65. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/compare_trees.py +0 -0
  66. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/do_rrtc.rb +0 -0
  67. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/fa2phy.py +0 -0
  68. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/format_leaf_name.py +0 -0
  69. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/get_arCOG_seq.py +0 -0
  70. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/global_functions.py +0 -0
  71. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/gtdb_root.py +0 -0
  72. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/pRTC.py +0 -0
  73. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/parse_deltall_stdout.py +0 -0
  74. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/pb_mpi.py +0 -0
  75. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/plot_distruibution_th.py +0 -0
  76. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  77. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/print_leaves.py +0 -0
  78. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/rename_leaves.py +0 -0
  79. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/replace_clades.py +0 -0
  80. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/root_with_out_group.py +0 -0
  81. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  82. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/subsample_drep_gnms.py +0 -0
  83. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/subset_tree.py +0 -0
  84. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  85. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/test_1.py +0 -0
  86. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/test_2.py +0 -0
  87. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/tmp_1.py +0 -0
  88. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/tmp_2.py +0 -0
  89. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/tmp_3.py +0 -0
  90. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK/weighted_rand.rb +0 -0
  91. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK.egg-info/SOURCES.txt +0 -0
  92. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK.egg-info/dependency_links.txt +0 -0
  93. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK.egg-info/requires.txt +0 -0
  94. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/TreeSAK.egg-info/top_level.txt +0 -0
  95. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/bin/TreeSAK +0 -0
  96. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/setup.cfg +0 -0
  97. {TreeSAK-1.31.3 → TreeSAK-1.31.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.31.3
3
+ Version: 1.31.4
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -23,4 +23,4 @@ Requires-Dist: plotly
23
23
  Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
 
26
- TreeSAK v1.31.3
26
+ TreeSAK v1.31.4
@@ -63,11 +63,12 @@ def PhyloBiAssoc(args):
63
63
  current_script_path = '/'.join(pwd_current_script.split('/')[:-1])
64
64
  PhyloBiAssoc_R = '%s/PhyloBiAssoc.R' % current_script_path
65
65
 
66
- cmd_txt = '%s/cmds.txt' % op_dir
67
- df_subset_dir = '%s/df_subset' % op_dir
68
- stats_op_dir = '%s/stats_results' % op_dir
69
- combined_stats_txt = '%s/stats_results.txt' % op_dir
70
- combined_stats_txt_adjusted = '%s/stats_results_adjusted.txt' % op_dir
66
+ cmd_txt = '%s/cmds.txt' % op_dir
67
+ df_subset_dir = '%s/df_subset' % op_dir
68
+ stats_op_dir = '%s/stats_results' % op_dir
69
+ combined_stats_txt = '%s/stats_results_all.txt' % op_dir
70
+ combined_stats_txt_sig = '%s/stats_results_0.05.txt' % op_dir
71
+ combined_stats_txt_adjusted = '%s/stats_results_0.05_adjusted.txt' % op_dir
71
72
 
72
73
  # create op_dir
73
74
  if os.path.isdir(op_dir) is True:
@@ -94,8 +95,8 @@ def PhyloBiAssoc(args):
94
95
  op_stats_txt_set = set()
95
96
  for each_subset in subset_dict:
96
97
  cols_to_keep = subset_dict[each_subset]
97
- df_subset_file = '%s/%s.txt' % (df_subset_dir, each_subset)
98
- stats_out_txt = '%s/%s_stats.txt' % (stats_op_dir, each_subset)
98
+ df_subset_file = '%s/%s.tab' % (df_subset_dir, each_subset)
99
+ stats_out_txt = '%s/%s.txt' % (stats_op_dir, each_subset)
99
100
  subset_df(data_file, set(), cols_to_keep, '\t', 0, 0, df_subset_file)
100
101
  stats_cmd = 'Rscript %s -t %s -d %s > %s' % (PhyloBiAssoc_R, tree_file, df_subset_file, stats_out_txt)
101
102
  cmd_txt_handle.write(stats_cmd + '\n')
@@ -108,12 +109,15 @@ def PhyloBiAssoc(args):
108
109
  pool.map(os.system, stats_cmd_list)
109
110
  pool.close()
110
111
  pool.join()
112
+ #os.system('cp /Users/songweizhi/Documents/Research/Sponge/12_PhyloBiAssoc_wd/PhyloBiAssoc_wd_backup/stats_results/*.txt %s/' % stats_op_dir)
111
113
 
112
114
  # combine stats results
113
115
  sig_list_id = []
114
116
  sig_list_value = []
117
+
115
118
  combined_stats_txt_handle = open(combined_stats_txt, 'w')
116
119
  combined_stats_txt_handle.write('ID phylosig binaryPGLMM chisq.test coefficient significance\n')
120
+ combined_stats_txt_sig_handle = open(combined_stats_txt_sig, 'w')
117
121
  for each_file in sorted(list(op_stats_txt_set)):
118
122
  f_path, f_base, f_ext = sep_path_basename_ext(each_file)
119
123
  for each_line in open(each_file):
@@ -122,6 +126,7 @@ def PhyloBiAssoc(args):
122
126
  significance = each_line_split[5]
123
127
  combined_stats_txt_handle.write('%s\t%s\n' % (f_base, '\t'.join(each_line_split[1:])))
124
128
  if significance == 'y':
129
+ combined_stats_txt_sig_handle.write(f_base + '\n')
125
130
  sig_bi = each_line_split[2]
126
131
  sig_chi = each_line_split[3]
127
132
  current_sig = ''
@@ -132,6 +137,7 @@ def PhyloBiAssoc(args):
132
137
  sig_list_id.append(f_base)
133
138
  sig_list_value.append(float(current_sig))
134
139
  combined_stats_txt_handle.close()
140
+ combined_stats_txt_sig_handle.close()
135
141
 
136
142
  # perform Bonferroni correction
137
143
  sig_list_value_adjusted = list(multipletests(sig_list_value, alpha=0.1, method='bonferroni')[1])
@@ -1,4 +1,4 @@
1
- 1.31.3
1
+ 1.31.4
2
2
  - fixed bugs
3
3
 
4
4
  1.31.0
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.31.3
3
+ Version: 1.31.4
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -23,4 +23,4 @@ Requires-Dist: plotly
23
23
  Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
 
26
- TreeSAK v1.31.3
26
+ TreeSAK v1.31.4
@@ -1,58 +0,0 @@
1
- import os
2
- import glob
3
- from statsmodels.stats.multitest import multipletests
4
-
5
-
6
- def sep_path_basename_ext(file_in):
7
- f_path, file_name = os.path.split(file_in)
8
- if f_path == '':
9
- f_path = '.'
10
- f_base, f_ext = os.path.splitext(file_name)
11
- return f_path, f_base, f_ext
12
-
13
-
14
- ########################################################################################################################
15
-
16
- combined_stats_txt = '/Users/songweizhi/Documents/Research/Sponge/12_PhyloBiAssoc_wd/op_dir/combined_stats_demo.txt'
17
- combined_stats_txt_adjusted = '/Users/songweizhi/Documents/Research/Sponge/12_PhyloBiAssoc_wd/op_dir/combined_stats_demo_adjusted.txt'
18
-
19
- ########################################################################################################################
20
-
21
- file_re = '/Users/songweizhi/Documents/Research/Sponge/12_PhyloBiAssoc_wd/op_dir/stats_results/*.txt'
22
- file_list = glob.glob(file_re)
23
-
24
- # combine stats results
25
- sig_list_id = []
26
- sig_list_value = []
27
- combined_stats_txt_handle = open(combined_stats_txt, 'w')
28
- combined_stats_txt_handle.write('ID phylosig binaryPGLMM chisq.test coefficient significance\n')
29
- for each_file in sorted(file_list):
30
- f_path, f_base, f_ext = sep_path_basename_ext(each_file)
31
- for each_line in open(each_file):
32
- if not each_line.startswith('ID\tphylosig\tbinaryPGLMM\tchisq.test\tcoefficient'):
33
- each_line_split = each_line.strip().split('\t')
34
- significance = each_line_split[5]
35
- combined_stats_txt_handle.write('%s\t%s\n' % (f_base, '\t'.join(each_line_split[1:])))
36
- if significance == 'y':
37
- sig_bi = each_line_split[2]
38
- sig_chi = each_line_split[3]
39
- current_sig = ''
40
- if sig_bi == 'na':
41
- current_sig = sig_chi
42
- elif sig_chi == 'na':
43
- current_sig = sig_bi
44
- sig_list_id.append(f_base)
45
- sig_list_value.append(float(current_sig))
46
- combined_stats_txt_handle.close()
47
-
48
-
49
- # perform Bonferroni correction
50
- sig_list_value_adjusted = list(multipletests(sig_list_value, alpha=0.1, method='bonferroni')[1])
51
-
52
- # write out adjusted p values
53
- combined_stats_txt_adjusted_handle = open(combined_stats_txt_adjusted, 'w')
54
- combined_stats_txt_adjusted_handle.write('ID\tadjusted_p_value\n')
55
- for (id, adjusted_p) in zip(sig_list_id, sig_list_value_adjusted):
56
- if adjusted_p <= 0.05:
57
- combined_stats_txt_adjusted_handle.write('%s\t%s\n' % (id, adjusted_p))
58
- combined_stats_txt_adjusted_handle.close()
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