BioSAK 1.75.5__tar.gz → 1.76.0__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 (157) hide show
  1. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/BLCA_op_parser.py +1 -1
  2. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/COG2020.py +1 -1
  3. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/CheckM.py +1 -1
  4. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/ConvertMSA.py +1 -1
  5. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/KEGG.py +1 -1
  6. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/MeanMappingDepth.py +1 -1
  7. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/MetaBiosample.py +1 -8
  8. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/OneLineAln.py +1 -6
  9. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/PhyloBiAssoc.py +1 -1
  10. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/RunGraphMB.py +1 -1
  11. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/SILVA_for_BLCA.py +1 -1
  12. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/SliceMSA.py +1 -1
  13. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/SubsampleLongReads.py +1 -1
  14. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/Tax4Fun2IndOTU.py +1 -1
  15. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/VERSION +4 -1
  16. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/arCOG.py +1 -2
  17. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/bam2reads.py +1 -1
  18. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/compare_trees.py +0 -1
  19. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/dbCAN.py +1 -1
  20. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/enrich.py +2 -2
  21. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_genome_GTDB.py +1 -1
  22. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_genome_NCBI.py +3 -6
  23. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/hpc3.py +1 -1
  24. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/iTOL.py +1 -1
  25. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/label_tree.py +1 -1
  26. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/merge_seq.py +1 -1
  27. BioSAK-1.76.0/BioSAK/metaAssembly.py +108 -0
  28. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/plot_mag.py +1 -1
  29. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/prokka.py +1 -1
  30. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/rename_seqs.py +1 -1
  31. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/select_seq.py +1 -4
  32. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/slice_seq.py +1 -5
  33. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/split_folder.py +1 -1
  34. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/submitHPC.py +1 -1
  35. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/subset_GTDB_meta.py +1 -1
  36. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/subset_tree.py +1 -1
  37. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/top_16S_hits.py +1 -1
  38. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/usearch_uc.py +1 -1
  39. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK.egg-info/PKG-INFO +2 -2
  40. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK.egg-info/SOURCES.txt +1 -9
  41. {BioSAK-1.75.5 → BioSAK-1.76.0}/PKG-INFO +2 -2
  42. {BioSAK-1.75.5 → BioSAK-1.76.0}/bin/BioSAK +10 -0
  43. BioSAK-1.75.5/BioSAK/BacDive.py +0 -152
  44. BioSAK-1.75.5/BioSAK/Barrnap.py +0 -0
  45. BioSAK-1.75.5/BioSAK/COG2003.py +0 -306
  46. BioSAK-1.75.5/BioSAK/COG2014.py +0 -734
  47. BioSAK-1.75.5/BioSAK/test.py +0 -20
  48. BioSAK-1.75.5/BioSAK/tmp_1.py +0 -46
  49. BioSAK-1.75.5/BioSAK/tmp_2_cog.py +0 -32
  50. BioSAK-1.75.5/BioSAK/tmp_3.py +0 -167
  51. BioSAK-1.75.5/BioSAK/tmp_4.py +0 -26
  52. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/BioSAK_config.py +0 -0
  53. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/COG_boxplot_last1row.R +0 -0
  54. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/COG_boxplot_last2row.R +0 -0
  55. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/DnaFeaturesViewer.py +0 -0
  56. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/FastaSplitler_by_num.py +0 -0
  57. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/FastaSplitler_by_size.py +0 -0
  58. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/GTDB_for_BLCA.py +0 -0
  59. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/Gene2Ctg.py +0 -0
  60. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/KEGG_boxplot_last1row.R +0 -0
  61. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
  62. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/KeepRemovingTmp.py +0 -0
  63. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/MetaCHIP_phylo.hmm +0 -0
  64. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
  65. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/NetEnzymes.py +0 -0
  66. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/Newick_tree_plotter.py +0 -0
  67. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/PhyloBiAssoc.R +0 -0
  68. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/Prodigal.py +0 -0
  69. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/Reads_simulator.py +0 -0
  70. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/SankeyTaxon.py +0 -0
  71. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/VisBlastOp.py +0 -0
  72. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/VisGeneFlk.py +0 -0
  73. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/__init__.py +0 -0
  74. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/boxplot_last1row.R +0 -0
  75. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/boxplot_matrix_COG.py +0 -0
  76. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
  77. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/boxplot_matrix_KEGG.py +0 -0
  78. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
  79. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/cat_fa.py +0 -0
  80. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/cdd2cog.pl +0 -0
  81. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/checkm_marker.py +0 -0
  82. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/compare_trees.R +0 -0
  83. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/cross_link_seqs.py +0 -0
  84. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
  85. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/dwnld_sra_reads.py +0 -0
  86. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/exe_cmds.py +0 -0
  87. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/ezaai2mat.py +0 -0
  88. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/fa2id.py +0 -0
  89. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/fa2phy.py +0 -0
  90. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/fa2tree.py +0 -0
  91. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/format_converter.py +0 -0
  92. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/format_leaf_name.py +0 -0
  93. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/fq2fa.py +0 -0
  94. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/gbk2faa.py +0 -0
  95. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/gbk2ffn.py +0 -0
  96. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/gbk2fna.py +0 -0
  97. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/gbk_to_ffn_faa.py +0 -0
  98. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
  99. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
  100. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_MAG_reads_long.py +0 -0
  101. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_Pfam_hmms.py +0 -0
  102. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_SCG_tree.py +0 -0
  103. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_TopHits_taxonomy.py +0 -0
  104. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_aa_composition.py +0 -0
  105. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_bin_abundance copy.py +0 -0
  106. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_gc.py +0 -0
  107. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_gene_depth.py +0 -0
  108. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_genome_NCBI_v1.py +0 -0
  109. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_genome_NCBI_v2.py +0 -0
  110. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_gnm_size.py +0 -0
  111. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_ko_gene_seqs.py +0 -0
  112. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_krona_plot.py +0 -0
  113. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_reads_from_sam.py +0 -0
  114. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_reads_id_in_sam.py +0 -0
  115. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_sankey_plot.R +0 -0
  116. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_top_hit.py +0 -0
  117. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/get_total_length.py +0 -0
  118. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/global_functions.py +0 -0
  119. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/js_cmds.py +0 -0
  120. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/keep_best_hit.py +0 -0
  121. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/ko00001.keg +0 -0
  122. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/label_tree.R +0 -0
  123. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/link_16S_MAG.py +0 -0
  124. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/magabund.py +0 -0
  125. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/magabund2.py +0 -0
  126. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/manipulator_fasta.py +0 -0
  127. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/manipulator_msa.py +0 -0
  128. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/manipulator_newick.py +0 -0
  129. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/manipulator_sam.py +0 -0
  130. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/mean_MAG_cov.py +0 -0
  131. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/metabat2concoct.py +0 -0
  132. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/metabat2maxbin.py +0 -0
  133. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/msa_to_distance_matrix.py +0 -0
  134. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/ncbi_dataset.py +0 -0
  135. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
  136. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/parse_mmseqs_tsv.py +0 -0
  137. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/plot_sam_depth.py +0 -0
  138. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/plot_tree.R +0 -0
  139. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/prefix_file.py +0 -0
  140. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/reads2bam.py +0 -0
  141. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/rename_leaves.py +0 -0
  142. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/rename_reads_for_Reago.py +0 -0
  143. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/rename_seq.py +0 -0
  144. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/sam2bam.py +0 -0
  145. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/sampling_GTDB_gnms.py +0 -0
  146. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/sep_reads_by_barcode.py +0 -0
  147. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/split_fasta.py +0 -0
  148. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/split_sam.py +0 -0
  149. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK/top_hits_in_a_group.py +0 -0
  150. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK.egg-info/dependency_links.txt +0 -0
  151. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK.egg-info/requires.txt +0 -0
  152. {BioSAK-1.75.5 → BioSAK-1.76.0}/BioSAK.egg-info/top_level.txt +0 -0
  153. {BioSAK-1.75.5 → BioSAK-1.76.0}/LICENSE +0 -0
  154. {BioSAK-1.75.5 → BioSAK-1.76.0}/MANIFEST.in +0 -0
  155. {BioSAK-1.75.5 → BioSAK-1.76.0}/README.md +0 -0
  156. {BioSAK-1.75.5 → BioSAK-1.76.0}/setup.cfg +0 -0
  157. {BioSAK-1.75.5 → BioSAK-1.76.0}/setup.py +0 -0
@@ -83,7 +83,7 @@ def BLCA_op_parser(args):
83
83
 
84
84
  if __name__ == '__main__':
85
85
 
86
- parser = argparse.ArgumentParser()
86
+ parser = argparse.ArgumentParser(usage=BLCA_op_parser_usage)
87
87
  parser.add_argument('-in', required=True, help='BLCA output')
88
88
  args = vars(parser.parse_args())
89
89
  BLCA_op_parser(args)
@@ -688,7 +688,7 @@ def COG2020(args):
688
688
 
689
689
  if __name__ == '__main__':
690
690
 
691
- COG_parser = argparse.ArgumentParser()
691
+ COG_parser = argparse.ArgumentParser(usage=COG2020_parser_usage)
692
692
 
693
693
  # arguments for COG_parser
694
694
  COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
@@ -124,7 +124,7 @@ def CheckM(args):
124
124
 
125
125
  if __name__ == "__main__":
126
126
 
127
- CheckM_parser = argparse.ArgumentParser()
127
+ CheckM_parser = argparse.ArgumentParser(usage=CheckM_usage)
128
128
  CheckM_parser.add_argument('-i', required=True, help='CheckM produced quality file')
129
129
  CheckM_parser.add_argument('-o', required=True, help='output quality file (reformatted)')
130
130
  CheckM_parser.add_argument('-g', required=False, help='MAG folder')
@@ -121,7 +121,7 @@ def ConvertMSA(args):
121
121
  if __name__ == '__main__':
122
122
 
123
123
  # initialize the options parser
124
- parser = argparse.ArgumentParser()
124
+ parser = argparse.ArgumentParser(usage=ConvertMSA_usage)
125
125
  parser.add_argument('-i', required=True, help='input alignment')
126
126
  parser.add_argument('-xi', required=False, default='aln', help='input alignment extension')
127
127
  parser.add_argument('-fi', required=True, help='input alignment format, e.g., fasta, phylip')
@@ -824,7 +824,7 @@ def Annotation_KEGG(args):
824
824
 
825
825
  if __name__ == "__main__":
826
826
 
827
- parser = argparse.ArgumentParser()
827
+ parser = argparse.ArgumentParser(usage=KEGG_parser_usage)
828
828
  parser.add_argument('-seq_in', required=False, help='faa file')
829
829
  parser.add_argument('-ko_in', required=False, help='annotation results from BlastKOALA/GhostKOALA, normally with name user_ko.txt')
830
830
  parser.add_argument('-x', required=False, help='file extension')
@@ -63,7 +63,7 @@ def MeanMappingDepth(args):
63
63
 
64
64
  if __name__ == '__main__':
65
65
 
66
- MeanMappingDepth_parser = argparse.ArgumentParser()
66
+ MeanMappingDepth_parser = argparse.ArgumentParser(usage=MeanMappingDepth_usage)
67
67
 
68
68
  MeanMappingDepth_parser.add_argument('-depth', required=True, help='input depth file from "samtools depth" ')
69
69
  MeanMappingDepth_parser.add_argument('-T', required=False, action="store_true", help='get overall stats')
@@ -66,7 +66,7 @@ def MetaBiosample(args):
66
66
 
67
67
  if __name__ == '__main__':
68
68
 
69
- arg_parser = argparse.ArgumentParser()
69
+ arg_parser = argparse.ArgumentParser(usage=MetaBiosample_usage)
70
70
  arg_parser.add_argument('-i', required=True, help='biosample id file, one id per line')
71
71
  arg_parser.add_argument('-a', required=True, help='attributes to extract')
72
72
  arg_parser.add_argument('-o', required=True, help='output folder')
@@ -75,10 +75,3 @@ if __name__ == '__main__':
75
75
  arg_parser.add_argument('-exe', required=False, action="store_true", help='execute cmds')
76
76
  args = vars(arg_parser.parse_args())
77
77
  MetaBiosample(args)
78
-
79
- '''
80
-
81
- cd /Users/songweizhi/Desktop
82
- BioSAK MetaBiosample -i a.txt -a 'isolation_source,host,geo_loc_name,lat_lon' -o op_dir -f
83
-
84
- '''
@@ -37,14 +37,9 @@ def OneLineAln(args):
37
37
 
38
38
  if __name__ == '__main__':
39
39
 
40
- OneLineAln_parser = argparse.ArgumentParser()
41
-
42
- # arguments for rename_seq_parser
40
+ OneLineAln_parser = argparse.ArgumentParser(usage=OneLineAln_usage)
43
41
  OneLineAln_parser.add_argument('-in', required=True, help='input MSA in fasta format')
44
42
  OneLineAln_parser.add_argument('-out', required=False, default=None, help='output file')
45
43
  OneLineAln_parser.add_argument('-upper', required=False, action='store_true', help='turn to uppercase')
46
-
47
44
  args = vars(OneLineAln_parser.parse_args())
48
-
49
45
  OneLineAln(args)
50
-
@@ -32,7 +32,7 @@ def PhyloBiAssoc(args):
32
32
 
33
33
 
34
34
  if __name__ == "__main__":
35
- PhyloBiAssoc_parser = argparse.ArgumentParser()
35
+ PhyloBiAssoc_parser = argparse.ArgumentParser(usage=PhyloBiAssoc_usage)
36
36
  PhyloBiAssoc_parser.add_argument('-t', required=True, help='tree file')
37
37
  PhyloBiAssoc_parser.add_argument('-d', required=True, help='data file')
38
38
  args = vars(PhyloBiAssoc_parser.parse_args())
@@ -91,7 +91,7 @@ def RunGraphMB(arg_dict):
91
91
 
92
92
  if __name__ == '__main__':
93
93
 
94
- RunGraphMB_parser = argparse.ArgumentParser()
94
+ RunGraphMB_parser = argparse.ArgumentParser(usage=RunGraphMB_usage)
95
95
  RunGraphMB_parser.add_argument('-gfa', required=True, help='gfa file')
96
96
  RunGraphMB_parser.add_argument('-o', required=True, help='output folder (i.e., input folder to GraphMB)')
97
97
  args = vars(RunGraphMB_parser.parse_args())
@@ -83,7 +83,7 @@ def SILVA_for_BLCA(args):
83
83
 
84
84
  if __name__ == "__main__":
85
85
 
86
- parser = argparse.ArgumentParser()
86
+ parser = argparse.ArgumentParser(usage=SILVA_for_BLCA_usage)
87
87
 
88
88
  parser.add_argument('-SILVA_ssu', required=True, help='SILVA SSU file, e.g. SILVA_138_SSURef_NR99_tax_silva.fasta')
89
89
 
@@ -130,7 +130,7 @@ def SliceMSA(args):
130
130
  if __name__ == '__main__':
131
131
 
132
132
  # arguments for rename_seq_parser
133
- SliceMSA_parser = argparse.ArgumentParser()
133
+ SliceMSA_parser = argparse.ArgumentParser(usage=SliceMSA_usage)
134
134
  SliceMSA_parser.add_argument('-i', required=True, help='input MSA in fasta format')
135
135
  SliceMSA_parser.add_argument('-fi', required=False, default='fasta', help='format (NOT file extension) of input MSA, default: fasta')
136
136
  SliceMSA_parser.add_argument('-s', required=True, help='columns to export, e.g. 200-300, -100, 50-')
@@ -70,7 +70,7 @@ def SubsampleLongReads(args):
70
70
 
71
71
  if __name__ == '__main__':
72
72
 
73
- parser = argparse.ArgumentParser()
73
+ parser = argparse.ArgumentParser(usage=SubsampleLongReads_usage)
74
74
  parser.add_argument('-i', required=True, help='input sequence file')
75
75
  parser.add_argument('-s', required=True, help='separate subsample rates (1-100) with comma, e.g. 1,5,10')
76
76
  parser.add_argument('-o', required=True, help='output directory')
@@ -17,7 +17,7 @@ def Tax4Fun2IndOTU(args):
17
17
 
18
18
  if __name__ == '__main__':
19
19
 
20
- COG_parser = argparse.ArgumentParser()
20
+ COG_parser = argparse.ArgumentParser(usage=Tax4Fun2IndOTU_usage)
21
21
  COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
22
22
  COG_parser.add_argument('-x', required=False, help='file extension')
23
23
  COG_parser.add_argument('-m', required=True, help='sequence type, "N/n" for "nucleotide", "P/p" for "protein"')
@@ -1,4 +1,7 @@
1
- 1.75.5
1
+ 1.76.0
2
+ - new module added: enrich
3
+
4
+ 1.75.6
2
5
  - fixed bugs
3
6
 
4
7
  1.75.0
@@ -689,8 +689,7 @@ def arCOG(args):
689
689
 
690
690
  if __name__ == '__main__':
691
691
 
692
- # arguments for COG_parser
693
- COG_parser = argparse.ArgumentParser()
692
+ COG_parser = argparse.ArgumentParser(usage=arCOG_parser_usage)
694
693
  COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
695
694
  COG_parser.add_argument('-x', required=False, help='file extension')
696
695
  COG_parser.add_argument('-m', required=True, help='sequence type, "N/n" for "nucleotide", "P/p" for "protein"')
@@ -175,7 +175,7 @@ def bam2reads(args):
175
175
 
176
176
  if __name__ == '__main__':
177
177
 
178
- parser = argparse.ArgumentParser()
178
+ parser = argparse.ArgumentParser(usage=bam2reads_usage)
179
179
  parser.add_argument('-b', required=True, help='Sorted Bam file')
180
180
  parser.add_argument('-r', required=True, help='Interested region')
181
181
  parser.add_argument('-s', required=False, default=None, help='Read sequence file')
@@ -229,7 +229,6 @@ def compare_trees(args):
229
229
  if __name__ == '__main__':
230
230
 
231
231
  compare_trees_parser = argparse.ArgumentParser(usage=compare_trees_usage)
232
- #compare_trees_parser.add_argument('-p', required=True, help='output prefix')
233
232
  compare_trees_parser.add_argument('-t1', required=True, help='tree (folder) 1')
234
233
  compare_trees_parser.add_argument('-t2', required=True, help='tree (folder) 2')
235
234
  compare_trees_parser.add_argument('-tx', required=False, default='newick', help='extention of tree files, default: newick')
@@ -446,7 +446,7 @@ def dbCAN(args):
446
446
 
447
447
  if __name__ == '__main__':
448
448
 
449
- dbCAN_parser = argparse.ArgumentParser()
449
+ dbCAN_parser = argparse.ArgumentParser(usage=dbCAN_parser_usage)
450
450
 
451
451
  # arguments for COG_parser
452
452
  dbCAN_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
@@ -21,7 +21,7 @@ Functions that are enriched in the genomes in either group are identified using
21
21
  U tests followed by a Bonferroni correction with a p value cut-off of 0.05 being considered
22
22
  significant. Only significantly different functions with greater than 2-fold mean differences
23
23
  are considered to be enriched. Functions detected only in the genomes from one group type are
24
- considered to be enriched if they existed in at least 50 percent of the MAGs.
24
+ considered to be enriched if they existed in at least 50 percent of the genomes in the group.
25
25
 
26
26
  ===============================================================================================
27
27
  '''
@@ -251,7 +251,7 @@ def enrich(args):
251
251
 
252
252
  if __name__ == '__main__':
253
253
 
254
- enrich_parser = argparse.ArgumentParser()
254
+ enrich_parser = argparse.ArgumentParser(usage=enrich_usage)
255
255
  enrich_parser.add_argument('-i', required=True, help='annotation files')
256
256
  enrich_parser.add_argument('-x', required=True, help='file extension')
257
257
  enrich_parser.add_argument('-g', required=True, help='grouping file')
@@ -82,7 +82,7 @@ def get_genome_GTDB(args):
82
82
 
83
83
  if __name__ == '__main__':
84
84
 
85
- parser = argparse.ArgumentParser()
85
+ parser = argparse.ArgumentParser(usage=get_genome_GTDB_parser_usage)
86
86
  parser.add_argument('-i', required=True, help='genome id')
87
87
  parser.add_argument('-o', required=True, help='output folder')
88
88
  parser.add_argument('-fastani_dir', required=True, help='the "fastani" dir')
@@ -1,8 +1,6 @@
1
1
  import os
2
2
  import glob
3
3
  import argparse
4
- from subprocess import Popen
5
- from datetime import datetime
6
4
  import multiprocessing as mp
7
5
  from distutils.spawn import find_executable
8
6
 
@@ -15,7 +13,7 @@ get_genome_NCBI_parser_usage = '''
15
13
  # example command
16
14
  BioSAK get_genome_NCBI -i GCA_000006945
17
15
  BioSAK get_genome_NCBI -i GCA_009840555.1
18
- BioSAK get_genome_NCBI -i genome_id.txt -o downloaded_gnm_dir -t 8
16
+ BioSAK get_genome_NCBI -i genome_id.txt -o downloaded_gnm_dir -t 8 -f
19
17
 
20
18
  # Format of genome_id.txt
21
19
  GCA_009837245
@@ -52,7 +50,6 @@ def datasets_worker(arg_list):
52
50
  os.system(datasets_cmd)
53
51
 
54
52
  # datasets download genome accession %s --include genome --no-progressbar --filename %s
55
-
56
53
  # datasets download genome accession GCA_014843695.1 --include gff3,rna,cds,protein,genome,seq-report
57
54
 
58
55
  if os.path.isfile(downloaded_file) is True:
@@ -87,7 +84,7 @@ def download_GenBank_genome(args):
87
84
  assembly_id = args['i']
88
85
  output_folder = args['o']
89
86
  num_threads = args['t']
90
- force_overwrite = args['force']
87
+ force_overwrite = args['f']
91
88
 
92
89
  if find_executable('datasets') is None:
93
90
  print('datasets not detected, please install it first')
@@ -154,7 +151,7 @@ def download_GenBank_genome(args):
154
151
 
155
152
  if __name__ == '__main__':
156
153
 
157
- parser = argparse.ArgumentParser()
154
+ parser = argparse.ArgumentParser(usage=get_genome_NCBI_parser_usage)
158
155
  parser.add_argument('-i', required=True, help='IDs of genomes to download')
159
156
  parser.add_argument('-o', required=False, default=None, help='output folder')
160
157
  parser.add_argument('-t', required=False, default=1, type=int, help='number of threads')
@@ -54,7 +54,7 @@ def hpc3(args):
54
54
 
55
55
  if __name__ == '__main__':
56
56
 
57
- hpc3_parser = argparse.ArgumentParser()
57
+ hpc3_parser = argparse.ArgumentParser(usage=hpc3_usage)
58
58
  hpc3_parser.add_argument('-c', required=True, help='command to submit')
59
59
  hpc3_parser.add_argument('-n', required=True, help='job name')
60
60
  hpc3_parser.add_argument('-m', required=False, default=None, help='email address')
@@ -540,7 +540,7 @@ def iTOL(args):
540
540
  if __name__ == '__main__':
541
541
 
542
542
  # initialize the options parser
543
- parser = argparse.ArgumentParser()
543
+ parser = argparse.ArgumentParser(usage=iTOL_usage)
544
544
  parser.add_argument('-Labels', required=False, action='store_true', help='Labels')
545
545
  parser.add_argument('-ColorStrip', required=False, action='store_true', help='ColorStrip')
546
546
  parser.add_argument('-ColorRange', required=False, action='store_true', help='ColorRange')
@@ -110,7 +110,7 @@ def label_tree(args, config_dict):
110
110
  if __name__ == '__main__':
111
111
 
112
112
  # initialize the options parser
113
- parser = argparse.ArgumentParser()
113
+ parser = argparse.ArgumentParser(usage=label_tree_usage)
114
114
 
115
115
  parser.add_argument('-tree', required=True, help='tree file in newick format')
116
116
  parser.add_argument('-label', required=False, default=None, help='label file (label,leaf)')
@@ -56,7 +56,7 @@ def merge_seq(args):
56
56
 
57
57
  if __name__ == '__main__':
58
58
 
59
- parser = argparse.ArgumentParser()
59
+ parser = argparse.ArgumentParser(usage=merge_seq_usage)
60
60
  parser.add_argument('-1', required=True, help='input file 1')
61
61
  parser.add_argument('-2', required=True, help='input file 2')
62
62
  parser.add_argument('-o', required=True, help='output sequence file')
@@ -0,0 +1,108 @@
1
+ import os
2
+ import argparse
3
+ import subprocess
4
+
5
+
6
+ metaAssembly_usage = '''
7
+ ==================== metaAssembly example commands ====================
8
+
9
+ BioSAK metaAssembly -i GCA_947846245.1 -o output_dir -f
10
+ BioSAK metaAssembly -i assembly_id.txt -o output_dir -f
11
+
12
+ # format of assembly_id.txt (one id per line)
13
+ GCA_947846245.1
14
+ GCF_026914265.1
15
+ GCF_002022765.2
16
+
17
+ Dependencies: datasets and dataformat
18
+ https://www.ncbi.nlm.nih.gov/datasets/docs/v2/download-and-install/
19
+
20
+ =======================================================================
21
+ '''
22
+
23
+
24
+ def check_executables(program_list):
25
+
26
+ not_detected_programs = []
27
+ for needed_program in program_list:
28
+
29
+ if subprocess.call(['which', needed_program], stdout=open(os.devnull, 'wb')) != 0:
30
+ not_detected_programs.append(needed_program)
31
+
32
+ if not_detected_programs != []:
33
+ print('%s not detected, program exited!' % ','.join(not_detected_programs))
34
+ exit()
35
+
36
+
37
+ def metaAssembly(args):
38
+
39
+ assembly_id_txt = args['i']
40
+ op_dir = args['o']
41
+ force_overwrite = args['f']
42
+
43
+ check_executables(['datasets', 'dataformat'])
44
+
45
+ if os.path.isdir(op_dir) is True:
46
+ if force_overwrite is True:
47
+ os.system('rm -r %s' % op_dir)
48
+ else:
49
+ print('Output folder detected, program exited!')
50
+ exit()
51
+
52
+ tmp_dir = '%s/tmp' % op_dir
53
+ op_txt = '%s/output.txt' % op_dir
54
+
55
+ os.mkdir(op_dir)
56
+ os.mkdir(tmp_dir)
57
+
58
+ assembly_id_set = set()
59
+ if os.path.isfile(assembly_id_txt):
60
+ for assembly_id in open(assembly_id_txt):
61
+ assembly_id_set.add(assembly_id.strip())
62
+ if len(assembly_id_set) == 0:
63
+ print('No id found in %s, program exited!' % assembly_id_txt)
64
+ exit()
65
+ else:
66
+ assembly_id_set.add(assembly_id_txt)
67
+
68
+
69
+ op_txt_handle = open(op_txt, 'w')
70
+ op_txt_handle.write('Assembly\tBioSample\tTitle\tDescription\n')
71
+ op_txt_handle.close()
72
+
73
+ processing_index = 1
74
+ for assembly_id in assembly_id_set:
75
+ print('Processing %s/%s: %s' % (processing_index, len(assembly_id_set), assembly_id))
76
+ op_metadata_tsv = '%s/%s_data_report.tsv' % (tmp_dir, assembly_id)
77
+ ncbi_datasets_cmd = 'datasets summary genome accession %s --as-json-lines | dataformat tsv genome > %s' % (assembly_id, op_metadata_tsv)
78
+ os.system(ncbi_datasets_cmd)
79
+ biosample_title = ''
80
+ biosample_accession = ''
81
+ biosample_description = ''
82
+ col_index = dict()
83
+ line_num_index = 0
84
+ for each_line in open(op_metadata_tsv):
85
+ line_num_index += 1
86
+ line_split = each_line.strip().split('\t')
87
+ if line_num_index == 1:
88
+ col_index = {key: i for i, key in enumerate(line_split)}
89
+ elif line_num_index == 2:
90
+ biosample_accession = line_split[col_index['Assembly BioSample Accession']]
91
+ biosample_title = line_split[col_index['Assembly BioSample Description Title']]
92
+ biosample_description = line_split[col_index['Assembly BioSample Description Comment']]
93
+ str_to_write = '%s\t%s\t%s\t%s' % (assembly_id, biosample_accession, biosample_title, biosample_description)
94
+
95
+ with open(op_txt, 'a') as op_txt_handle:
96
+ op_txt_handle.write(str_to_write + '\n')
97
+
98
+ processing_index += 1
99
+
100
+
101
+ if __name__ == '__main__':
102
+
103
+ metaAssembly_parser = argparse.ArgumentParser(usage=metaAssembly_usage)
104
+ metaAssembly_parser.add_argument('-i', required=True, help='file contains assembly ids')
105
+ metaAssembly_parser.add_argument('-o', required=True, help='output directory')
106
+ metaAssembly_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
107
+ args = vars(metaAssembly_parser.parse_args())
108
+ metaAssembly(args)
@@ -198,7 +198,7 @@ def Plot_MAG(argument_list):
198
198
 
199
199
  if __name__ == '__main__':
200
200
 
201
- Plot_MAG_parser = argparse.ArgumentParser()
201
+ Plot_MAG_parser = argparse.ArgumentParser(usage=Plot_MAG_parser_usage)
202
202
  Plot_MAG_parser.add_argument('-i', required=True, help='MAG folder')
203
203
  Plot_MAG_parser.add_argument('-x', required=True, help='file extension')
204
204
  Plot_MAG_parser.add_argument('-d', required=True, help='contig depth')
@@ -100,7 +100,7 @@ def prokka(args):
100
100
 
101
101
  if __name__ == '__main__':
102
102
 
103
- parser = argparse.ArgumentParser()
103
+ parser = argparse.ArgumentParser(usage=prokka_usage)
104
104
  parser.add_argument('-i', required=True, help='genome folder')
105
105
  parser.add_argument('-x', required=True, default='fna', help='file extension, deafult: fna')
106
106
  parser.add_argument('-d', required=True, help='genome domain, Bacteria or Archaea')
@@ -68,7 +68,7 @@ def rename_seqs(args):
68
68
 
69
69
  if __name__ == '__main__':
70
70
 
71
- rename_seq_parser = argparse.ArgumentParser()
71
+ rename_seq_parser = argparse.ArgumentParser(usage=rename_seq_usage)
72
72
  rename_seq_parser.add_argument('-i', required=True, help='input sequence folder')
73
73
  rename_seq_parser.add_argument('-x', required=False, default='fasta', help='file extension, default: fasta')
74
74
  rename_seq_parser.add_argument('-o', required=True, help='output folder')
@@ -81,10 +81,7 @@ def select_seq(args):
81
81
 
82
82
  if __name__ == '__main__':
83
83
 
84
- # initialize the options parser
85
- parser = argparse.ArgumentParser()
86
-
87
- # arguments for select_seq
84
+ parser = argparse.ArgumentParser(usage=select_seq_usage)
88
85
  parser.add_argument('-seq', required=True, help='sequence file')
89
86
  parser.add_argument('-id', required=True, help='sequence ids,one id per line')
90
87
  parser.add_argument('-option', required=True, type=int, help='choose from 0 and 1')
@@ -59,15 +59,11 @@ def slice_seq(args):
59
59
 
60
60
  if __name__ == '__main__':
61
61
 
62
- # initialize the options parser
63
- parser = argparse.ArgumentParser()
64
-
65
- # arguments for select_seq
62
+ parser = argparse.ArgumentParser(usage=slice_seq_usage)
66
63
  parser.add_argument('-in', required=True, help='sequence file')
67
64
  parser.add_argument('-id', required=True, help='sequence id')
68
65
  parser.add_argument('-range', required=True, help='sequence range, start-end (in bp). e.g. 200-4000')
69
66
  parser.add_argument('-rc', required=False, action='store_true', help='write out reverse complement sequence')
70
67
  parser.add_argument('-out', required=True, help='output file')
71
-
72
68
  args = vars(parser.parse_args())
73
69
  slice_seq(args)
@@ -55,7 +55,7 @@ def split_folder(args):
55
55
 
56
56
 
57
57
  if __name__ == "__main__":
58
- parser = argparse.ArgumentParser()
58
+ parser = argparse.ArgumentParser(usage=split_folder_parser_usage)
59
59
 
60
60
  parser.add_argument('-in', required=True, help='file folder')
61
61
  parser.add_argument('-x', required=True, help='file extension')
@@ -31,7 +31,7 @@ def submitHPC(args):
31
31
  if __name__ == '__main__':
32
32
 
33
33
  # arguments for COG_parser
34
- submitHPC_parser = argparse.ArgumentParser()
34
+ submitHPC_parser = argparse.ArgumentParser(usage=submitHPC_usage)
35
35
  submitHPC_parser.add_argument('-p', required=True, help='js prefix')
36
36
  submitHPC_parser.add_argument('-c', required=True, help='commands txt')
37
37
  submitHPC_parser.add_argument('-t', required=False, type=int, default=1, help='number of threads')
@@ -50,7 +50,7 @@ def subset_GTDB_meta(args):
50
50
 
51
51
  if __name__ == '__main__':
52
52
 
53
- parser = argparse.ArgumentParser()
53
+ parser = argparse.ArgumentParser(usage=subset_GTDB_meta_usage)
54
54
  parser.add_argument('-meta', required=True, help='GTDB reference genome metadata')
55
55
  parser.add_argument('-id', required=True, help='id of genomes')
56
56
  parser.add_argument('-out', required=True, help='output file')
@@ -183,7 +183,7 @@ def subset_tree(args):
183
183
 
184
184
 
185
185
  if __name__ == '__main__':
186
- parser = argparse.ArgumentParser(description='', add_help=False)
186
+ parser = argparse.ArgumentParser(usage=subset_tree_usage)
187
187
  parser.add_argument('-h', action='help', help='Show this help message and exit')
188
188
  parser.add_argument('-tree', required=True, type=str, help='input tree file')
189
189
  parser.add_argument('-taxon', required=True, type=str, help='A file containing list of leaves to keep, one leaf per line')
@@ -176,7 +176,7 @@ def top_16S_hits(args):
176
176
 
177
177
  if __name__ == '__main__':
178
178
 
179
- top_16S_hits_parser = argparse.ArgumentParser()
179
+ top_16S_hits_parser = argparse.ArgumentParser(usage=top_16S_hits_usage)
180
180
  top_16S_hits_parser.add_argument('-p', required=True, help='output prefix')
181
181
  top_16S_hits_parser.add_argument('-q', required=True, help='query sequence file')
182
182
  top_16S_hits_parser.add_argument('-r', required=True, help='SILVA or GTDB SSU sequence file')
@@ -50,7 +50,7 @@ def usearch_uc(args):
50
50
 
51
51
  if __name__ == '__main__':
52
52
 
53
- usearch_uc_parser = argparse.ArgumentParser()
53
+ usearch_uc_parser = argparse.ArgumentParser(usage=usearch_uc_usage)
54
54
  usearch_uc_parser.add_argument('-uc', required=True, help='uc file from Usearch')
55
55
  usearch_uc_parser.add_argument('-n', required=False, type=int, default=1, help='minimum number of sequence in a cluster, default: 1')
56
56
  usearch_uc_parser.add_argument('-o', required=True, help='output file')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: BioSAK
3
- Version: 1.75.5
3
+ Version: 1.76.0
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/BioSAK
6
6
  Author: Weizhi Song
@@ -20,4 +20,4 @@ Requires-Dist: beautifulsoup4
20
20
  Requires-Dist: ete3
21
21
  Requires-Dist: statsmodels
22
22
 
23
- BioSAK v1.75.5
23
+ BioSAK v1.76.0
@@ -3,11 +3,7 @@ MANIFEST.in
3
3
  README.md
4
4
  setup.py
5
5
  BioSAK/BLCA_op_parser.py
6
- BioSAK/BacDive.py
7
- BioSAK/Barrnap.py
8
6
  BioSAK/BioSAK_config.py
9
- BioSAK/COG2003.py
10
- BioSAK/COG2014.py
11
7
  BioSAK/COG2020.py
12
8
  BioSAK/COG_boxplot_last1row.R
13
9
  BioSAK/COG_boxplot_last2row.R
@@ -111,6 +107,7 @@ BioSAK/manipulator_newick.py
111
107
  BioSAK/manipulator_sam.py
112
108
  BioSAK/mean_MAG_cov.py
113
109
  BioSAK/merge_seq.py
110
+ BioSAK/metaAssembly.py
114
111
  BioSAK/metabat2concoct.py
115
112
  BioSAK/metabat2maxbin.py
116
113
  BioSAK/msa_to_distance_matrix.py
@@ -138,11 +135,6 @@ BioSAK/split_sam.py
138
135
  BioSAK/submitHPC.py
139
136
  BioSAK/subset_GTDB_meta.py
140
137
  BioSAK/subset_tree.py
141
- BioSAK/test.py
142
- BioSAK/tmp_1.py
143
- BioSAK/tmp_2_cog.py
144
- BioSAK/tmp_3.py
145
- BioSAK/tmp_4.py
146
138
  BioSAK/top_16S_hits.py
147
139
  BioSAK/top_hits_in_a_group.py
148
140
  BioSAK/usearch_uc.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: BioSAK
3
- Version: 1.75.5
3
+ Version: 1.76.0
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/BioSAK
6
6
  Author: Weizhi Song
@@ -20,4 +20,4 @@ Requires-Dist: beautifulsoup4
20
20
  Requires-Dist: ete3
21
21
  Requires-Dist: statsmodels
22
22
 
23
- BioSAK v1.75.5
23
+ BioSAK v1.76.0