BioSAK 1.86.2__tar.gz → 1.86.3__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.86.2 → BioSAK-1.86.3}/BioSAK/VERSION +1 -1
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/ribbon.py +91 -71
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK.egg-info/PKG-INFO +2 -2
- {BioSAK-1.86.2 → BioSAK-1.86.3}/PKG-INFO +2 -2
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/BLCA_op_parser.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/BioSAK_config.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/COG2020.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/COG_boxplot_last1row.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/COG_boxplot_last2row.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/CheckM.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/ConvertMSA.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/DnaFeaturesViewer.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/FastaSplitler_by_num.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/FastaSplitler_by_size.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/GTDB_for_BLCA.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/Gene2Ctg.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/KEGG.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/KEGG_boxplot_last1row.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/KeepRemovingTmp.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/MeanMappingDepth.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/MetaBiosample.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/MetaCHIP_phylo.hmm +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/NetEnzymes.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/Newick_tree_plotter.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/OneLineAln.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/Prodigal.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/Reads_simulator.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/RunGraphMB.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/SILVA_for_BLCA.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/SankeyTaxon.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/SliceMSA.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/SubsampleLongReads.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/Tax4Fun2IndOTU.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/VisBlastOp.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/VisGeneFlk.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/__init__.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/add_desc.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/arCOG.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/bam2reads.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot_last1row.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot_matrix_COG.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot_matrix_KEGG.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/cat_fa.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/cdd2cog.pl +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/checkm_marker.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/compare_trees.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/compare_trees.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/cross_link_seqs.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/dbCAN.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/dwnld_sra_reads.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/enrich.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/exe_cmds.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/ezaai2mat.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/fa2id.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/fa2phy.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/fa2tree.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/format_converter.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/format_leaf_name.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/fq2fa.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gapseq.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gbk2faa.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gbk2ffn.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gbk2fna.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gbk_to_ffn_faa.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/gc.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_MAG_reads_long.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_Pfam_hmms.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_SCG_tree.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_TopHits_taxonomy.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_aa_composition.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_bin_abundance copy.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_data_matrix.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_gene_depth.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_genome_GTDB.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_genome_NCBI.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_genome_NCBI_v1.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_genome_NCBI_v2.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_gnm_size.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_ko_gene_seqs.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_krona_plot.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_reads_from_sam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_reads_id_in_sam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_sankey_plot.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_top_hit.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/get_total_length.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/global_functions.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/hpc3.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/iTOL.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/js_cmds.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/js_hpc3.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/keep_best_hit.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/ko00001.keg +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/koala.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/label_tree.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/label_tree.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/link_16S_MAG.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/magabund.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/magabund2.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/manipulator_fasta.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/manipulator_msa.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/manipulator_newick.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/manipulator_sam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/mannwhitneyu.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/mean_MAG_cov.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/merge_df.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/merge_seq.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/metaAssembly.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/metabat2concoct.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/metabat2maxbin.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/msa_to_distance_matrix.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/ncbi_dataset.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/odp.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/parse_mmseqs_tsv.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/plot_mag.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/plot_sam_depth.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/plot_tree.R +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/prefix_file.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/prokka.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/reads2bam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/rename_leaves.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/rename_reads_for_Reago.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/rename_seq.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/rename_seqs.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/sam2bam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/sampling_GTDB_gnms.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/select_seq.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/sep_reads_by_barcode.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/slice_seq.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/split_fasta.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/split_folder.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/split_sam.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/submitHPC.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/subset_GTDB_meta.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/subset_df.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/subset_tree.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/tmp_1.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/top_16S_hits.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/top_hits_in_a_group.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/transpose.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/usearch_uc.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK/wilcox.py +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK.egg-info/SOURCES.txt +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK.egg-info/dependency_links.txt +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK.egg-info/requires.txt +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/BioSAK.egg-info/top_level.txt +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/LICENSE +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/MANIFEST.in +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/README.md +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/bin/BioSAK +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/setup.cfg +0 -0
- {BioSAK-1.86.2 → BioSAK-1.86.3}/setup.py +0 -0
|
@@ -14,7 +14,7 @@ ribbon_usage = '''
|
|
|
14
14
|
# example commands
|
|
15
15
|
odp="/scratch/PI/ocessongwz/Software/odp/scripts/odp"
|
|
16
16
|
odp_rbh_to_ribbon="/scratch/PI/ocessongwz/Software/odp/scripts/odp_rbh_to_ribbon"
|
|
17
|
-
BioSAK ribbon -co chrom_order.txt -o ribbon_op_dir -fa example_files -pep example_files -chrom example_files -f -odp $odp -odp_rbh_to_ribbon $odp_rbh_to_ribbon
|
|
17
|
+
BioSAK ribbon -plot_lgs -co chrom_order.txt -o ribbon_op_dir -fa example_files -pep example_files -chrom example_files -f -odp $odp -odp_rbh_to_ribbon $odp_rbh_to_ribbon
|
|
18
18
|
|
|
19
19
|
Note:
|
|
20
20
|
1. Species names can't have '_' char
|
|
@@ -58,6 +58,8 @@ def ribbon(args):
|
|
|
58
58
|
|
|
59
59
|
################################################# define file name #################################################
|
|
60
60
|
|
|
61
|
+
wd_path = os.path.abspath(os.getcwd())
|
|
62
|
+
|
|
61
63
|
get_macrosynteny_plot_wd = '%s/get_macrosynteny_plot' % op_dir
|
|
62
64
|
get_ribbon_diagram_wd = '%s/get_ribbon_diagram' % op_dir
|
|
63
65
|
config_yaml_macrosynteny = '%s/config.yaml' % get_macrosynteny_plot_wd
|
|
@@ -113,14 +115,6 @@ def ribbon(args):
|
|
|
113
115
|
op_dir_abspath = os.path.abspath(op_dir)
|
|
114
116
|
get_macrosynteny_plot_wd_abspath = os.path.abspath(get_macrosynteny_plot_wd)
|
|
115
117
|
get_ribbon_diagram_wd_abspath = os.path.abspath(get_ribbon_diagram_wd)
|
|
116
|
-
rbh_file_dir = '%s/odp/step2-figures/synteny_nocolor' % get_macrosynteny_plot_wd_abspath
|
|
117
|
-
step2_figures_abspath = '%s/odp/step2-figures' % get_macrosynteny_plot_wd_abspath
|
|
118
|
-
|
|
119
|
-
rbh_file_dir_plot_lgs = ''
|
|
120
|
-
step2_figures_sub_dir_list = next(os.walk(step2_figures_abspath))[1]
|
|
121
|
-
for each_sub_dir in step2_figures_sub_dir_list:
|
|
122
|
-
if each_sub_dir.startwith('synteny_coloredby'):
|
|
123
|
-
rbh_file_dir_plot_lgs = '%s/%s' % (step2_figures_abspath, each_sub_dir)
|
|
124
118
|
|
|
125
119
|
################################### get config.yaml for getting macrosynteny plot ##################################
|
|
126
120
|
|
|
@@ -152,71 +146,15 @@ def ribbon(args):
|
|
|
152
146
|
config_yaml_macrosynteny_handle.write(' minscafsize: %s\n' % minscafsize)
|
|
153
147
|
config_yaml_macrosynteny_handle.close()
|
|
154
148
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
config_yaml_ribbon_handle = open(config_yaml_ribbon, 'w')
|
|
158
|
-
config_yaml_ribbon_handle.write('chr_sort_order: optimal-chr-or\n')
|
|
159
|
-
if plot_all is True:
|
|
160
|
-
config_yaml_ribbon_handle.write('plot_all: True\n')
|
|
161
|
-
else:
|
|
162
|
-
config_yaml_ribbon_handle.write('plot_all: False\n')
|
|
163
|
-
config_yaml_ribbon_handle.write('\n')
|
|
164
|
-
|
|
165
|
-
# write out species_order section
|
|
166
|
-
config_yaml_ribbon_handle.write('species_order:\n')
|
|
167
|
-
for species in species_order_list:
|
|
168
|
-
config_yaml_ribbon_handle.write(' - %s\n' % species)
|
|
169
|
-
config_yaml_ribbon_handle.write('\n')
|
|
170
|
-
|
|
171
|
-
# write out chromorder section
|
|
172
|
-
config_yaml_ribbon_handle.write('chromorder:\n')
|
|
173
|
-
if chrom_order_txt is not None:
|
|
174
|
-
for each_s in chrom_order_dict:
|
|
175
|
-
config_yaml_ribbon_handle.write(' %s:\n' % each_s)
|
|
176
|
-
for each_chrom in chrom_order_dict[each_s]:
|
|
177
|
-
config_yaml_ribbon_handle.write(' - %s\n' % each_chrom)
|
|
178
|
-
config_yaml_ribbon_handle.write('\n')
|
|
179
|
-
else:
|
|
180
|
-
for each_species in species_order_list:
|
|
181
|
-
current_chrom_list = species_to_chrom_dict.get(each_species, [])
|
|
182
|
-
if len(current_chrom_list) > 0:
|
|
183
|
-
config_yaml_ribbon_handle.write(' %s:\n' % each_species)
|
|
184
|
-
for each_chrom in current_chrom_list:
|
|
185
|
-
config_yaml_ribbon_handle.write(' - %s\n' % each_chrom)
|
|
186
|
-
config_yaml_ribbon_handle.write('\n')
|
|
187
|
-
|
|
188
|
-
# write out rbh_directory section
|
|
189
|
-
if plot_lgs is False:
|
|
190
|
-
config_yaml_ribbon_handle.write('rbh_directory: %s\n' % rbh_file_dir)
|
|
191
|
-
else:
|
|
192
|
-
config_yaml_ribbon_handle.write('rbh_directory: %s\n' % rbh_file_dir_plot_lgs)
|
|
193
|
-
config_yaml_ribbon_handle.write('\n')
|
|
194
|
-
|
|
195
|
-
# write out species section
|
|
196
|
-
config_yaml_ribbon_handle.write('species:\n')
|
|
197
|
-
for each_species in species_order_list:
|
|
198
|
-
current_fa = '%s/%s.fa' % (fa_in_abspath, each_species)
|
|
199
|
-
current_pep = '%s/%s.pep' % (fa_in_abspath, each_species)
|
|
200
|
-
current_chrom = '%s/%s.chrom' % (fa_in_abspath, each_species)
|
|
201
|
-
config_yaml_ribbon_handle.write(' %s:\n' % each_species)
|
|
202
|
-
config_yaml_ribbon_handle.write(' proteins: %s\n' % current_pep)
|
|
203
|
-
config_yaml_ribbon_handle.write(' chrom: %s\n' % current_chrom)
|
|
204
|
-
config_yaml_ribbon_handle.write(' genome: %s\n' % current_fa)
|
|
205
|
-
config_yaml_ribbon_handle.write(' minscafsize: %s\n' % minscafsize)
|
|
206
|
-
config_yaml_ribbon_handle.close()
|
|
207
|
-
|
|
208
|
-
################################################## run snakemake ###################################################
|
|
149
|
+
############################################### get macrosynteny plot ##############################################
|
|
209
150
|
|
|
210
151
|
snakemake_cmd_macrosynteny = 'snakemake --cores %s --snakefile %s' % (thread_num, odp_exe)
|
|
211
|
-
snakemake_cmd_ribbon = 'snakemake --cores %s --snakefile %s' % (thread_num, odp_rbh_to_ribbon_exe)
|
|
212
152
|
|
|
213
153
|
# write out commands
|
|
214
154
|
cmd_txt_handle = open(cmd_txt, 'w')
|
|
215
155
|
cmd_txt_handle.write('cd %s\n' % get_macrosynteny_plot_wd_abspath)
|
|
216
156
|
cmd_txt_handle.write(snakemake_cmd_macrosynteny + '\n')
|
|
217
157
|
cmd_txt_handle.write('\n')
|
|
218
|
-
cmd_txt_handle.write('cd %s\n' % get_ribbon_diagram_wd_abspath)
|
|
219
|
-
cmd_txt_handle.write(snakemake_cmd_ribbon + '\n')
|
|
220
158
|
cmd_txt_handle.close()
|
|
221
159
|
|
|
222
160
|
# get macrosynteny plot
|
|
@@ -224,14 +162,96 @@ def ribbon(args):
|
|
|
224
162
|
os.chdir(get_macrosynteny_plot_wd_abspath)
|
|
225
163
|
os.system(snakemake_cmd_macrosynteny)
|
|
226
164
|
|
|
165
|
+
#################################### get config.yaml for getting ribbon diagram ####################################
|
|
166
|
+
|
|
167
|
+
os.chdir(wd_path)
|
|
168
|
+
step2_figures_abspath = '%s/odp/step2-figures' % get_macrosynteny_plot_wd_abspath
|
|
169
|
+
snakemake_cmd_ribbon = 'snakemake --cores %s --snakefile %s' % (thread_num, odp_rbh_to_ribbon_exe)
|
|
170
|
+
|
|
171
|
+
step2_figures_sub_dir_list = next(os.walk(step2_figures_abspath))[1]
|
|
172
|
+
synteny_plot_list = ['synteny_nocolor']
|
|
173
|
+
for each_sub_dir in step2_figures_sub_dir_list:
|
|
174
|
+
if each_sub_dir.startswith('synteny_coloredby'):
|
|
175
|
+
synteny_plot_list.append(each_sub_dir)
|
|
176
|
+
|
|
177
|
+
for color_setting in synteny_plot_list:
|
|
178
|
+
current_synteny_dir = '%s/%s' % (step2_figures_abspath, color_setting)
|
|
179
|
+
current_wd = '%s/%s' % (get_ribbon_diagram_wd_abspath, color_setting)
|
|
180
|
+
current_config_yaml_ribbon = '%s/config.yaml' % current_wd
|
|
181
|
+
os.mkdir(current_wd)
|
|
182
|
+
|
|
183
|
+
with open(cmd_txt, 'a') as cmd_txt_handle:
|
|
184
|
+
cmd_txt_handle.write('cd %s\n' % current_wd)
|
|
185
|
+
cmd_txt_handle.write(snakemake_cmd_ribbon + '\n')
|
|
186
|
+
cmd_txt_handle.write('\n')
|
|
187
|
+
|
|
188
|
+
config_yaml_ribbon_handle = open(current_config_yaml_ribbon, 'w')
|
|
189
|
+
config_yaml_ribbon_handle.write('chr_sort_order: optimal-chr-or\n')
|
|
190
|
+
if plot_all is True:
|
|
191
|
+
config_yaml_ribbon_handle.write('plot_all: True\n')
|
|
192
|
+
else:
|
|
193
|
+
config_yaml_ribbon_handle.write('plot_all: False\n')
|
|
194
|
+
config_yaml_ribbon_handle.write('\n')
|
|
195
|
+
|
|
196
|
+
# write out species_order section
|
|
197
|
+
config_yaml_ribbon_handle.write('species_order:\n')
|
|
198
|
+
for species in species_order_list:
|
|
199
|
+
config_yaml_ribbon_handle.write(' - %s\n' % species)
|
|
200
|
+
config_yaml_ribbon_handle.write('\n')
|
|
201
|
+
|
|
202
|
+
# write out chromorder section
|
|
203
|
+
config_yaml_ribbon_handle.write('chromorder:\n')
|
|
204
|
+
if chrom_order_txt is not None:
|
|
205
|
+
for each_s in chrom_order_dict:
|
|
206
|
+
config_yaml_ribbon_handle.write(' %s:\n' % each_s)
|
|
207
|
+
for each_chrom in chrom_order_dict[each_s]:
|
|
208
|
+
config_yaml_ribbon_handle.write(' - %s\n' % each_chrom)
|
|
209
|
+
config_yaml_ribbon_handle.write('\n')
|
|
210
|
+
else:
|
|
211
|
+
for each_species in species_order_list:
|
|
212
|
+
current_chrom_list = species_to_chrom_dict.get(each_species, [])
|
|
213
|
+
if len(current_chrom_list) > 0:
|
|
214
|
+
config_yaml_ribbon_handle.write(' %s:\n' % each_species)
|
|
215
|
+
for each_chrom in current_chrom_list:
|
|
216
|
+
config_yaml_ribbon_handle.write(' - %s\n' % each_chrom)
|
|
217
|
+
config_yaml_ribbon_handle.write('\n')
|
|
218
|
+
|
|
219
|
+
# write out rbh_directory section
|
|
220
|
+
config_yaml_ribbon_handle.write('rbh_directory: %s\n' % current_synteny_dir)
|
|
221
|
+
config_yaml_ribbon_handle.write('\n')
|
|
222
|
+
|
|
223
|
+
# write out species section
|
|
224
|
+
config_yaml_ribbon_handle.write('species:\n')
|
|
225
|
+
for each_species in species_order_list:
|
|
226
|
+
current_fa = '%s/%s.fa' % (fa_in_abspath, each_species)
|
|
227
|
+
current_pep = '%s/%s.pep' % (fa_in_abspath, each_species)
|
|
228
|
+
current_chrom = '%s/%s.chrom' % (fa_in_abspath, each_species)
|
|
229
|
+
config_yaml_ribbon_handle.write(' %s:\n' % each_species)
|
|
230
|
+
config_yaml_ribbon_handle.write(' proteins: %s\n' % current_pep)
|
|
231
|
+
config_yaml_ribbon_handle.write(' chrom: %s\n' % current_chrom)
|
|
232
|
+
config_yaml_ribbon_handle.write(' genome: %s\n' % current_fa)
|
|
233
|
+
config_yaml_ribbon_handle.write(' minscafsize: %s\n' % minscafsize)
|
|
234
|
+
config_yaml_ribbon_handle.close()
|
|
235
|
+
|
|
236
|
+
################################################## run snakemake ###################################################
|
|
237
|
+
|
|
227
238
|
# get ribbon diagram
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
for color_setting in synteny_plot_list:
|
|
240
|
+
|
|
241
|
+
current_wd = '%s/%s' % (get_ribbon_diagram_wd_abspath, color_setting)
|
|
242
|
+
pwd_plot_file = '%s/output.pdf' % current_wd
|
|
243
|
+
pwd_plot_file_relocated = '%s/%s.pdf' % (get_ribbon_diagram_wd_abspath, color_setting)
|
|
244
|
+
|
|
245
|
+
print(snakemake_cmd_ribbon)
|
|
246
|
+
os.chdir(current_wd)
|
|
247
|
+
os.system(snakemake_cmd_ribbon)
|
|
248
|
+
|
|
249
|
+
if os.path.isfile(pwd_plot_file) is True:
|
|
250
|
+
os.system('mv %s %s' % (pwd_plot_file, pwd_plot_file_relocated))
|
|
231
251
|
|
|
232
252
|
################################################### final report ###################################################
|
|
233
253
|
|
|
234
|
-
print('Ribbon diagram exported to %s
|
|
254
|
+
print('Ribbon diagram exported to %s' % get_ribbon_diagram_wd)
|
|
235
255
|
print('Done!')
|
|
236
256
|
|
|
237
257
|
####################################################################################################################
|
|
@@ -267,5 +287,5 @@ if __name__ == '__main__':
|
|
|
267
287
|
'''
|
|
268
288
|
|
|
269
289
|
python3 /Users/songweizhi/PycharmProjects/BioSAK/BioSAK/ribbon.py -o demo -fa example_files -f -odp /scratch/PI/ocessongwz/Software/odp/scripts/odp -odp_rbh_to_ribbon /scratch/PI/ocessongwz/Software/odp/scripts/odp_rbh_to_ribbon
|
|
270
|
-
|
|
290
|
+
|
|
271
291
|
'''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.86.
|
|
3
|
+
Version: 1.86.3
|
|
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.86.
|
|
23
|
+
BioSAK v1.86.3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.86.
|
|
3
|
+
Version: 1.86.3
|
|
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.86.
|
|
23
|
+
BioSAK v1.86.3
|
|
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
|