BioSAK 1.97.1__tar.gz → 1.97.2__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.
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/Combine_KEGG_arCOG.py +48 -6
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/VERSION +1 -1
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/enrich.py +19 -6
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK.egg-info/PKG-INFO +2 -2
- {BioSAK-1.97.1 → BioSAK-1.97.2}/PKG-INFO +2 -2
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/BLCA_op_parser.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/BioSAK_config.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/COG2020.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/COG_boxplot_last1row.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/COG_boxplot_last2row.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/CheckM.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/DendroDF.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/DnaFeaturesViewer.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/FastaSplitler_by_num.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/FastaSplitler_by_size.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/GTDB_for_BLCA.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/Gene2Ctg.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/KEGG.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/KEGG_boxplot_last1row.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/KeepRemovingTmp.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/MeanMappingDepth.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/MetaBiosample.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/MetaCHIP_phylo.hmm +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/NetEnzymes.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/Prodigal.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/Reads_simulator.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/RunGraphMB.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/SILVA_for_BLCA.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/SankeyTaxon.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/SubsampleLongReads.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/Tax4Fun2IndOTU.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/UNITE_for_BLCA.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/VisBlastOp.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/VisGeneFlk.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/__init__.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/add_desc.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/arCOG.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/bam2reads.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot_last1row.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot_matrix_COG.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot_matrix_KEGG.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/cat_fa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/cdd2cog.pl +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/checkm_marker.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/compare_sets.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/count_num.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/cross_link_seqs.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/dbCAN.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/dwnld_sra_reads.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/exe_cmds.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/ezaai2mat.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/fa2id.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/fastaai.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/format_converter.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/fq2fa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gapseq.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gbk2faa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gbk2ffn.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gbk2fna.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gbk2gff.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gbk_to_ffn_faa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gc.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_MAG_reads_long.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_Pfam_hmms.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_TopHits_taxonomy.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_aa_composition.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_bin_abundance copy.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_data_matrix.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_gene_depth.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_genome_GTDB.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_genome_NCBI.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_genome_NCBI_v1.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_genome_NCBI_v2.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_gnm_size.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_ko_gene_seqs.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_krona_plot.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_reads_from_sam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_reads_id_in_sam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_top_hit.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/get_total_length.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/gff2chrom.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/global_functions.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/hpc3.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/js_cmds.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/js_hpc3.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/keep_best_hit.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/ko00001.keg +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/koala.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/link_16S_MAG.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/magabund.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/magabund2.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/manipulator_fasta.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/manipulator_msa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/manipulator_newick.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/manipulator_sam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/mann_whitney_u.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/mean_MAG_cov.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/merge_df.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/merge_seq.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/metaAssembly.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/metabat2concoct.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/metabat2maxbin.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/msa_to_distance_matrix.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/ncbi_dataset.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/odp.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/parse_mmseqs_tsv.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/plot_mag.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/plot_sam_depth.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/plot_tree.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/prefix_file.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/prefix_seq_by_file_name.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/prokka.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/reads2bam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/rename_reads_for_Reago.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/rename_seq.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/ribbon.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/sam2bam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/sampling_GTDB_gnms.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/sankey.R +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/sankey.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/select_seq.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/sep_reads_by_barcode.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/slice_seq.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/split_fasta.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/split_folder.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/split_sam.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/srun.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/statsTaxa.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/stats_arcog.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/stats_ko.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/submitHPC.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/subset_GTDB_meta.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/subset_df.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/subset_tree.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/tmp_1.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/tmp_2.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/tmp_3.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/top_16S_hits.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/top_hits_in_a_group.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/transpose.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/usearch_uc.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK/wilcox.py +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK.egg-info/SOURCES.txt +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK.egg-info/dependency_links.txt +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK.egg-info/requires.txt +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/BioSAK.egg-info/top_level.txt +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/LICENSE +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/MANIFEST.in +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/README.md +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/bin/BioSAK +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/setup.cfg +0 -0
- {BioSAK-1.97.1 → BioSAK-1.97.2}/setup.py +0 -0
|
@@ -58,7 +58,8 @@ def Combine_KEGG_arCOG(args):
|
|
|
58
58
|
######################################### read in kegg annotation results ##########################################
|
|
59
59
|
|
|
60
60
|
fun_id_to_description_dict = dict()
|
|
61
|
-
|
|
61
|
+
fun_id_to_B_dict = dict()
|
|
62
|
+
fun_id_to_C_dict = dict()
|
|
62
63
|
gnm_to_gene_dict = dict()
|
|
63
64
|
ko_assignment_dod = dict()
|
|
64
65
|
for each_file in ko_assignment_file_list:
|
|
@@ -75,8 +76,16 @@ def Combine_KEGG_arCOG(args):
|
|
|
75
76
|
gene_id = each_line_split[0]
|
|
76
77
|
gnm_to_gene_dict[gnm_id].add(gene_id)
|
|
77
78
|
if len(each_line_split) > 1:
|
|
78
|
-
ko_id
|
|
79
|
-
|
|
79
|
+
ko_id = each_line_split[4][2:]
|
|
80
|
+
ko_b = each_line_split[2]
|
|
81
|
+
ko_b_desc = each_line_split[6]
|
|
82
|
+
ko_c = each_line_split[3]
|
|
83
|
+
ko_c_desc = each_line_split[7]
|
|
84
|
+
ko_desc = each_line_split[8].strip()
|
|
85
|
+
ko_b_with_desc = '%s__%s' % (ko_b, ko_b_desc)
|
|
86
|
+
ko_c_with_desc = '%s__%s' % (ko_c, ko_c_desc)
|
|
87
|
+
fun_id_to_B_dict[ko_id] = ko_b_with_desc
|
|
88
|
+
fun_id_to_C_dict[ko_id] = ko_c_with_desc
|
|
80
89
|
fun_id_to_description_dict[ko_id] = ko_desc
|
|
81
90
|
current_genome_ko_assignment_dict[gene_id] = ko_id
|
|
82
91
|
ko_assignment_dod[gnm_id] = current_genome_ko_assignment_dict
|
|
@@ -84,6 +93,8 @@ def Combine_KEGG_arCOG(args):
|
|
|
84
93
|
######################################### read in arcog annotation results #########################################
|
|
85
94
|
|
|
86
95
|
arcog_assignment_dod = dict()
|
|
96
|
+
arcog_id_to_cate_dict = dict()
|
|
97
|
+
arcog_cate_to_desc_dict = dict()
|
|
87
98
|
for each_file in arcog_assignment_file_list:
|
|
88
99
|
|
|
89
100
|
f_name, f_path, f_base, f_ext = sep_path_basename_ext(each_file)
|
|
@@ -100,11 +111,27 @@ def Combine_KEGG_arCOG(args):
|
|
|
100
111
|
gnm_to_gene_dict[gnm_id].add(gene_id)
|
|
101
112
|
if len(each_line_split) > 1:
|
|
102
113
|
arcog_id = each_line_split[1]
|
|
114
|
+
arcog_cates = each_line_split[2]
|
|
103
115
|
arcog_desc = each_line_split[3]
|
|
116
|
+
|
|
117
|
+
if arcog_id not in arcog_id_to_cate_dict:
|
|
118
|
+
arcog_id_to_cate_dict[arcog_id] = set()
|
|
119
|
+
|
|
120
|
+
for arcog_cate in arcog_cates:
|
|
121
|
+
arcog_id_to_cate_dict[arcog_id].add(arcog_cate)
|
|
122
|
+
|
|
104
123
|
fun_id_to_description_dict[arcog_id] = arcog_desc
|
|
105
124
|
current_genome_arcog_assignment_dict[gene_id] = arcog_id
|
|
106
125
|
arcog_assignment_dod[gnm_id] = current_genome_arcog_assignment_dict
|
|
107
126
|
|
|
127
|
+
# read in cog cate to desc info
|
|
128
|
+
func_stats_txt = each_file.replace('_query_to_cog.txt', '_func_stats.txt')
|
|
129
|
+
for each in open(func_stats_txt):
|
|
130
|
+
each_split = each.strip().split('\t')
|
|
131
|
+
cate_id = each_split[0]
|
|
132
|
+
cate_desc = each_split[2]
|
|
133
|
+
arcog_cate_to_desc_dict[cate_id] = cate_desc
|
|
134
|
+
|
|
108
135
|
###################################### write out combined annotation results #######################################
|
|
109
136
|
|
|
110
137
|
# write out combined annotation results
|
|
@@ -164,8 +191,23 @@ def Combine_KEGG_arCOG(args):
|
|
|
164
191
|
fun_num = stats_dict[each_fun]
|
|
165
192
|
fun_pct = stats_dict_pct[each_fun]
|
|
166
193
|
fun_desc = fun_id_to_description_dict[each_fun]
|
|
167
|
-
|
|
168
|
-
|
|
194
|
+
|
|
195
|
+
fun_note = ''
|
|
196
|
+
if each_fun.startswith('arCOG'):
|
|
197
|
+
fun_cate_list = sorted(list(arcog_id_to_cate_dict[each_fun]))
|
|
198
|
+
for fun_cate in fun_cate_list:
|
|
199
|
+
fun_cate_desc = arcog_cate_to_desc_dict[fun_cate]
|
|
200
|
+
fun_note += ('%s__%s' % (fun_cate, fun_cate_desc))
|
|
201
|
+
elif each_fun.startswith('K'):
|
|
202
|
+
print(each_fun)
|
|
203
|
+
|
|
204
|
+
fun_b = fun_id_to_B_dict[each_fun]
|
|
205
|
+
fun_c = fun_id_to_C_dict[each_fun]
|
|
206
|
+
fun_note = '%s;%s' % (fun_c, fun_b)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
fun_stats_num_txt_handle.write('%s\t%s\t%s\t%s\n' % (each_fun, fun_num, fun_desc, fun_note))
|
|
210
|
+
fun_stats_pct_txt_handle.write('%s\t%s\t%s\t%s\n' % (each_fun, fun_pct, fun_desc, fun_note))
|
|
169
211
|
fun_stats_num_txt_handle.close()
|
|
170
212
|
fun_stats_pct_txt_handle.close()
|
|
171
213
|
|
|
@@ -186,6 +228,6 @@ if __name__ == '__main__':
|
|
|
186
228
|
'''
|
|
187
229
|
|
|
188
230
|
cd /Users/songweizhi/Desktop
|
|
189
|
-
BioSAK
|
|
231
|
+
python3 /Users/songweizhi/PycharmProjects/BioSAK/BioSAK/Combine_KEGG_arCOG.py -kegg 3_combined_genomes_50_5_dRep97_284_KEGG_wd -arcog 3_combined_genomes_50_5_dRep97_284_arCOG_wd_0.0001 -o 3_combined_genomes_50_5_dRep97_284_combined_KEGG_arCOG -f
|
|
190
232
|
|
|
191
233
|
'''
|
|
@@ -48,7 +48,7 @@ def remove_0_from_Pandas_Series(Pandas_Series):
|
|
|
48
48
|
return no_0_num_list
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
def summarize_stats(output_test, fold_diff_cutoff, ko_desc_dict, file_prefix, output_dir):
|
|
51
|
+
def summarize_stats(output_test, fold_diff_cutoff, ko_desc_dict, fun_to_note_dict, file_prefix, output_dir):
|
|
52
52
|
|
|
53
53
|
fold_diff_big = fold_diff_cutoff
|
|
54
54
|
fold_diff_small = 1/fold_diff_cutoff
|
|
@@ -73,8 +73,12 @@ def summarize_stats(output_test, fold_diff_cutoff, ko_desc_dict, file_prefix, ou
|
|
|
73
73
|
|
|
74
74
|
summary_txt_sample_1_handle = open(summary_txt_sample_1, 'w')
|
|
75
75
|
summary_txt_sample_2_handle = open(summary_txt_sample_2, 'w')
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
if len(fun_to_note_dict) == 0:
|
|
77
|
+
summary_txt_sample_1_handle.write('ID\tP_value\t%s\t%s\tMean_diff\tDescription\n' % (sample_1_id, sample_2_id))
|
|
78
|
+
summary_txt_sample_2_handle.write('ID\tP_value\t%s\t%s\tMean_diff\tDescription\n' % (sample_1_id, sample_2_id))
|
|
79
|
+
else:
|
|
80
|
+
summary_txt_sample_1_handle.write('ID\tP_value\t%s\t%s\tMean_diff\tDescription\tNote\n' % (sample_1_id, sample_2_id))
|
|
81
|
+
summary_txt_sample_2_handle.write('ID\tP_value\t%s\t%s\tMean_diff\tDescription\tNote\n' % (sample_1_id, sample_2_id))
|
|
78
82
|
line_num_index = 0
|
|
79
83
|
for ko in open(output_test):
|
|
80
84
|
if line_num_index > 0:
|
|
@@ -104,9 +108,15 @@ def summarize_stats(output_test, fold_diff_cutoff, ko_desc_dict, file_prefix, ou
|
|
|
104
108
|
enriched_in = sample_2_id
|
|
105
109
|
|
|
106
110
|
if enriched_in == sample_1_id:
|
|
107
|
-
|
|
111
|
+
if len(fun_to_note_dict) == 0:
|
|
112
|
+
summary_txt_sample_1_handle.write('%s\t%s\t%s\t%s\t%s\t%s\n' % (ko_id, P_value_adjusted, sample_1_mean, sample_2_mean, mean_diff, ko_desc_dict.get(ko_id, 'na')))
|
|
113
|
+
else:
|
|
114
|
+
summary_txt_sample_1_handle.write('%s\t%s\t%s\t%s\t%s\t%s\t%s\n' % (ko_id, P_value_adjusted, sample_1_mean, sample_2_mean, mean_diff, ko_desc_dict.get(ko_id, 'na'), fun_to_note_dict.get(ko_id, 'na')))
|
|
108
115
|
if enriched_in == sample_2_id:
|
|
109
|
-
|
|
116
|
+
if len(fun_to_note_dict) == 0:
|
|
117
|
+
summary_txt_sample_2_handle.write('%s\t%s\t%s\t%s\t%s\t%s\n' % (ko_id, P_value_adjusted, sample_1_mean, sample_2_mean, mean_diff, ko_desc_dict.get(ko_id, 'na')))
|
|
118
|
+
else:
|
|
119
|
+
summary_txt_sample_2_handle.write('%s\t%s\t%s\t%s\t%s\t%s\t%s\n' % (ko_id, P_value_adjusted, sample_1_mean, sample_2_mean, mean_diff, ko_desc_dict.get(ko_id, 'na'), fun_to_note_dict.get(ko_id, 'na')))
|
|
110
120
|
line_num_index += 1
|
|
111
121
|
summary_txt_sample_1_handle.close()
|
|
112
122
|
summary_txt_sample_2_handle.close()
|
|
@@ -203,6 +213,7 @@ def enrich(args):
|
|
|
203
213
|
identified_ko_set = set()
|
|
204
214
|
ko_dict_of_dict = {}
|
|
205
215
|
ko_desc_dict = dict()
|
|
216
|
+
fun_id_to_note_dict = dict()
|
|
206
217
|
for annotation_file in annotation_file_list_only_shared:
|
|
207
218
|
f_path, MAG_id, f_ext = sep_path_basename_ext(annotation_file)
|
|
208
219
|
current_MAG_ko_stats_dict = {}
|
|
@@ -216,6 +227,8 @@ def enrich(args):
|
|
|
216
227
|
current_MAG_ko_total += int(each_line_split[1])
|
|
217
228
|
if len(each_line_split) >= 3:
|
|
218
229
|
ko_desc_dict[each_line_split[0]] = each_line_split[2]
|
|
230
|
+
if len(each_line_split) == 4:
|
|
231
|
+
fun_id_to_note_dict[each_line_split[0]] = each_line_split[3]
|
|
219
232
|
line_num_index += 1
|
|
220
233
|
|
|
221
234
|
current_MAG_ko_stats_dict_norm = {}
|
|
@@ -304,7 +317,7 @@ def enrich(args):
|
|
|
304
317
|
output_test_handle.close()
|
|
305
318
|
|
|
306
319
|
# summarize stats
|
|
307
|
-
summarize_stats(stats_op_txt, fold_diff_cutoff, ko_desc_dict, op_prefix, op_dir)
|
|
320
|
+
summarize_stats(stats_op_txt, fold_diff_cutoff, ko_desc_dict, fun_id_to_note_dict, op_prefix, op_dir)
|
|
308
321
|
|
|
309
322
|
# file report
|
|
310
323
|
print('Done!')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.97.
|
|
3
|
+
Version: 1.97.2
|
|
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.97.
|
|
23
|
+
BioSAK v1.97.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.97.
|
|
3
|
+
Version: 1.97.2
|
|
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.97.
|
|
23
|
+
BioSAK v1.97.2
|
|
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
|
|
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
|