TreeSAK 1.7.4__tar.gz → 1.7.5__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 (35) hide show
  1. {TreeSAK-1.7.4/TreeSAK.egg-info → TreeSAK-1.7.5}/PKG-INFO +2 -2
  2. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/AssessMarkerPA.py +31 -2
  3. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/VERSION +1 -1
  4. {TreeSAK-1.7.4 → TreeSAK-1.7.5/TreeSAK.egg-info}/PKG-INFO +2 -2
  5. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/.gitignore +0 -0
  6. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/LICENSE +0 -0
  7. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/MANIFEST.in +0 -0
  8. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/README.md +0 -0
  9. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/AssessCVG.py +0 -0
  10. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/ConvertMSA.py +0 -0
  11. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/Marker2Tree.py +0 -0
  12. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/OneLineAln.py +0 -0
  13. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/SliceMSA.py +0 -0
  14. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/TreeSAK_config copy.py +0 -0
  15. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/TreeSAK_config.py +0 -0
  16. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/__init__.py +0 -0
  17. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/compare_trees.R +0 -0
  18. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/compare_trees.py +0 -0
  19. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/format_leaf_name.py +0 -0
  20. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/get_arCOG_seq.py +0 -0
  21. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/iTOL.py +0 -0
  22. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/parse_deltall_stdout.py +0 -0
  23. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/rename_leaves.py +0 -0
  24. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK/subset_tree.py +0 -0
  25. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK.egg-info/SOURCES.txt +0 -0
  26. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK.egg-info/dependency_links.txt +0 -0
  27. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK.egg-info/requires.txt +0 -0
  28. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/TreeSAK.egg-info/top_level.txt +0 -0
  29. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/bin/TreeSAK +0 -0
  30. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/bin/__init__.py +0 -0
  31. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/images/Bioinformatics.jpg +0 -0
  32. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/images/windows_cmds.docx +0 -0
  33. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/images/windows_cmds.pdf +0 -0
  34. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/setup.cfg +0 -0
  35. {TreeSAK-1.7.4 → TreeSAK-1.7.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.7.4
3
+ Version: 1.7.5
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -10,5 +10,5 @@ Keywords: Bioinformatics
10
10
  Platform: UNKNOWN
11
11
  License-File: LICENSE
12
12
 
13
- TreeSAK v1.7.4
13
+ TreeSAK v1.7.5
14
14
 
@@ -94,8 +94,9 @@ def AssessMarkerPA(args):
94
94
 
95
95
  # read in provided cutoffs
96
96
  present_pct_cutoff_list = [int(i) for i in cutoff_str.split('-')]
97
- assess_summary_1_txt = '%s/assessment_PA.txt' % op_dir
98
- assess_summary_2_txt = '%s/assessment_PA_summary.txt' % op_dir
97
+ assess_summary_1_txt = '%s/assessment_PA.txt' % op_dir
98
+ assess_summary_2_txt = '%s/assessment_PA_summary.txt' % op_dir
99
+ itol_binary_txt = '%s/assessment_PA_iTOL_binary.txt' % op_dir
99
100
 
100
101
  trimmed_aln_file_re = '%s/*.%s' % (trimmed_aln_dir, trimmed_aln_ext)
101
102
  trimmed_aln_file_list = [os.path.basename(file_name) for file_name in glob.glob(trimmed_aln_file_re)]
@@ -105,15 +106,24 @@ def AssessMarkerPA(args):
105
106
  assess_summary_2_txt_handle = open(assess_summary_2_txt, 'w')
106
107
  assess_summary_2_txt_handle.write('Marker\t%s\n' % '\t'.join([str(i) for i in present_pct_cutoff_list]))
107
108
  cutoff_to_qualified_marker_dict = dict()
109
+ gnm_to_identified_marker_dict = dict()
110
+ marker_id_list = []
108
111
  for each_aln in trimmed_aln_file_list:
109
112
 
110
113
  marker_id = each_aln.split(('.%s' % trimmed_aln_ext))[0]
114
+ marker_id_list.append(marker_id)
111
115
  pwd_aln = '%s/%s' % (trimmed_aln_dir, each_aln)
112
116
 
113
117
  current_marker_num_by_group_dict = dict()
114
118
  for each_seq in SeqIO.parse(pwd_aln, 'fasta'):
115
119
  gnm_id = each_seq.id
116
120
 
121
+ # get genome to marker dist
122
+ if gnm_id not in gnm_to_identified_marker_dict:
123
+ gnm_to_identified_marker_dict[gnm_id] = {marker_id}
124
+ else:
125
+ gnm_to_identified_marker_dict[gnm_id].add(marker_id)
126
+
117
127
  if gnm_id in gnm_to_group_dict:
118
128
  gnm_group = gnm_to_group_dict[gnm_id]
119
129
  else:
@@ -168,6 +178,25 @@ def AssessMarkerPA(args):
168
178
  cp_cmd = 'cp %s %s/' % (pwd_marker_aln, pwd_qualified_marker_dir)
169
179
  os.system(cp_cmd)
170
180
 
181
+ # write out iTOL file
182
+ itol_binary_txt_handle = open(itol_binary_txt, 'w')
183
+ itol_binary_txt_handle.write('DATASET_BINARY\nSEPARATOR TAB\nDATASET_LABEL\tlabel1\nCOLOR\t#85C1E9\n')
184
+ itol_binary_txt_handle.write('SHOW_LABELS\t1\nLABEL_ROTATION\t45\nLABEL_SHIFT\t5\n')
185
+ itol_binary_txt_handle.write('FIELD_LABELS\t%s\n' % '\t'.join(sorted(marker_id_list)))
186
+ itol_binary_txt_handle.write('FIELD_SHAPES\t%s\n' % '\t'.join(['1']*len(marker_id_list)))
187
+ itol_binary_txt_handle.write('\nDATA\n')
188
+ for each_g in gnm_to_identified_marker_dict:
189
+ g_identified_marker_set = gnm_to_identified_marker_dict[each_g]
190
+
191
+ pa_list = []
192
+ for each_m in sorted(marker_id_list):
193
+ if each_m in g_identified_marker_set:
194
+ pa_list.append('1')
195
+ else:
196
+ pa_list.append('-1')
197
+ itol_binary_txt_handle.write('%s\t%s\n' % (each_g, '\t'.join(pa_list)))
198
+ itol_binary_txt_handle.close()
199
+
171
200
  print('Assessment results exported to:\n%s\n%s' % (assess_summary_1_txt, assess_summary_2_txt))
172
201
  print('Done!')
173
202
 
@@ -1,4 +1,4 @@
1
- 1.7.4
1
+ 1.7.5
2
2
  - fixed bugs
3
3
 
4
4
  1.7.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.7.4
3
+ Version: 1.7.5
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -10,5 +10,5 @@ Keywords: Bioinformatics
10
10
  Platform: UNKNOWN
11
11
  License-File: LICENSE
12
12
 
13
- TreeSAK v1.7.4
13
+ TreeSAK v1.7.5
14
14
 
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