FunVIP 0.3.23.4__tar.gz → 0.3.24__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}/FunVIP.egg-info/PKG-INFO +2 -2
  2. {funvip-0.3.23.4 → funvip-0.3.24}/FunVIP.egg-info/SOURCES.txt +4 -0
  3. {funvip-0.3.23.4 → funvip-0.3.24}/FunVIP.egg-info/requires.txt +1 -1
  4. {funvip-0.3.23.4 → funvip-0.3.24}/PKG-INFO +2 -2
  5. {funvip-0.3.23.4 → funvip-0.3.24}/README.md +48 -86
  6. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/main.py +7 -2
  7. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/align.py +20 -0
  8. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/cluster.py +120 -27
  9. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/command.py +1 -1
  10. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/concatenate.py +30 -18
  11. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/dataset.py +13 -2
  12. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/initialize.py +2 -0
  13. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/reporter.py +1 -1
  14. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/save.py +9 -3
  15. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/search.py +19 -0
  16. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/tree.py +50 -0
  17. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/tree_interpretation.py +477 -294
  18. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/tree_interpretation_pipe.py +3 -3
  19. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/validate_input.py +964 -951
  20. funvip-0.3.24/funvip/src/visualize.py +573 -0
  21. funvip-0.3.24/funvip/test_dataset/sanghuangporus/DB/FunVIP_Sanghuangporus_db.xlsx +0 -0
  22. funvip-0.3.24/funvip/test_dataset/sanghuangporus/Query/FunVIP_Sanghuangporus_query.xlsx +0 -0
  23. funvip-0.3.24/funvip/test_dataset/sanghuangporus/preset.yaml +36 -0
  24. {funvip-0.3.23.4 → funvip-0.3.24}/pyproject.toml +2 -2
  25. {funvip-0.3.23.4 → funvip-0.3.24}/FunVIP.egg-info/dependency_links.txt +0 -0
  26. {funvip-0.3.23.4 → funvip-0.3.24}/FunVIP.egg-info/entry_points.txt +0 -0
  27. {funvip-0.3.23.4 → funvip-0.3.24}/FunVIP.egg-info/top_level.txt +0 -0
  28. {funvip-0.3.23.4 → funvip-0.3.24}/LICENSE +0 -0
  29. {funvip-0.3.23.4 → funvip-0.3.24}/MANIFEST.in +0 -0
  30. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/FunVIP_GUI.py +0 -0
  31. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/__init__.py +0 -0
  32. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/data/Option_manager.xlsx +0 -0
  33. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/data/__init__.py +0 -0
  34. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/data/genus_line.txt +0 -0
  35. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/Uninstall-ncbi-blast-2.12.0+.exe +0 -0
  36. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/blastn.exe +0 -0
  37. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/cleanup-blastdb-volumes.py +0 -0
  38. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/get_species_taxids.sh +0 -0
  39. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/legacy_blast.pl +0 -0
  40. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/makeblastdb.exe +0 -0
  41. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/nghttp2.dll +0 -0
  42. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/bin/update_blastdb.pl +0 -0
  43. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/BLAST_Windows/doc/README.txt +0 -0
  44. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/FastTree_Windows/FastTree.exe +0 -0
  45. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/Documentation/Gblocks_documentation.html +0 -0
  46. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/Gblocks.exe +0 -0
  47. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/cox2.pir +0 -0
  48. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/cytb.pir +0 -0
  49. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/nad3.pir +0 -0
  50. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/more_alignments/nad5.pir +0 -0
  51. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/nad3.pir +0 -0
  52. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/Gblocks_Windows_0.91b/Gblocks_0.91b/paths +0 -0
  53. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/MAFFT_LICENSE +0 -0
  54. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/MAFFT_Windows.zip +0 -0
  55. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/RAxML_Windows/GPL-3.0.txt +0 -0
  56. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/RAxML_Windows/README +0 -0
  57. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/RAxML_Windows/raxmlHPC-PTHREADS-AVX2.exe +0 -0
  58. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/__init__.py +0 -0
  59. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/bin/iqtree2-click.exe +0 -0
  60. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/bin/iqtree2.exe +0 -0
  61. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/bin/libiomp5md.dll +0 -0
  62. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/example.cf +0 -0
  63. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/example.nex +0 -0
  64. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/example.phy +0 -0
  65. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/iqtree/models.nex +0 -0
  66. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/LICENSE.md +0 -0
  67. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/README.md +0 -0
  68. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/busybox.exe +0 -0
  69. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cygbz2-1.dll +0 -0
  70. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cyggcc_s-seh-1.dll +0 -0
  71. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cyggomp-1.dll +0 -0
  72. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cygstdc++-6.dll +0 -0
  73. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cygwin1.dll +0 -0
  74. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/cygz.dll +0 -0
  75. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/bin/mmseqs.exe +0 -0
  76. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/examples/QUERY.fasta +0 -0
  77. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM10.out +0 -0
  78. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM100.out +0 -0
  79. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM110.out +0 -0
  80. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM120.out +0 -0
  81. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM130.out +0 -0
  82. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM140.out +0 -0
  83. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM150.out +0 -0
  84. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM160.out +0 -0
  85. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM170.out +0 -0
  86. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM180.out +0 -0
  87. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM190.out +0 -0
  88. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM20.out +0 -0
  89. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM30.out +0 -0
  90. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM40.out +0 -0
  91. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM50.out +0 -0
  92. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM60.out +0 -0
  93. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM70.out +0 -0
  94. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM80.out +0 -0
  95. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/PAM90.out +0 -0
  96. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML10.out +0 -0
  97. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML120.out +0 -0
  98. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML160.out +0 -0
  99. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML20.out +0 -0
  100. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML40.out +0 -0
  101. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/VTML80.out +0 -0
  102. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum100.out +0 -0
  103. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum30.out +0 -0
  104. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum35.out +0 -0
  105. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum40.out +0 -0
  106. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum45.out +0 -0
  107. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum50.out +0 -0
  108. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum55.out +0 -0
  109. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum60.out +0 -0
  110. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum62.out +0 -0
  111. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum65.out +0 -0
  112. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum70.out +0 -0
  113. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum75.out +0 -0
  114. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum80.out +0 -0
  115. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum85.out +0 -0
  116. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum90.out +0 -0
  117. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/blosum95.out +0 -0
  118. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/matrices/nucleotide.out +0 -0
  119. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/mmseqs.bat +0 -0
  120. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/mmseqs_Windows/util/bash-completion.sh +0 -0
  121. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/AUTHORS +0 -0
  122. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/CHANGELOG +0 -0
  123. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/LICENSE +0 -0
  124. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/README +0 -0
  125. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/bin/libgcc_s_dw2-1.dll +0 -0
  126. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/bin/libstdc++-6.dll +0 -0
  127. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/bin/trimal.exe +0 -0
  128. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/check_codon_alignments.py +0 -0
  129. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/compare_trimmed_msas.sh +0 -0
  130. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/generateRandomAlignmentsUsingAsSeedRealAlignments.py +0 -0
  131. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/generate_trimmed_msas.sh +0 -0
  132. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/get_sequence_representative_from_alignment.py +0 -0
  133. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/get_sequences_gaps_ratio.py +0 -0
  134. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/remove_shorter_sequences.py +0 -0
  135. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/selective_trimming_for_dNdS_analyses.based_neighbours.py +0 -0
  136. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/scripts/set_manual_boundaries.py +0 -0
  137. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/alignment.cpp +0 -0
  138. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/alignment.h +0 -0
  139. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/alignment.o +0 -0
  140. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/autAlignment.cpp +0 -0
  141. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/autAlignment.o +0 -0
  142. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.cpp +0 -0
  143. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.h +0 -0
  144. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/compareFiles.o +0 -0
  145. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/defines.h +0 -0
  146. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/main.cpp +0 -0
  147. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/makefile +0 -0
  148. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/makefile.MacOS +0 -0
  149. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/readAl.cpp +0 -0
  150. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/readal.exe +0 -0
  151. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/rwAlignment.cpp +0 -0
  152. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/rwAlignment.o +0 -0
  153. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.cpp +0 -0
  154. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.h +0 -0
  155. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/sequencesMatrix.o +0 -0
  156. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.cpp +0 -0
  157. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.h +0 -0
  158. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/similarityMatrix.o +0 -0
  159. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statAl.cpp +0 -0
  160. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statal.exe +0 -0
  161. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.cpp +0 -0
  162. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.h +0 -0
  163. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsConservation.o +0 -0
  164. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsFiles.cpp +0 -0
  165. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsFiles.h +0 -0
  166. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.cpp +0 -0
  167. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.h +0 -0
  168. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/statisticsGaps.o +0 -0
  169. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/utils.cpp +0 -0
  170. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/utils.h +0 -0
  171. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/utils.o +0 -0
  172. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/external/trimal.v1.4/trimAl/source/values.h +0 -0
  173. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/preset/.gitignore +0 -0
  174. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/preset/accurate.yaml +0 -0
  175. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/preset/fast.yaml +0 -0
  176. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/.gitignore +0 -0
  177. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__init__.py +0 -0
  178. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/CATV_pipe.cpython-310.pyc +0 -0
  179. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/CAT_V.cpython-310.pyc +0 -0
  180. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/CAT_V.cpython-39.pyc +0 -0
  181. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/CAT_V_pipe.cpython-39.pyc +0 -0
  182. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/__init__.cpython-310.pyc +0 -0
  183. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/__init__.cpython-39.pyc +0 -0
  184. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/align.cpython-310.pyc +0 -0
  185. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/cluster.cpython-39.pyc +0 -0
  186. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/dataset.cpython-39.pyc +0 -0
  187. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/ext.cpython-310.pyc +0 -0
  188. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/ext.cpython-39.pyc +0 -0
  189. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/hasher.cpython-39.pyc +0 -0
  190. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/initialize.cpython-39.pyc +0 -0
  191. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/io.cpython-310.pyc +0 -0
  192. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/io.cpython-39.pyc +0 -0
  193. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/logger.cpython-39.pyc +0 -0
  194. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/modeltest.cpython-39.pyc +0 -0
  195. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/multigene.cpython-39.pyc +0 -0
  196. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/ncbi.cpython-39.pyc +0 -0
  197. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/opt_generator.cpython-39.pyc +0 -0
  198. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/reporter.cpython-39.pyc +0 -0
  199. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/search.cpython-39.pyc +0 -0
  200. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/tool.cpython-39.pyc +0 -0
  201. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/validation.cpython-39.pyc +0 -0
  202. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/__pycache__/visualize.cpython-39.pyc +0 -0
  203. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/ext.py +0 -0
  204. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/hasher.py +0 -0
  205. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/logger.py +0 -0
  206. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/logics.py +0 -0
  207. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/modeltest.py +0 -0
  208. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/ncbi.py +0 -0
  209. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/opt_generator.py +0 -0
  210. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/templates/template.html +0 -0
  211. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/tool.py +0 -0
  212. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/trim.py +0 -0
  213. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/validate_option.py +0 -0
  214. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/validation.py +0 -0
  215. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/src/version.py +0 -0
  216. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/penicillium/DB/DB_Penicillium.xlsx +0 -0
  217. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/penicillium/Options.config +0 -0
  218. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/penicillium/Query/Query.xlsx +0 -0
  219. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/penicillium/preset.yaml +0 -0
  220. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/terrei/DB/FunVIP_Aspergillus_db.xlsx +0 -0
  221. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/terrei/Query/FunVIP_Aspergillus_query.xlsx +0 -0
  222. {funvip-0.3.23.4 → funvip-0.3.24}/funvip/test_dataset/terrei/preset.yaml +0 -0
  223. {funvip-0.3.23.4 → funvip-0.3.24}/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
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
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)-->
@@ -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
@@ -29,6 +30,8 @@ def append_query_group(V):
29
30
 
30
31
  V.cSR["query_group"] = V.cSR["qseqid"].apply(lambda x: group_dict.get(x))
31
32
 
33
+ logging.debug(V.cSR["query_group"])
34
+
32
35
  # Indicate queries without any corresponding group
33
36
  for FI in V.list_FI:
34
37
  if FI.adjusted_group == "" and not ("noseq" in FI.issues):
@@ -95,18 +98,15 @@ def assign_gene(result_dict, V, cutoff=0.99):
95
98
 
96
99
 
97
100
  # cluster each of FI object and assign group
98
- def cluster(FI, V, path, opt):
99
- list_group = deepcopy(V.list_group)
101
+ """
102
+ def cluster(FI, V_list_group, V_cSR, path, opt):
103
+ list_group = deepcopy(V_list_group)
100
104
 
101
105
  # 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"]))
106
+ df_group = V_cSR.groupby(V_cSR["qseqid"])
107
+ list_id = list(set(V_cSR["qseqid"]))
104
108
  df_search = df_group.get_group(FI.hash)
105
109
 
106
- # delete V to reduce memory assumption
107
- del V
108
- gc.collect()
109
-
110
110
  # If no evidence available, return it
111
111
  if df_search is None:
112
112
  # if confident is True, no adjusted_group for db is normal situation
@@ -124,6 +124,11 @@ def cluster(FI, V, path, opt):
124
124
  else:
125
125
  # sorting has peformed after split for better performance
126
126
  sorted_df_search = df_search.sort_values(by=["bitscore"], ascending=False)
127
+
128
+ # Garbage collection
129
+ del df_search
130
+ gc.collect()
131
+
127
132
  # reset index to easily get maximum
128
133
  sorted_df_search.reset_index(inplace=True, drop=True)
129
134
  # get result stasifies over cutoff
@@ -133,7 +138,6 @@ def cluster(FI, V, path, opt):
133
138
  ]
134
139
 
135
140
  # Garbage collection
136
- del df_search
137
141
  del sorted_df_search
138
142
  gc.collect()
139
143
 
@@ -141,7 +145,7 @@ def cluster(FI, V, path, opt):
141
145
  list_group = list(set(cutoff_df["subject_group"]))
142
146
 
143
147
  # if first time of group update
144
- if FI.adjusted_group == "" or FI.adjusted_group == "":
148
+ if FI.adjusted_group == "":
145
149
  # if only 1 group available, take it
146
150
  if group_count == 1:
147
151
  FI.adjusted_group = list_group[0]
@@ -171,16 +175,80 @@ def cluster(FI, V, path, opt):
171
175
  return FI, list_group[0]
172
176
  else:
173
177
  return FI, None
178
+ """
179
+
180
+
181
+ def cluster(FI, V_list_group, V_cSR, path, opt):
182
+ # Reduce memory by focusing on relevant rows
183
+ df_search = V_cSR[V_cSR["qseqid"] == FI.hash]
184
+
185
+ if df_search.empty:
186
+ # If confident is False and FI datatype is "db"
187
+ if opt.confident is False and FI.datatype is "db":
188
+ logging.warning(f"No adjusted_group assigned to {FI}")
189
+ FI.adjusted_group = FI.group
190
+ return FI
191
+
192
+ # For db sequence with group, retain it
193
+ elif not (FI.group == "") and FI.datatype == "db":
194
+ FI.adjusted_group = FI.group
195
+ return FI
196
+
197
+ # Update group if sequence doesn't have one
198
+ else:
199
+ df_search = df_search.sort_values(by=["bitscore"], ascending=False)
200
+
201
+ # Apply cutoff filter to reduce DataFrame size
202
+ cutoff = df_search["bitscore"].iloc[0] * opt.cluster.cutoff
203
+ cutoff_df = df_search[df_search["bitscore"] > cutoff]
204
+
205
+ # Clear unused data
206
+ del df_search
207
+ gc.collect()
208
+
209
+ # Extract group information
210
+ unique_groups = set(cutoff_df["subject_group"])
211
+ group_count = len(unique_groups)
212
+
213
+ if FI.adjusted_group == "":
214
+ if group_count == 1:
215
+ FI.adjusted_group = unique_groups.pop()
216
+ elif group_count == 0:
217
+ logging.warning(
218
+ f"Query seq in {FI.id} cannot be assigned to group. Check sequence."
219
+ )
220
+ elif group_count >= 2:
221
+ logging.warning(
222
+ f"Query seq in {FI.id} has multiple matches to groups: {list(unique_groups)}"
223
+ )
224
+ FI.adjusted_group = next(
225
+ iter(unique_groups)
226
+ ) # Pick one (deterministic for testing)
227
+ else:
228
+ logging.error("DEVELOPMENTAL ERROR IN GROUP ASSIGN")
229
+ raise Exception
230
+
231
+ logging.info(f"{FI.id} has clustered to {FI.adjusted_group}")
232
+
233
+ # if group already updated
234
+ else:
235
+ if not (FI.adjusted_group in unique_groups):
236
+ logging.warning(f"Clustering result collides for {FI.id}")
237
+
238
+ if unique_groups:
239
+ return FI
240
+ else:
241
+ return FI
174
242
 
175
243
 
176
244
  ### Append outgroup to given group-gene dataset by search matrix
177
- def append_outgroup(V, df_search, gene, group, path, opt):
245
+ def append_outgroup(V_list_FI, df_search, gene, group, path, opt):
178
246
  logging.info(f"Appending outgroup on group: {group}, Gene: {gene}")
179
- list_FI = deepcopy(V.list_FI)
247
+ list_FI = V_list_FI
180
248
 
181
249
  # In multiprocessing, delete V to reduce memory consumption
182
- del V
183
- gc.collect()
250
+ # del V
251
+ # gc.collect()
184
252
 
185
253
  # ready for by sseqid hash, which group to append
186
254
  # this time, append adjusted group
@@ -336,6 +404,8 @@ def append_outgroup(V, df_search, gene, group, path, opt):
336
404
 
337
405
 
338
406
  def group_cluster_opt_generator(V, opt, path):
407
+ opt_cluster = []
408
+
339
409
  # cluster(FO, df_search, V, path, opt)
340
410
  if len(V.list_qr_gene) == 0:
341
411
  logging.error(
@@ -347,11 +417,20 @@ def group_cluster_opt_generator(V, opt, path):
347
417
  else:
348
418
  # cluster group by concatenated search result
349
419
  list_id = list(set(V.cSR["qseqid"]))
420
+
350
421
  for FI in V.list_FI:
351
422
  if FI.hash in list_id:
352
- V.opt_cluster.append((FI, V, path, opt))
423
+ opt_cluster.append(
424
+ (
425
+ FI,
426
+ V.list_group,
427
+ V.cSR[["qseqid", "bitscore", "subject_group"]],
428
+ path,
429
+ opt,
430
+ )
431
+ )
353
432
 
354
- return V
433
+ return opt_cluster
355
434
 
356
435
 
357
436
  # opts ready for multithreading in outgroup append
@@ -371,7 +450,9 @@ def outgroup_append_opt_generator(V, path, opt):
371
450
  df_group_ = df_group.get_group(group)
372
451
  # Generating outgroup opt for multiprocessing
373
452
  for gene in V.dict_dataset[group]:
374
- opt_append_outgroup.append((V, df_group_, gene, group, path, opt))
453
+ opt_append_outgroup.append(
454
+ (V.list_FI, df_group_, gene, group, path, opt)
455
+ )
375
456
 
376
457
  except:
377
458
  logging.warning(
@@ -389,36 +470,47 @@ def pipe_cluster(V, opt, path):
389
470
 
390
471
  # cluster opt generation for multiprocessing
391
472
  # (FI, V, path, opt)
392
- V = group_cluster_opt_generator(V, opt, path)
473
+ opt_cluster = group_cluster_opt_generator(V, opt, path)
393
474
 
394
475
  # run multiprocessing start
395
476
  if opt.verbose < 3:
396
477
  p = mp.Pool(opt.thread)
397
- V.rslt_cluster = p.starmap(cluster, V.opt_cluster)
478
+ rslt_cluster = p.starmap(cluster, opt_cluster)
398
479
  p.close()
399
480
  p.join()
400
481
  else:
401
482
  # non-multithreading mode for debugging
402
- V.rslt_cluster = [cluster(*o) for o in V.opt_cluster]
483
+ rslt_cluster = [cluster(*o) for o in opt_cluster]
403
484
  # gather cluster result
404
- for cluster_result in V.rslt_cluster:
405
- FI = cluster_result[0]
485
+ for cluster_result in rslt_cluster:
486
+ FI = cluster_result
406
487
  logging.debug((FI.id, FI.datatype, FI.group, FI.adjusted_group))
407
488
 
408
489
  # replace group assigning result
409
490
  # collect FI from cluster result
410
- replace_FI = [r[0] for r in V.rslt_cluster]
491
+ # somethings been duplicated here
492
+ replace_FI = [r for r in rslt_cluster]
493
+
411
494
  # collect hash
412
495
  replace_hash_FI = [FI.hash for FI in replace_FI]
496
+
413
497
  # 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
498
+ V.list_FI = [FI for FI in V.list_FI if not (FI.hash in replace_hash_FI)]
499
+ V.list_FI += replace_FI
500
+
417
501
  # For syncyhronizing FI in dict_hash_FI to prevent error
418
502
  for FI in replace_FI:
419
503
  V.dict_hash_FI[FI.hash] = FI
420
504
 
421
- V.list_group = list(set([r[1] for r in V.rslt_cluster if (not (r[1] is None))]))
505
+ V.list_group = list(
506
+ set(
507
+ [
508
+ r.adjusted_group
509
+ for r in rslt_cluster
510
+ if (not (r.adjusted_group == ""))
511
+ ]
512
+ )
513
+ )
422
514
 
423
515
  if opt.queryonly is True:
424
516
  for FI in V.list_FI:
@@ -429,6 +521,7 @@ def pipe_cluster(V, opt, path):
429
521
  for FI in V.list_FI:
430
522
  V.dict_hash_FI[FI.hash] = FI
431
523
 
524
+ # For debugging
432
525
  for FI in V.list_FI:
433
526
  logging.debug((FI.id, FI.datatype, FI.group, FI.adjusted_group))
434
527
 
@@ -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
 
@@ -37,25 +37,13 @@ def combine_alignment(V, opt, path):
37
37
  )
38
38
  len_dict[gene] = len(fasta_list[0].seq)
39
39
  seq_dict[gene] = {}
40
+
41
+ V_concat = V.dict_dataset[group]["concatenated"]
42
+
40
43
  total_dataset = (
41
- [
42
- FI.hash
43
- for FI in V.dict_dataset[group][
44
- "concatenated"
45
- ].list_qr_FI
46
- ]
47
- + [
48
- FI.hash
49
- for FI in V.dict_dataset[group][
50
- "concatenated"
51
- ].list_db_FI
52
- ]
53
- + [
54
- FI.hash
55
- for FI in V.dict_dataset[group][
56
- "concatenated"
57
- ].list_og_FI
58
- ]
44
+ [FI.hash for FI in V_concat.list_qr_FI]
45
+ + [FI.hash for FI in V_concat.list_db_FI]
46
+ + [FI.hash for FI in V_concat.list_og_FI]
59
47
  )
60
48
  for seq in fasta_list:
61
49
  # if available hash
@@ -155,7 +143,30 @@ def concatenate_df(V, path, opt):
155
143
  # Leave non-empty dataframes
156
144
  if isinstance(V.dict_gene_SR[gene], pd.DataFrame):
157
145
  gene_list.append(gene)
146
+
158
147
  df = deepcopy(V.dict_gene_SR[gene].set_index(["qseqid", "sseqid"]))
148
+
149
+ """
150
+ df = deepcopy(
151
+ V.dict_gene_SR[gene]
152
+ .set_index(["qseqid", "sseqid"])
153
+ .drop(
154
+ columns=[
155
+ "pident",
156
+ "length",
157
+ "mismatch",
158
+ "gaps",
159
+ "qstart",
160
+ "qend",
161
+ "sstart",
162
+ "send",
163
+ "evalue",
164
+ "bitscore",
165
+ "subject_group",
166
+ ]
167
+ )
168
+ )
169
+ """
159
170
  df_list.append(df)
160
171
 
161
172
  if len(df_list) <= 0:
@@ -179,6 +190,7 @@ def concatenate_df(V, path, opt):
179
190
  df_multigene_regression_ori = pd.concat(df_list, axis=1)
180
191
 
181
192
  # Drop unnecessary columns for processing
193
+
182
194
  df_multigene_regression_ori.drop(
183
195
  columns=[
184
196
  "pident",
@@ -320,16 +320,18 @@ class FunVIP_var:
320
320
  for FI in self.list_FI:
321
321
  if FI.hash in self.dict_hash_FI:
322
322
  h = FI.hash
323
-
324
323
  # final species
325
324
  if FI.final_species != self.dict_hash_FI[h].final_species:
325
+ # If final species was empty
326
326
  if FI.final_species == "":
327
327
  FI.final_species = self.dict_hash_FI[h].final_species
328
+ # If final species in hash dict was empty
328
329
  elif self.dict_hash_FI[h].final_species == "":
329
330
  self.dict_hash_FI[h].final_species = FI.final_species
331
+ # If they collides, it is error
330
332
  else:
331
333
  logging.error(
332
- f"DEVELOPMNETAL ERROR Both list_FI and dict_hash_FI have conflicting final species, {FI.final_species} and {self.dict_hash_FI[h].final_species}"
334
+ f"DEVELOPMNETAL ERROR Both list_FI and dict_hash_FI have conflicting final species, {FI.final_species} and {self.dict_hash_FI[h].final_species} for hash {h}"
333
335
  )
334
336
  raise Exception
335
337
 
@@ -403,6 +405,15 @@ class FunVIP_var:
403
405
 
404
406
  # save fasta for outgroup adjusted fasta
405
407
  def save_dataset(self, path, opt):
408
+ # Before save_dataset, remove pre-existing results
409
+ for file in os.listdir(path.out_adjusted):
410
+ if file.endswith(".fasta"):
411
+ os.remove(f"{path.out_adjusted}/{file}")
412
+
413
+ for file in os.listdir(f"{path.out_adjusted}/hash/"):
414
+ if file.endswith(".fasta"):
415
+ os.remove(f"{path.out_adjusted}/hash/{file}")
416
+
406
417
  for group in self.dict_dataset:
407
418
  for gene in self.dict_dataset[group]:
408
419
  if not (gene == "concatenated"):