BioSAK 1.94.2__tar.gz → 1.95.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 (158) hide show
  1. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/VERSION +4 -1
  2. BioSAK-1.94.2/BioSAK/rename_seqs.py → BioSAK-1.95.0/BioSAK/prefix_seq_by_file_name.py +11 -19
  3. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/stats_arcog.py +1 -3
  4. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/stats_ko.py +6 -8
  5. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK.egg-info/PKG-INFO +2 -2
  6. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK.egg-info/SOURCES.txt +1 -1
  7. {BioSAK-1.94.2 → BioSAK-1.95.0}/PKG-INFO +2 -2
  8. {BioSAK-1.94.2 → BioSAK-1.95.0}/bin/BioSAK +10 -2
  9. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/BLCA_op_parser.py +0 -0
  10. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/BioSAK_config.py +0 -0
  11. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/COG2020.py +0 -0
  12. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/COG_boxplot_last1row.R +0 -0
  13. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/COG_boxplot_last2row.R +0 -0
  14. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/CheckM.py +0 -0
  15. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/DnaFeaturesViewer.py +0 -0
  16. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/FastaSplitler_by_num.py +0 -0
  17. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/FastaSplitler_by_size.py +0 -0
  18. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/GTDB_for_BLCA.py +0 -0
  19. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/Gene2Ctg.py +0 -0
  20. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/KEGG.py +0 -0
  21. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/KEGG_boxplot_last1row.R +0 -0
  22. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
  23. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/KeepRemovingTmp.py +0 -0
  24. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/MeanMappingDepth.py +0 -0
  25. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/MetaBiosample.py +0 -0
  26. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/MetaCHIP_phylo.hmm +0 -0
  27. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
  28. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/NetEnzymes.py +0 -0
  29. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/Prodigal.py +0 -0
  30. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/Reads_simulator.py +0 -0
  31. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/RunGraphMB.py +0 -0
  32. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/SILVA_for_BLCA.py +0 -0
  33. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/SankeyTaxon.py +0 -0
  34. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/SubsampleLongReads.py +0 -0
  35. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/Tax4Fun2IndOTU.py +0 -0
  36. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/VisBlastOp.py +0 -0
  37. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/VisGeneFlk.py +0 -0
  38. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/__init__.py +0 -0
  39. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/add_desc.py +0 -0
  40. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/arCOG.py +0 -0
  41. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/bam2reads.py +0 -0
  42. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot.py +0 -0
  43. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot_last1row.R +0 -0
  44. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot_matrix_COG.py +0 -0
  45. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
  46. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot_matrix_KEGG.py +0 -0
  47. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
  48. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/cat_fa.py +0 -0
  49. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/cdd2cog.pl +0 -0
  50. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/checkm_marker.py +0 -0
  51. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/compare_sets.py +0 -0
  52. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/count_num.py +0 -0
  53. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/cross_link_seqs.py +0 -0
  54. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/dbCAN.py +0 -0
  55. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
  56. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/dwnld_sra_reads.py +0 -0
  57. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/enrich.py +0 -0
  58. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/exe_cmds.py +0 -0
  59. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/ezaai2mat.py +0 -0
  60. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/fa2id.py +0 -0
  61. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/fastaai.py +0 -0
  62. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/format_converter.py +0 -0
  63. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/fq2fa.py +0 -0
  64. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gapseq.py +0 -0
  65. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gbk2faa.py +0 -0
  66. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gbk2ffn.py +0 -0
  67. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gbk2fna.py +0 -0
  68. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gbk2gff.py +0 -0
  69. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gbk_to_ffn_faa.py +0 -0
  70. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gc.py +0 -0
  71. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
  72. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
  73. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_MAG_reads_long.py +0 -0
  74. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_Pfam_hmms.py +0 -0
  75. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_TopHits_taxonomy.py +0 -0
  76. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_aa_composition.py +0 -0
  77. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_bin_abundance copy.py +0 -0
  78. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_data_matrix.py +0 -0
  79. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_gene_depth.py +0 -0
  80. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_genome_GTDB.py +0 -0
  81. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_genome_NCBI.py +0 -0
  82. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_genome_NCBI_v1.py +0 -0
  83. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_genome_NCBI_v2.py +0 -0
  84. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_gnm_size.py +0 -0
  85. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_ko_gene_seqs.py +0 -0
  86. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_krona_plot.py +0 -0
  87. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_reads_from_sam.py +0 -0
  88. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_reads_id_in_sam.py +0 -0
  89. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_top_hit.py +0 -0
  90. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/get_total_length.py +0 -0
  91. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/gff2chrom.py +0 -0
  92. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/global_functions.py +0 -0
  93. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/hpc3.py +0 -0
  94. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/js_cmds.py +0 -0
  95. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/js_hpc3.py +0 -0
  96. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/keep_best_hit.py +0 -0
  97. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/ko00001.keg +0 -0
  98. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/koala.py +0 -0
  99. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/link_16S_MAG.py +0 -0
  100. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/magabund.py +0 -0
  101. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/magabund2.py +0 -0
  102. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/manipulator_fasta.py +0 -0
  103. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/manipulator_msa.py +0 -0
  104. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/manipulator_newick.py +0 -0
  105. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/manipulator_sam.py +0 -0
  106. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/mann_whitney_u.py +0 -0
  107. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/mean_MAG_cov.py +0 -0
  108. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/merge_df.py +0 -0
  109. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/merge_seq.py +0 -0
  110. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/metaAssembly.py +0 -0
  111. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/metabat2concoct.py +0 -0
  112. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/metabat2maxbin.py +0 -0
  113. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/msa_to_distance_matrix.py +0 -0
  114. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/ncbi_dataset.py +0 -0
  115. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/odp.py +0 -0
  116. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
  117. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/parse_mmseqs_tsv.py +0 -0
  118. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/plot_mag.py +0 -0
  119. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/plot_sam_depth.py +0 -0
  120. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/plot_tree.R +0 -0
  121. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/prefix_file.py +0 -0
  122. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/prokka.py +0 -0
  123. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/reads2bam.py +0 -0
  124. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/rename_reads_for_Reago.py +0 -0
  125. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/rename_seq.py +0 -0
  126. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/ribbon.py +0 -0
  127. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/sam2bam.py +0 -0
  128. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/sampling_GTDB_gnms.py +0 -0
  129. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/sankey.R +0 -0
  130. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/sankey.py +0 -0
  131. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/select_seq.py +0 -0
  132. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/sep_reads_by_barcode.py +0 -0
  133. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/slice_seq.py +0 -0
  134. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/split_fasta.py +0 -0
  135. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/split_folder.py +0 -0
  136. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/split_sam.py +0 -0
  137. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/srun.py +0 -0
  138. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/statsTaxa.py +0 -0
  139. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/submitHPC.py +0 -0
  140. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/subset_GTDB_meta.py +0 -0
  141. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/subset_df.py +0 -0
  142. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/subset_tree.py +0 -0
  143. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/tmp_1.py +0 -0
  144. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/tmp_2.py +0 -0
  145. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/tmp_3.py +0 -0
  146. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/top_16S_hits.py +0 -0
  147. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/top_hits_in_a_group.py +0 -0
  148. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/transpose.py +0 -0
  149. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/usearch_uc.py +0 -0
  150. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK/wilcox.py +0 -0
  151. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK.egg-info/dependency_links.txt +0 -0
  152. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK.egg-info/requires.txt +0 -0
  153. {BioSAK-1.94.2 → BioSAK-1.95.0}/BioSAK.egg-info/top_level.txt +0 -0
  154. {BioSAK-1.94.2 → BioSAK-1.95.0}/LICENSE +0 -0
  155. {BioSAK-1.94.2 → BioSAK-1.95.0}/MANIFEST.in +0 -0
  156. {BioSAK-1.94.2 → BioSAK-1.95.0}/README.md +0 -0
  157. {BioSAK-1.94.2 → BioSAK-1.95.0}/setup.cfg +0 -0
  158. {BioSAK-1.94.2 → BioSAK-1.95.0}/setup.py +0 -0
@@ -1,4 +1,7 @@
1
- 1.94.2
1
+ 1.95.0
2
+ - new modules added: prefix_seq_by_file_name
3
+
4
+ 1.94.3
2
5
  - fixed bugs
3
6
 
4
7
  1.94.0
@@ -4,34 +4,29 @@ import argparse
4
4
  from Bio import SeqIO
5
5
 
6
6
 
7
- rename_seq_usage = '''
8
- ======================= rename_seqs.py example commands =======================
7
+ prefix_seq_by_file_name_usage = '''
8
+ ========= prefix_seq_by_file_name example commands =========
9
9
 
10
- python3 rename_seqs.py -i gnm_dir -x fa -o op_dir
10
+ BioSAK prefix_seq_by_file_name -i gnm_dir -x fa -o op_dir
11
11
 
12
- ===============================================================================
12
+ ============================================================
13
13
  '''
14
14
 
15
15
  def sep_path_basename_ext(file_in):
16
16
 
17
- # separate path and file name
18
17
  f_path, file_name = os.path.split(file_in)
19
18
  if f_path == '':
20
19
  f_path = '.'
21
-
22
- # separate file basename and extension
23
20
  f_base, f_ext = os.path.splitext(file_name)
24
-
25
21
  return f_path, f_base, f_ext
26
22
 
27
23
 
28
- def rename_seqs(args):
24
+ def prefix_seq_by_file_name(args):
29
25
 
30
26
  seq_file_in = args['i']
31
27
  file_extension = args['x']
32
28
  op_dir = args['o']
33
29
 
34
-
35
30
  seq_in_re = '%s/*.%s' % (seq_file_in, file_extension)
36
31
  seq_in_list = glob.glob(seq_in_re)
37
32
 
@@ -45,15 +40,12 @@ def rename_seqs(args):
45
40
  else:
46
41
  os.mkdir(op_dir)
47
42
 
48
-
49
43
  file_index = 1
50
44
  for each_file in seq_in_list:
51
45
  f_path, f_base, f_ext = sep_path_basename_ext(each_file)
52
46
 
53
47
  print('Processing %s/%s: %s' % (file_index, len(seq_in_list), f_base))
54
-
55
48
  file_out = '%s/%s%s' % (op_dir, f_base, f_ext)
56
-
57
49
  file_out_handle = open(file_out, 'w')
58
50
  seq_index = 1
59
51
  for each_seq in SeqIO.parse(each_file, 'fasta'):
@@ -68,9 +60,9 @@ def rename_seqs(args):
68
60
 
69
61
  if __name__ == '__main__':
70
62
 
71
- rename_seq_parser = argparse.ArgumentParser(usage=rename_seq_usage)
72
- rename_seq_parser.add_argument('-i', required=True, help='input sequence folder')
73
- rename_seq_parser.add_argument('-x', required=False, default='fasta', help='file extension, default: fasta')
74
- rename_seq_parser.add_argument('-o', required=True, help='output folder')
75
- args = vars(rename_seq_parser.parse_args())
76
- rename_seqs(args)
63
+ prefix_seq_by_file_name_parser = argparse.ArgumentParser(usage=prefix_seq_by_file_name_usage)
64
+ prefix_seq_by_file_name_parser.add_argument('-i', required=True, help='input sequence folder')
65
+ prefix_seq_by_file_name_parser.add_argument('-x', required=False, default='fasta', help='file extension, default: fasta')
66
+ prefix_seq_by_file_name_parser.add_argument('-o', required=True, help='output folder')
67
+ args = vars(prefix_seq_by_file_name_parser.parse_args())
68
+ prefix_seq_by_file_name(args)
@@ -20,7 +20,6 @@ def stats_arcog(args):
20
20
  cog_txt = args['cog']
21
21
  op_dir = args['o']
22
22
  db_dir = args['db']
23
- skip1row = args['skip1row']
24
23
  force_create_op_dir = args['f']
25
24
 
26
25
  ####################################################################################################################
@@ -83,7 +82,7 @@ def stats_arcog(args):
83
82
  op_stats_txt_handle.write('%s\t%s\t%s\n' % (cog_cate, len(cog_id_set), cog_cate_desc))
84
83
  for cog_id in sorted(list(cog_id_set)):
85
84
  cog_id_desc = cog_id_to_description_dict[cog_id]
86
- op_txt_handle.write('%s\t%s\t%s\t%s\n' % (cog_cate, cog_cate_desc.strip(), cog_id, cog_id_desc.strip()))
85
+ op_txt_handle.write('%s\t%s\t%s\t%s\t%s\n' % (cog_cate, len(cog_id_set), cog_cate_desc.strip(), cog_id, cog_id_desc.strip()))
87
86
  op_txt_handle.close()
88
87
  op_stats_txt_handle.close()
89
88
 
@@ -96,7 +95,6 @@ if __name__ == "__main__":
96
95
  stats_arcog_parser.add_argument('-cog', required=True, help='cog_ids.txt')
97
96
  stats_arcog_parser.add_argument('-db', required=True, help='DB folder, contains arCOGdef.tab and fun-20.tab')
98
97
  stats_arcog_parser.add_argument('-o', required=True, help='output directory')
99
- stats_arcog_parser.add_argument('-skip1row', required=False, action='store_true', help='skip the 1st row of the -cog file')
100
98
  stats_arcog_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
101
99
  args = vars(stats_arcog_parser.parse_args())
102
100
  stats_arcog(args)
@@ -9,12 +9,12 @@ BioSAK stats_ko -ko ko_d.txt -db ko00001.keg -p Demo
9
9
 
10
10
  # Required DB files:
11
11
  ko00001.keg: https://www.genome.jp/kegg-bin/download_htext?htext=ko00001&format=htext&filedir=
12
-
13
12
  =================================================================================================
14
13
  '''
15
14
 
16
15
 
17
16
  def ko_stats_to_txt(ko_stats_dict, ko_desc_dict, op_txt, op_stats_txt):
17
+
18
18
  op_txt_handle = open(op_txt, 'w')
19
19
  op_stats_txt_handle = open(op_stats_txt, 'w')
20
20
  for ko_high in sorted(list(ko_stats_dict.keys())):
@@ -23,7 +23,7 @@ def ko_stats_to_txt(ko_stats_dict, ko_desc_dict, op_txt, op_stats_txt):
23
23
  op_stats_txt_handle.write('%s\t%s\t%s\n' % (ko_high, len(ko_d_set), ko_high_desc))
24
24
  for ko_d in sorted(list(ko_d_set)):
25
25
  ko_d_desc = ko_desc_dict[ko_d]
26
- op_txt_handle.write('%s\t%s\t%s\t%s\n' % (ko_high, ko_high_desc.strip(), ko_d, ko_d_desc.strip()))
26
+ op_txt_handle.write('%s\t%s\t%s\t%s\t%s\n' % (ko_high, len(ko_d_set), ko_high_desc.strip(), ko_d, ko_d_desc.strip()))
27
27
  op_txt_handle.close()
28
28
  op_stats_txt_handle.close()
29
29
 
@@ -33,7 +33,6 @@ def stats_ko(args):
33
33
  ko_txt = args['ko']
34
34
  op_dir = args['o']
35
35
  db_file = args['db']
36
- skip1row = args['skip1row']
37
36
  force_create_op_dir = args['f']
38
37
 
39
38
  ####################################################################################################################
@@ -141,10 +140,9 @@ def stats_ko(args):
141
140
  if __name__ == "__main__":
142
141
 
143
142
  stats_ko_parser = argparse.ArgumentParser(usage=stats_ko_usage)
144
- stats_ko_parser.add_argument('-ko', required=True, help='ko.txt')
145
- stats_ko_parser.add_argument('-db', required=True, help='ko00001.keg')
146
- stats_ko_parser.add_argument('-o', required=True, help='output directory')
147
- stats_ko_parser.add_argument('-skip1row', required=False, action='store_true', help='skip the 1st row of the -ko file')
148
- stats_ko_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
143
+ stats_ko_parser.add_argument('-ko', required=True, help='ko.txt')
144
+ stats_ko_parser.add_argument('-db', required=True, help='ko00001.keg')
145
+ stats_ko_parser.add_argument('-o', required=True, help='output directory')
146
+ stats_ko_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
149
147
  args = vars(stats_ko_parser.parse_args())
150
148
  stats_ko(args)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: BioSAK
3
- Version: 1.94.2
3
+ Version: 1.95.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.94.2
23
+ BioSAK v1.95.0
@@ -116,11 +116,11 @@ BioSAK/plot_mag.py
116
116
  BioSAK/plot_sam_depth.py
117
117
  BioSAK/plot_tree.R
118
118
  BioSAK/prefix_file.py
119
+ BioSAK/prefix_seq_by_file_name.py
119
120
  BioSAK/prokka.py
120
121
  BioSAK/reads2bam.py
121
122
  BioSAK/rename_reads_for_Reago.py
122
123
  BioSAK/rename_seq.py
123
- BioSAK/rename_seqs.py
124
124
  BioSAK/ribbon.py
125
125
  BioSAK/sam2bam.py
126
126
  BioSAK/sampling_GTDB_gnms.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: BioSAK
3
- Version: 1.94.2
3
+ Version: 1.95.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.94.2
23
+ BioSAK v1.95.0
@@ -86,6 +86,7 @@ def print_main_help():
86
86
  fa2id -> Export sequence id
87
87
  slice_seq -> Get specified region of a sequence
88
88
  rename_seq -> Rename sequences in a file
89
+ prefix_seq_by_file_name -> prefix sequences by file name
89
90
  select_seq -> Select sequences by their ids
90
91
  split_fasta -> Split one fasta file into multiple files
91
92
  merge_seq -> Merge sequence files, remove duplicated ones if any
@@ -1003,7 +1004,6 @@ if __name__ == '__main__':
1003
1004
  stats_ko_parser.add_argument('-ko', required=True, help='ko.txt')
1004
1005
  stats_ko_parser.add_argument('-db', required=True, help='ko00001.keg')
1005
1006
  stats_ko_parser.add_argument('-o', required=True, help='output directory')
1006
- stats_ko_parser.add_argument('-skip1row', required=False, action='store_true', help='skip the 1st row of the -ko file')
1007
1007
  stats_ko_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
1008
1008
  args = vars(parser.parse_args())
1009
1009
  stats_ko.stats_ko(args)
@@ -1014,11 +1014,19 @@ if __name__ == '__main__':
1014
1014
  stats_arcog_parser.add_argument('-cog', required=True, help='cog_ids.txt')
1015
1015
  stats_arcog_parser.add_argument('-db', required=True, help='DB folder, contains arCOGdef.tab and fun-20.tab')
1016
1016
  stats_arcog_parser.add_argument('-o', required=True, help='output directory')
1017
- stats_arcog_parser.add_argument('-skip1row', required=False, action='store_true', help='skip the 1st row of the -cog file')
1018
1017
  stats_arcog_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
1019
1018
  args = vars(parser.parse_args())
1020
1019
  stats_arcog.stats_arcog(args)
1021
1020
 
1021
+ elif sys.argv[1] == 'prefix_seq_by_file_name':
1022
+ from BioSAK import prefix_seq_by_file_name
1023
+ prefix_seq_by_file_name_parser = subparsers.add_parser('prefix_seq_by_file_name', usage=prefix_seq_by_file_name.prefix_seq_by_file_name_usage)
1024
+ prefix_seq_by_file_name_parser.add_argument('-i', required=True, help='input sequence folder')
1025
+ prefix_seq_by_file_name_parser.add_argument('-x', required=False, default='fasta', help='file extension, default: fasta')
1026
+ prefix_seq_by_file_name_parser.add_argument('-o', required=True, help='output folder')
1027
+ args = vars(parser.parse_args())
1028
+ prefix_seq_by_file_name.prefix_seq_by_file_name(args)
1029
+
1022
1030
  else:
1023
1031
  print('Unrecognized module: %s, program exited' % sys.argv[1])
1024
1032
  exit()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes