FunVIP 0.3.23.4__tar.gz → 0.3.24.1__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 (223) hide show
  1. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/PKG-INFO +2 -2
  2. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/SOURCES.txt +4 -0
  3. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/requires.txt +1 -1
  4. {funvip-0.3.23.4 → funvip-0.3.24.1}/PKG-INFO +2 -2
  5. {funvip-0.3.23.4 → funvip-0.3.24.1}/README.md +48 -86
  6. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/main.py +10 -5
  7. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/align.py +20 -0
  8. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/cluster.py +127 -95
  9. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/command.py +1 -1
  10. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/concatenate.py +30 -18
  11. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/dataset.py +13 -2
  12. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/hasher.py +32 -1
  13. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/initialize.py +2 -0
  14. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/reporter.py +1 -1
  15. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/save.py +9 -3
  16. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/search.py +19 -0
  17. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/tree.py +50 -0
  18. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/tree_interpretation.py +480 -294
  19. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/tree_interpretation_pipe.py +45 -18
  20. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/validate_input.py +964 -951
  21. funvip-0.3.24.1/funvip/src/visualize.py +573 -0
  22. funvip-0.3.24.1/funvip/test_dataset/sanghuangporus/DB/FunVIP_Sanghuangporus_db.xlsx +0 -0
  23. funvip-0.3.24.1/funvip/test_dataset/sanghuangporus/Query/FunVIP_Sanghuangporus_query.xlsx +0 -0
  24. funvip-0.3.24.1/funvip/test_dataset/sanghuangporus/preset.yaml +36 -0
  25. {funvip-0.3.23.4 → funvip-0.3.24.1}/pyproject.toml +2 -2
  26. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/dependency_links.txt +0 -0
  27. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/entry_points.txt +0 -0
  28. {funvip-0.3.23.4 → funvip-0.3.24.1}/FunVIP.egg-info/top_level.txt +0 -0
  29. {funvip-0.3.23.4 → funvip-0.3.24.1}/LICENSE +0 -0
  30. {funvip-0.3.23.4 → funvip-0.3.24.1}/MANIFEST.in +0 -0
  31. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/FunVIP_GUI.py +0 -0
  32. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/__init__.py +0 -0
  33. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/data/Option_manager.xlsx +0 -0
  34. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/data/__init__.py +0 -0
  35. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/data/genus_line.txt +0 -0
  36. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/Uninstall-ncbi-blast-2.12.0+.exe +0 -0
  37. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/blastn.exe +0 -0
  38. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/cleanup-blastdb-volumes.py +0 -0
  39. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/get_species_taxids.sh +0 -0
  40. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/legacy_blast.pl +0 -0
  41. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/makeblastdb.exe +0 -0
  42. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/nghttp2.dll +0 -0
  43. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/bin/update_blastdb.pl +0 -0
  44. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/BLAST_Windows/doc/README.txt +0 -0
  45. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/FastTree_Windows/FastTree.exe +0 -0
  46. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/Documentation/Gblocks_documentation.html +0 -0
  47. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/Gblocks.exe +0 -0
  48. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/cox2.pir +0 -0
  49. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/cytb.pir +0 -0
  50. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/nad3.pir +0 -0
  51. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/nad5.pir +0 -0
  52. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/nad3.pir +0 -0
  53. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/paths +0 -0
  54. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/MAFFT_LICENSE +0 -0
  55. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/MAFFT_Windows.zip +0 -0
  56. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/RAxML_Windows/GPL-3.0.txt +0 -0
  57. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/RAxML_Windows/README +0 -0
  58. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/RAxML_Windows/raxmlHPC-PTHREADS-AVX2.exe +0 -0
  59. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/__init__.py +0 -0
  60. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/bin/iqtree2-click.exe +0 -0
  61. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/bin/iqtree2.exe +0 -0
  62. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/bin/libiomp5md.dll +0 -0
  63. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/example.cf +0 -0
  64. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/example.nex +0 -0
  65. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/example.phy +0 -0
  66. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/iqtree/models.nex +0 -0
  67. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/LICENSE.md +0 -0
  68. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/README.md +0 -0
  69. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/busybox.exe +0 -0
  70. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cygbz2-1.dll +0 -0
  71. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cyggcc_s-seh-1.dll +0 -0
  72. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cyggomp-1.dll +0 -0
  73. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cygstdc++-6.dll +0 -0
  74. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cygwin1.dll +0 -0
  75. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/cygz.dll +0 -0
  76. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/bin/mmseqs.exe +0 -0
  77. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/examples/QUERY.fasta +0 -0
  78. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM10.out +0 -0
  79. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM100.out +0 -0
  80. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM110.out +0 -0
  81. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM120.out +0 -0
  82. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM130.out +0 -0
  83. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM140.out +0 -0
  84. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM150.out +0 -0
  85. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM160.out +0 -0
  86. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM170.out +0 -0
  87. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM180.out +0 -0
  88. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM190.out +0 -0
  89. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM20.out +0 -0
  90. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM30.out +0 -0
  91. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM40.out +0 -0
  92. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM50.out +0 -0
  93. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM60.out +0 -0
  94. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM70.out +0 -0
  95. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM80.out +0 -0
  96. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/PAM90.out +0 -0
  97. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML10.out +0 -0
  98. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML120.out +0 -0
  99. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML160.out +0 -0
  100. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML20.out +0 -0
  101. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML40.out +0 -0
  102. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/VTML80.out +0 -0
  103. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum100.out +0 -0
  104. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum30.out +0 -0
  105. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum35.out +0 -0
  106. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum40.out +0 -0
  107. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum45.out +0 -0
  108. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum50.out +0 -0
  109. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum55.out +0 -0
  110. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum60.out +0 -0
  111. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum62.out +0 -0
  112. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum65.out +0 -0
  113. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum70.out +0 -0
  114. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum75.out +0 -0
  115. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum80.out +0 -0
  116. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum85.out +0 -0
  117. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum90.out +0 -0
  118. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/blosum95.out +0 -0
  119. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/matrices/nucleotide.out +0 -0
  120. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/mmseqs.bat +0 -0
  121. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/mmseqs_Windows/util/bash-completion.sh +0 -0
  122. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/AUTHORS +0 -0
  123. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/CHANGELOG +0 -0
  124. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/LICENSE +0 -0
  125. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/README +0 -0
  126. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/bin/libgcc_s_dw2-1.dll +0 -0
  127. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/bin/libstdc++-6.dll +0 -0
  128. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/bin/trimal.exe +0 -0
  129. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/check_codon_alignments.py +0 -0
  130. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/compare_trimmed_msas.sh +0 -0
  131. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/generateRandomAlignmentsUsingAsSeedRealAlignments.py +0 -0
  132. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/generate_trimmed_msas.sh +0 -0
  133. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/get_sequence_representative_from_alignment.py +0 -0
  134. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/get_sequences_gaps_ratio.py +0 -0
  135. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/remove_shorter_sequences.py +0 -0
  136. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/selective_trimming_for_dNdS_analyses.based_neighbours.py +0 -0
  137. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/scripts/set_manual_boundaries.py +0 -0
  138. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/alignment.cpp +0 -0
  139. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/alignment.h +0 -0
  140. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/alignment.o +0 -0
  141. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/autAlignment.cpp +0 -0
  142. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/autAlignment.o +0 -0
  143. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.cpp +0 -0
  144. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.h +0 -0
  145. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.o +0 -0
  146. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/defines.h +0 -0
  147. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/main.cpp +0 -0
  148. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/makefile +0 -0
  149. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/makefile.MacOS +0 -0
  150. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/readAl.cpp +0 -0
  151. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/readal.exe +0 -0
  152. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/rwAlignment.cpp +0 -0
  153. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/rwAlignment.o +0 -0
  154. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.cpp +0 -0
  155. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.h +0 -0
  156. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.o +0 -0
  157. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.cpp +0 -0
  158. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.h +0 -0
  159. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.o +0 -0
  160. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statAl.cpp +0 -0
  161. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statal.exe +0 -0
  162. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.cpp +0 -0
  163. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.h +0 -0
  164. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.o +0 -0
  165. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsFiles.cpp +0 -0
  166. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsFiles.h +0 -0
  167. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.cpp +0 -0
  168. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.h +0 -0
  169. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.o +0 -0
  170. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/utils.cpp +0 -0
  171. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/utils.h +0 -0
  172. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/utils.o +0 -0
  173. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/external/trimal.v1.4/trimAl/source/values.h +0 -0
  174. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/preset/.gitignore +0 -0
  175. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/preset/accurate.yaml +0 -0
  176. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/preset/fast.yaml +0 -0
  177. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/.gitignore +0 -0
  178. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__init__.py +0 -0
  179. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/CATV_pipe.cpython-310.pyc +0 -0
  180. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/CAT_V.cpython-310.pyc +0 -0
  181. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/CAT_V.cpython-39.pyc +0 -0
  182. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/CAT_V_pipe.cpython-39.pyc +0 -0
  183. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/__init__.cpython-310.pyc +0 -0
  184. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/__init__.cpython-39.pyc +0 -0
  185. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/align.cpython-310.pyc +0 -0
  186. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/cluster.cpython-39.pyc +0 -0
  187. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/dataset.cpython-39.pyc +0 -0
  188. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/ext.cpython-310.pyc +0 -0
  189. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/ext.cpython-39.pyc +0 -0
  190. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/hasher.cpython-39.pyc +0 -0
  191. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/initialize.cpython-39.pyc +0 -0
  192. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/io.cpython-310.pyc +0 -0
  193. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/io.cpython-39.pyc +0 -0
  194. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/logger.cpython-39.pyc +0 -0
  195. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/modeltest.cpython-39.pyc +0 -0
  196. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/multigene.cpython-39.pyc +0 -0
  197. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/ncbi.cpython-39.pyc +0 -0
  198. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/opt_generator.cpython-39.pyc +0 -0
  199. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/reporter.cpython-39.pyc +0 -0
  200. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/search.cpython-39.pyc +0 -0
  201. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/tool.cpython-39.pyc +0 -0
  202. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/validation.cpython-39.pyc +0 -0
  203. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/__pycache__/visualize.cpython-39.pyc +0 -0
  204. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/ext.py +0 -0
  205. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/logger.py +0 -0
  206. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/logics.py +0 -0
  207. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/modeltest.py +0 -0
  208. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/ncbi.py +0 -0
  209. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/opt_generator.py +0 -0
  210. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/templates/template.html +0 -0
  211. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/tool.py +0 -0
  212. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/trim.py +0 -0
  213. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/validate_option.py +0 -0
  214. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/validation.py +0 -0
  215. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/src/version.py +0 -0
  216. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/penicillium/DB/DB_Penicillium.xlsx +0 -0
  217. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/penicillium/Options.config +0 -0
  218. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/penicillium/Query/Query.xlsx +0 -0
  219. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/penicillium/preset.yaml +0 -0
  220. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/terrei/DB/FunVIP_Aspergillus_db.xlsx +0 -0
  221. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/terrei/Query/FunVIP_Aspergillus_query.xlsx +0 -0
  222. {funvip-0.3.23.4 → funvip-0.3.24.1}/funvip/test_dataset/terrei/preset.yaml +0 -0
  223. {funvip-0.3.23.4 → funvip-0.3.24.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FunVIP
3
- Version: 0.3.23.4
3
+ Version: 0.3.24.1
4
4
  Summary: Fungal Validation & Identification Pipeline
5
5
  Author-email: Changwan Seo <wan101010@snu.ac.kr>
6
6
  License: GPL-3.0
@@ -28,4 +28,4 @@ Requires-Dist: unidecode==1.2.0
28
28
  Requires-Dist: xlrd==2.0.1
29
29
  Requires-Dist: xlsxwriter
30
30
  Requires-Dist: xmltodict==0.12.0
31
- Requires-Dist: PyQt5>=5.9.2; sys_platform != "darwin"
31
+ Requires-Dist: PyQt5>=5.15.0; sys_platform != "darwin"
@@ -182,6 +182,7 @@ funvip/src/validate_input.py
182
182
  funvip/src/validate_option.py
183
183
  funvip/src/validation.py
184
184
  funvip/src/version.py
185
+ funvip/src/visualize.py
185
186
  funvip/src/__pycache__/CATV_pipe.cpython-310.pyc
186
187
  funvip/src/__pycache__/CAT_V.cpython-310.pyc
187
188
  funvip/src/__pycache__/CAT_V.cpython-39.pyc
@@ -212,6 +213,9 @@ funvip/test_dataset/penicillium/Options.config
212
213
  funvip/test_dataset/penicillium/preset.yaml
213
214
  funvip/test_dataset/penicillium/DB/DB_Penicillium.xlsx
214
215
  funvip/test_dataset/penicillium/Query/Query.xlsx
216
+ funvip/test_dataset/sanghuangporus/preset.yaml
217
+ funvip/test_dataset/sanghuangporus/DB/FunVIP_Sanghuangporus_db.xlsx
218
+ funvip/test_dataset/sanghuangporus/Query/FunVIP_Sanghuangporus_query.xlsx
215
219
  funvip/test_dataset/terrei/preset.yaml
216
220
  funvip/test_dataset/terrei/DB/FunVIP_Aspergillus_db.xlsx
217
221
  funvip/test_dataset/terrei/Query/FunVIP_Aspergillus_query.xlsx
@@ -21,4 +21,4 @@ xlsxwriter
21
21
  xmltodict==0.12.0
22
22
 
23
23
  [:sys_platform != "darwin"]
24
- PyQt5>=5.9.2
24
+ PyQt5>=5.15.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FunVIP
3
- Version: 0.3.23.4
3
+ Version: 0.3.24.1
4
4
  Summary: Fungal Validation & Identification Pipeline
5
5
  Author-email: Changwan Seo <wan101010@snu.ac.kr>
6
6
  License: GPL-3.0
@@ -28,4 +28,4 @@ Requires-Dist: unidecode==1.2.0
28
28
  Requires-Dist: xlrd==2.0.1
29
29
  Requires-Dist: xlsxwriter
30
30
  Requires-Dist: xmltodict==0.12.0
31
- Requires-Dist: PyQt5>=5.9.2; sys_platform != "darwin"
31
+ Requires-Dist: PyQt5>=5.15.0; sys_platform != "darwin"
@@ -1,107 +1,52 @@
1
- [![DOI](https://zenodo.org/badge/588465720.svg)](https://zenodo.org/doi/10.5281/zenodo.10714946)
2
1
 
3
- #### This is Beta release. Bug reports are welcomed
4
-
5
- ## Scheduling
6
- ### Beta release part 1 (2023 Feburary ~ As paper published, ver 0.3)
7
- - Will be tested by our lab memebers to fix bugs and advance features
8
-
9
- ### Beta release part 2 (As paper published ~ When pipeline gets stabled, ver 0.4)
10
- - Will be tested by peer taxonomists
11
-
12
- ### Stable release (ver 1.0)
13
-
14
-
15
- # FunVIP
16
- "Fun"gal "V"alidation & "I"dentification "P"ipeline
17
-
18
- An automatic tree-based sequence identification and validation pipeline for fungal species
2
+ # FunVIP [![DOI](https://zenodo.org/badge/588465720.svg)](https://zenodo.org/doi/10.5281/zenodo.10714946)
3
+ ### **Fun**gal **V**alidation & **I**dentification **P**ipeline
4
+ #### An automatic tree-based sequence identification and validation pipeline for fungal (or maybe other) species
19
5
 
20
6
  - Automatic tree-based identification
21
7
  - Works with multigene
22
8
  - Data validation algorithm implemented
23
9
 
10
+ ![figure1 - ver17A](https://github.com/user-attachments/assets/22a50a62-14e8-41a7-87a0-8f5a1f9c3f62)
24
11
 
25
- ## See [tutorial](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/tutorial.md) for step by step tutorial
26
- ## See [documentation](https://github.com/Changwanseo/FunVIP/blob/main/Documentation.md) for advanced usage
27
-
12
+ This is Beta release. Bug reports are welcomed
13
+ <br><br/>
28
14
 
15
+ ## Tutorial
16
+ * [Part 1 - Getting started!](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/tutorial.md)
17
+ * [Part 2 - Preparing database and query](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/tutorial2.md)
18
+ * [Advacned tips](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/advanced.md)
19
+ <br><br/>
20
+ ## Documentation
21
+ * See [Documentation](https://github.com/Changwanseo/FunVIP/blob/main/Documentation.md) for advanced usage !
22
+ <br><br/>
29
23
  ## Requirements
30
- - Conda environment (See [https://www.anaconda.com/products/individual](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) for how to install conda environment)
31
-
32
- <!--
33
- ## Installation with conda (May not work with Linux or Mac)
34
- 1. ```conda create -n FunVO{ python=3.10```
35
- 2. ```conda activate FunVIP```
36
- 3. ```conda install -c cwseo FunVIP```
37
- 4. run ```FunVIP --test Terrei --email [your email] ``` to check installation
38
- If this one fails, use next one
39
- -->
24
+ - Conda environment
40
25
 
26
+ \* See [https://www.anaconda.com/products/individual](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) for how to install conda environment
27
+ <br><br/>
41
28
  ## Installation
42
- ### Windows
43
- 1. Install visual c++ [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
44
- 2. ```conda create -n FunVIP python>=3.8```
45
- 3. ```conda activate FunVIP```
46
- 4. ```pip install FunVIP```
47
- 5. run ```FunVIP --test Terrei --email [your email] ``` to check installation
48
-
49
- * For upgrade use this command
50
- ``` pip install FunVIP --upgrade ```
51
-
52
- ### Linux
53
- 1. ```conda create -n FunVIP python>=3.8```
54
- 2. ```conda activate FunVIP```
55
- 3. ```pip install FunVIP```
56
- 4. ```conda config --add channels conda-forge```
57
- 5. ```conda install -c bioconda raxml iqtree "modeltest-ng>=0.1.7" mmseqs2 "blast>=2.12" mafft trimal gblocks fasttree```
58
- 6. run ```FunVIP --test Terrei --email [your email] ``` to check installation
59
-
60
-
61
- * For intel mac system, this method probably work, but we couldn't test it because we don't have any intel mac device. We're looking for feedbacks in intel mac
62
-
63
- ### Apple Silicon Mac
64
- 1. ```CONDA_SUBDIR=osx-64 conda create -n FunVIP python>=3.8```
65
- 2. ```conda activate FunVIP```
66
- 3. ```conda config --env --set subdir osx-64```
67
- 4. ```conda install pyqt```
68
- 5. ```pip install FunVIP```
69
- 6. ```conda install -c bioconda raxml iqtree mmseqs2 "blast>=2.12" mafft trimal gblocks fasttree```
70
- 7. run ```FunVIP --test Terrei --email [your email] ``` to check installation
71
-
72
- ### Installation from source (For developers and core users)
73
- * this is for developmental steps
74
- 1. ```git clone https://github.com/Changwanseo/FunVIP.git```
75
- 2. Move to ```~/FunVIP```
76
- 3. ```conda create -n FunVIP python=3.10```
77
- 4. ```conda activate FunVIP```
78
- 5. ```pip install ./```
79
- 6. run ```FunVIP --test Terrei --email [your email]``` to check installation
80
-
81
-
29
+ * [Windows](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/installation.md##Windows)
30
+ * [Mac - apple silicon](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/installation.md##Apple )
31
+ * [Linux](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/installation.md##Linux)
32
+ * [from source](https://github.com/Changwanseo/FunVIP/blob/main/tutorial/installation.md##Installation)
33
+ <br><br/>
82
34
  ## Usage
83
35
  ```FunVIP --db {Your database file} --query {Your query file} --email {Your email} --gene {Your genes} --preset {fast or accurate}```
84
-
36
+ <br><br/>
85
37
  ### Example
86
- ```FunVIP --db Penicillium.xlsx --query Query.xlsx --email {Your email} --gene ITS BenA RPB2 CaM --preset fast```
87
-
38
+ ```FunVIP --db Penicillium.xlsx --query Query.xlsx --email {Your email} --thread 8 --gene ITS BenA RPB2 CaM --preset fast```
88
39
 
89
40
  \* See documentation for detailed usage
41
+ <br><br/>
90
42
 
91
43
 
92
44
 
93
- <!--### GUI mode (\*Currently under development)
94
- 1. Go to ~/FunID-dev
95
- 2. ```streamlit run FunID_GUI.py```
96
- * GUI run is on experimental
97
- * If you want to edit GUI options, edit ```Option_manager.xlsx``` and variables in ```FunID_GUI.py```
98
-
99
- ### Server mode (\* Currently under development)-->
100
45
 
101
46
 
102
47
 
103
48
  ## How to make database?
104
- ![Fig 2 Database and command configuration of FunID (ver2) ](https://github.com/Changwanseo/FunVIP/assets/64393882/9ba71eb9-91e9-4c0b-ac60-b9b7be993694)
49
+ ![figure1 - ver17B](https://github.com/user-attachments/assets/0043e6f6-7470-4c2b-bc96-b51f41c43ee4)
105
50
 
106
51
 
107
52
 
@@ -132,11 +77,28 @@ tabular (```.xlsx```, ```.csv```, ```.parquet```, ```.ftr```) form
132
77
  * ```/Tree/{section}_{gene}.svg``` : Final collapsed tree in svg format. Can be edited in vector graphics programs, or in powerpoint (by ungroup)
133
78
  * ```/Tree/{section}_{gene}_original.svg ``` : Uncollapsed tree for inspection
134
79
 
135
- ## How does FunVIP work?
136
- ![figure1 - ver4](https://github.com/Changwanseo/FunID/assets/64393882/6a366d32-6aaf-4d0c-8102-8c7dd5fda4c2)
137
-
80
+ ## Scheduling
81
+ 1. Beta release part 1 (2023 Feburary ~ As paper published, ver 0.3)
82
+ Will be tested by our lab memebers to fix bugs and advance features
83
+ 2. Beta release part 2 (As paper published ~ When pipeline gets stabled, ver 0.4)
84
+ Will be tested by peer taxonomists
85
+ 3. Stable release (ver 1.0)
138
86
 
87
+ ## License
88
+ [GPL 3.0](https://github.com/Changwanseo/FunVIP/blob/main/LICENSE)
139
89
 
140
90
 
141
- ## License
142
- GPL 3.0
91
+ <!--
92
+ ## Installation with conda (May not work with Linux or Mac)
93
+ 1. ```conda create -n FunVO{ python=3.10```
94
+ 2. ```conda activate FunVIP```
95
+ 3. ```conda install -c cwseo FunVIP```
96
+ 4. run ```FunVIP --test Terrei --email [your email] ``` to check installation
97
+ If this one fails, use next one
98
+ -->
99
+ <!--### GUI mode (\*Currently under development)
100
+ 1. Go to ~/FunID-dev
101
+ 2. ```streamlit run FunID_GUI.py```
102
+ * GUI run is on experimental
103
+ * If you want to edit GUI options, edit ```Option_manager.xlsx``` and variables in ```FunID_GUI.py```
104
+ ### Server mode (\* Currently under development)-->
@@ -52,9 +52,9 @@ def main():
52
52
  # Argument parsing in commandline mode
53
53
  args = CommandParser().get_args()
54
54
 
55
- ############################################################################
56
- # Start of initializing blocks should not be moved for function!!! #
57
- ############################################################################
55
+ #############################################################################
56
+ # Start of initializing blocks should not be moved for function!!! #
57
+ #############################################################################
58
58
 
59
59
  # initialize working directories, and opts
60
60
  opt, path, list_info, list_warning, list_error = initialize.initialize(
@@ -121,7 +121,6 @@ def main():
121
121
  )
122
122
 
123
123
  # logging works well from here
124
-
125
124
  save.save_session(opt=opt, path=path, global_var=locals(), var=vars())
126
125
 
127
126
  time_setup = time()
@@ -173,7 +172,7 @@ def main():
173
172
  V.generate_dataset(opt)
174
173
 
175
174
  # Appending outgroup
176
- logging.info("Appending outgroup")
175
+ logging.info("APPENDING OUTGROUP")
177
176
  # For non-concatenated outgroup
178
177
  # ready for multiprocessing run
179
178
  # Pushing all v to multiprocessing requires too much memory
@@ -181,6 +180,7 @@ def main():
181
180
 
182
181
  # remove invalid dataset from downstream analysis
183
182
  V.remove_invalid_dataset()
183
+
184
184
  # Save dataset to outgroups
185
185
  V.save_dataset(path, opt)
186
186
 
@@ -316,6 +316,11 @@ def main():
316
316
  # Running visualization
317
317
  V, path, opt = tree_interpretation_pipe.pipe_tree_interpretation(V, path, opt)
318
318
 
319
+ """
320
+ # For final visualization
321
+ V, path, opt = visualize.visualize(V, path, opt)
322
+ """
323
+
319
324
  # move tree image files
320
325
  tool.cleanup_tree(path)
321
326
  tool.cleanup_tree_image(path)
@@ -4,6 +4,7 @@ import logging
4
4
  from Bio import SeqIO
5
5
  import multiprocessing as mp
6
6
  import math
7
+ import os
7
8
 
8
9
 
9
10
  # Each module to be run in alignment multiprocessing
@@ -50,6 +51,25 @@ def module_alignment(
50
51
  def pipe_alignment(V, path, opt):
51
52
  alignment_opt = opt_generator(V, opt, path, step="alignment")
52
53
 
54
+ # Before running alignment, clear previous files
55
+ for file in os.listdir(path.out_alignment):
56
+ if any(file.endswith(x) for x in [".fasta", ".partition", ".colnumbering"]):
57
+ os.remove(
58
+ f"{path.out_alignment}/{file}",
59
+ )
60
+
61
+ for file in os.listdir(f"{path.out_alignment}/failed/"):
62
+ if any(file.endswith(x) for x in [".fasta", ".partition", ".colnumbering"]):
63
+ os.remove(
64
+ f"{path.out_alignment}/failed/{file}",
65
+ )
66
+
67
+ for file in os.listdir(f"{path.out_alignment}/hash/"):
68
+ if any(file.endswith(x) for x in [".fasta", ".partition", ".colnumbering"]):
69
+ os.remove(
70
+ f"{path.out_alignment}/hash/{file}",
71
+ )
72
+
53
73
  # Multiprocessing start
54
74
  # Thread optimizations
55
75
  # Using O(N^2L^2) of MAFFT-G-ins-i
@@ -6,6 +6,7 @@ import os, sys, subprocess
6
6
  from copy import deepcopy
7
7
  from functools import lru_cache
8
8
  from time import sleep
9
+ from time import time
9
10
 
10
11
  # from Bio.Blast import NCBIXML
11
12
  from Bio import SeqIO
@@ -14,6 +15,23 @@ import logging
14
15
  import gc
15
16
  from funvip.src.ext import mmseqs
16
17
 
18
+ import sys
19
+
20
+
21
+ def cluster_unpack(args):
22
+ return cluster(*args)
23
+
24
+
25
+ def batched_generator(generator, batch_size):
26
+ batch = []
27
+ for item in generator:
28
+ batch.append(item)
29
+ if len(batch) == batch_size:
30
+ yield batch
31
+ batch = []
32
+ if batch:
33
+ yield batch
34
+
17
35
 
18
36
  # return list of original group of given FI
19
37
  def get_naive_group(V):
@@ -29,6 +47,8 @@ def append_query_group(V):
29
47
 
30
48
  V.cSR["query_group"] = V.cSR["qseqid"].apply(lambda x: group_dict.get(x))
31
49
 
50
+ logging.debug(V.cSR["query_group"])
51
+
32
52
  # Indicate queries without any corresponding group
33
53
  for FI in V.list_FI:
34
54
  if FI.adjusted_group == "" and not ("noseq" in FI.issues):
@@ -94,93 +114,77 @@ def assign_gene(result_dict, V, cutoff=0.99):
94
114
  return V
95
115
 
96
116
 
97
- # cluster each of FI object and assign group
98
- def cluster(FI, V, path, opt):
99
- list_group = deepcopy(V.list_group)
117
+ def cluster(FI, V_list_group, V_cSR, path, opt):
118
+ # Reduce memory by focusing on relevant rows
119
+ df_search = V_cSR[V_cSR["qseqid"] == FI.hash]
100
120
 
101
- # Reduce search df space by selecting only FI related ones
102
- df_group = V.cSR.groupby(V.cSR["qseqid"])
103
- list_id = list(set(V.cSR["qseqid"]))
104
- df_search = df_group.get_group(FI.hash)
105
-
106
- # delete V to reduce memory assumption
107
- del V
108
- gc.collect()
109
-
110
- # If no evidence available, return it
111
- if df_search is None:
112
- # if confident is True, no adjusted_group for db is normal situation
121
+ if df_search.empty:
122
+ # If confident is False and FI datatype is "db"
113
123
  if opt.confident is False and FI.datatype is "db":
114
124
  logging.warning(f"No adjusted_group assigned to {FI}")
115
125
  FI.adjusted_group = FI.group
116
- return FI, None
126
+ return FI
117
127
 
118
- # for db sequence with group, retain it
119
- elif not (FI.group == "") and FI.datatype == "db": # or type(FI.group) != str):
128
+ # For db sequence with group, retain it
129
+ elif not (FI.group == "") and FI.datatype == "db":
120
130
  FI.adjusted_group = FI.group
121
- return FI, FI.adjusted_group
131
+ return FI
122
132
 
123
- # update group if sequence does not have group
133
+ # Update group if sequence doesn't have one
124
134
  else:
125
- # sorting has peformed after split for better performance
126
- sorted_df_search = df_search.sort_values(by=["bitscore"], ascending=False)
127
- # reset index to easily get maximum
128
- sorted_df_search.reset_index(inplace=True, drop=True)
129
- # get result stasifies over cutoff
130
- cutoff_df = sorted_df_search[
131
- sorted_df_search["bitscore"]
132
- > sorted_df_search["bitscore"][0] * opt.cluster.cutoff
133
- ]
134
-
135
- # Garbage collection
135
+ df_search = df_search.sort_values(by=["bitscore"], ascending=False)
136
+
137
+ # Apply cutoff filter to reduce DataFrame size
138
+ cutoff = df_search["bitscore"].iloc[0] * opt.cluster.cutoff
139
+ cutoff_df = df_search[df_search["bitscore"] > cutoff]
140
+
141
+ # Clear unused data
136
142
  del df_search
137
- del sorted_df_search
138
143
  gc.collect()
139
144
 
140
- group_count = len(set(cutoff_df["subject_group"]))
141
- list_group = list(set(cutoff_df["subject_group"]))
145
+ # Extract group information
146
+ unique_groups = set(cutoff_df["subject_group"])
147
+ group_count = len(unique_groups)
142
148
 
143
- # if first time of group update
144
- if FI.adjusted_group == "" or FI.adjusted_group == "":
145
- # if only 1 group available, take it
146
- if group_count == 1:
147
- FI.adjusted_group = list_group[0]
148
- # if no group matched, warn it
149
- elif group_count == 0:
150
- logging.warning(
151
- f"Query seq in {FI.id} cannot be assigned to group. Check sequence"
152
- )
153
- elif group_count >= 2:
154
- logging.warning(
155
- f"Query seq in {FI.id} has multiple matches to group, {list_group}."
156
- )
157
- FI.adjusted_group = list_group[0]
158
- else:
159
- logging.error("DEVELOPMENTAL ERROR IN GROUP ASSIGN")
160
- raise Exception
149
+ if FI.adjusted_group == "":
150
+ if group_count == 1:
151
+ FI.adjusted_group = unique_groups.pop()
152
+ elif group_count == 0:
153
+ logging.warning(
154
+ f"Query seq in {FI.id} cannot be assigned to group. Check sequence."
155
+ )
156
+ elif group_count >= 2:
157
+ logging.warning(
158
+ f"Query seq in {FI.id} has multiple matches to groups: {list(unique_groups)}"
159
+ )
160
+ FI.adjusted_group = next(
161
+ iter(unique_groups)
162
+ ) # Pick one (deterministic for testing)
163
+ else:
164
+ logging.error("DEVELOPMENTAL ERROR IN GROUP ASSIGN")
165
+ raise Exception
161
166
 
162
- logging.info(f"{FI.id} has clustered to {FI.adjusted_group}")
167
+ logging.info(f"{FI.id} has clustered to {FI.adjusted_group}")
163
168
 
164
- # if group already updated
165
- else:
166
- if not (FI.adjusted_group == ""):
167
- if not (FI.adjusted_group in list_group):
168
- logging.warning(f"Clustering result colliding in {FI.id}")
169
+ # if group already updated
170
+ else:
171
+ if not (FI.adjusted_group in unique_groups):
172
+ logging.warning(f"Clustering result collides for {FI.id}")
169
173
 
170
- if len(list_group) > 0:
171
- return FI, list_group[0]
172
- else:
173
- return FI, None
174
+ if unique_groups:
175
+ return FI
176
+ else:
177
+ return FI
174
178
 
175
179
 
176
180
  ### Append outgroup to given group-gene dataset by search matrix
177
- def append_outgroup(V, df_search, gene, group, path, opt):
181
+ def append_outgroup(V_list_FI, df_search, gene, group, path, opt):
178
182
  logging.info(f"Appending outgroup on group: {group}, Gene: {gene}")
179
- list_FI = deepcopy(V.list_FI)
183
+ list_FI = V_list_FI
180
184
 
181
185
  # In multiprocessing, delete V to reduce memory consumption
182
- del V
183
- gc.collect()
186
+ # del V
187
+ # gc.collect()
184
188
 
185
189
  # ready for by sseqid hash, which group to append
186
190
  # this time, append adjusted group
@@ -336,6 +340,8 @@ def append_outgroup(V, df_search, gene, group, path, opt):
336
340
 
337
341
 
338
342
  def group_cluster_opt_generator(V, opt, path):
343
+ # opt_cluster = []
344
+
339
345
  # cluster(FO, df_search, V, path, opt)
340
346
  if len(V.list_qr_gene) == 0:
341
347
  logging.error(
@@ -345,13 +351,24 @@ def group_cluster_opt_generator(V, opt, path):
345
351
 
346
352
  # For concatenated analysis
347
353
  else:
348
- # cluster group by concatenated search result
349
- list_id = list(set(V.cSR["qseqid"]))
350
- for FI in V.list_FI:
351
- if FI.hash in list_id:
352
- V.opt_cluster.append((FI, V, path, opt))
353
-
354
- return V
354
+ # Use a set for faster membership testing
355
+ set_id = set(V.cSR["qseqid"])
356
+
357
+ # Pre-select the relevant DataFrame slice once
358
+ cSR_subset = V.cSR[["qseqid", "bitscore", "subject_group"]]
359
+
360
+ # Filter `V.list_FI` to relevant entries
361
+ relevant_FIs = (FI for FI in V.list_FI if FI.hash in set_id)
362
+
363
+ # Yield results as a generator
364
+ for FI in relevant_FIs:
365
+ yield (
366
+ FI,
367
+ V.list_group, # Assuming V.list_group is small and static
368
+ cSR_subset, # Pre-selected DataFrame slice
369
+ path,
370
+ opt,
371
+ )
355
372
 
356
373
 
357
374
  # opts ready for multithreading in outgroup append
@@ -371,7 +388,9 @@ def outgroup_append_opt_generator(V, path, opt):
371
388
  df_group_ = df_group.get_group(group)
372
389
  # Generating outgroup opt for multiprocessing
373
390
  for gene in V.dict_dataset[group]:
374
- opt_append_outgroup.append((V, df_group_, gene, group, path, opt))
391
+ opt_append_outgroup.append(
392
+ (V.list_FI, df_group_, gene, group, path, opt)
393
+ )
375
394
 
376
395
  except:
377
396
  logging.warning(
@@ -387,38 +406,58 @@ def pipe_cluster(V, opt, path):
387
406
  if opt.method.search in ("blast", "mmseqs"):
388
407
  logging.info("group clustering")
389
408
 
409
+ rslt_cluster = []
410
+
390
411
  # cluster opt generation for multiprocessing
391
412
  # (FI, V, path, opt)
392
- V = group_cluster_opt_generator(V, opt, path)
413
+ opt_cluster = group_cluster_opt_generator(V, opt, path)
414
+
415
+ # print(f"opt_cluster : {sys.getsizeof(opt_cluster)}")
416
+
417
+ batch_size = opt.thread * 100
418
+ opt_cluster_batches = batched_generator(opt_cluster, batch_size)
393
419
 
394
420
  # run multiprocessing start
395
421
  if opt.verbose < 3:
396
- p = mp.Pool(opt.thread)
397
- V.rslt_cluster = p.starmap(cluster, V.opt_cluster)
398
- p.close()
399
- p.join()
422
+ for batch in opt_cluster_batches:
423
+ batch_list = list(batch)
424
+
425
+ with mp.Pool(opt.thread) as p:
426
+ rslt_cluster.extend(p.starmap(cluster, batch_list))
427
+
400
428
  else:
401
429
  # non-multithreading mode for debugging
402
- V.rslt_cluster = [cluster(*o) for o in V.opt_cluster]
430
+ rslt_cluster = [cluster(*o) for o in opt_cluster]
403
431
  # gather cluster result
404
- for cluster_result in V.rslt_cluster:
405
- FI = cluster_result[0]
432
+ for cluster_result in rslt_cluster:
433
+ FI = cluster_result
406
434
  logging.debug((FI.id, FI.datatype, FI.group, FI.adjusted_group))
407
435
 
408
436
  # replace group assigning result
409
437
  # collect FI from cluster result
410
- replace_FI = [r[0] for r in V.rslt_cluster]
438
+ # somethings been duplicated here
439
+ replace_FI = [r for r in rslt_cluster]
440
+
411
441
  # collect hash
412
442
  replace_hash_FI = [FI.hash for FI in replace_FI]
443
+
413
444
  # maintain not clustered result and append clustered result
414
- V.list_FI = [
415
- FI for FI in V.list_FI if not (FI.hash in replace_hash_FI)
416
- ] + replace_FI
445
+ V.list_FI = [FI for FI in V.list_FI if not (FI.hash in replace_hash_FI)]
446
+ V.list_FI += replace_FI
447
+
417
448
  # For syncyhronizing FI in dict_hash_FI to prevent error
418
449
  for FI in replace_FI:
419
450
  V.dict_hash_FI[FI.hash] = FI
420
451
 
421
- V.list_group = list(set([r[1] for r in V.rslt_cluster if (not (r[1] is None))]))
452
+ V.list_group = list(
453
+ set(
454
+ [
455
+ r.adjusted_group
456
+ for r in rslt_cluster
457
+ if (not (r.adjusted_group == ""))
458
+ ]
459
+ )
460
+ )
422
461
 
423
462
  if opt.queryonly is True:
424
463
  for FI in V.list_FI:
@@ -429,6 +468,7 @@ def pipe_cluster(V, opt, path):
429
468
  for FI in V.list_FI:
430
469
  V.dict_hash_FI[FI.hash] = FI
431
470
 
471
+ # For debugging
432
472
  for FI in V.list_FI:
433
473
  logging.debug((FI.id, FI.datatype, FI.group, FI.adjusted_group))
434
474
 
@@ -488,14 +528,6 @@ def pipe_append_outgroup(V, path, opt):
488
528
  V.dict_dataset[group][gene].list_db_FI += ambiguous_group
489
529
  # Add outgroup and db in to dict_hash_FI
490
530
 
491
- # Should find out why this does not work at the end
492
- """
493
- for FI in outgroup + ambiguous_group:
494
- # If already in dict_hash_FI, they have priority
495
- if not (FI.hash in V.dict_hash_FI):
496
- V.dict_hash_FI[FI.hash] = FI
497
- """
498
-
499
531
  groups = deepcopy(list(V.dict_dataset.keys()))
500
532
 
501
533
  for group in groups:
@@ -54,7 +54,7 @@ class CommandParser:
54
54
  )
55
55
  group_test.add_argument(
56
56
  "--test",
57
- help="Use test dataset, [Penicillium]",
57
+ help="Use test dataset, [Penicillium, Terrei, Sanghuangporus]",
58
58
  type=str,
59
59
  )
60
60