BioSAK 1.86.0__tar.gz → 1.86.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.86.0 → BioSAK-1.86.2}/BioSAK/VERSION +3 -3
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/ribbon.py +65 -29
- BioSAK-1.86.2/BioSAK/tmp_1.py +6 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK.egg-info/PKG-INFO +2 -2
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK.egg-info/SOURCES.txt +1 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/PKG-INFO +2 -2
- {BioSAK-1.86.0 → BioSAK-1.86.2}/bin/BioSAK +1 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/BLCA_op_parser.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/BioSAK_config.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/COG2020.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/COG_boxplot_last1row.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/COG_boxplot_last2row.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/CheckM.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/ConvertMSA.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/DnaFeaturesViewer.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/FastaSplitler_by_num.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/FastaSplitler_by_size.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/GTDB_for_BLCA.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/Gene2Ctg.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/KEGG.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/KEGG_boxplot_last1row.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/KeepRemovingTmp.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/MeanMappingDepth.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/MetaBiosample.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/MetaCHIP_phylo.hmm +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/NetEnzymes.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/Newick_tree_plotter.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/OneLineAln.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/Prodigal.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/Reads_simulator.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/RunGraphMB.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/SILVA_for_BLCA.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/SankeyTaxon.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/SliceMSA.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/SubsampleLongReads.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/Tax4Fun2IndOTU.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/VisBlastOp.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/VisGeneFlk.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/__init__.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/add_desc.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/arCOG.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/bam2reads.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot_last1row.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot_matrix_COG.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot_matrix_KEGG.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/cat_fa.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/cdd2cog.pl +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/checkm_marker.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/compare_trees.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/compare_trees.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/cross_link_seqs.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/dbCAN.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/dwnld_sra_reads.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/enrich.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/exe_cmds.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/ezaai2mat.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/fa2id.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/fa2phy.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/fa2tree.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/format_converter.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/format_leaf_name.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/fq2fa.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gapseq.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gbk2faa.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gbk2ffn.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gbk2fna.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gbk_to_ffn_faa.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/gc.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_MAG_reads_long.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_Pfam_hmms.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_SCG_tree.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_TopHits_taxonomy.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_aa_composition.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_bin_abundance copy.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_data_matrix.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_gene_depth.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_genome_GTDB.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_genome_NCBI.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_genome_NCBI_v1.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_genome_NCBI_v2.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_gnm_size.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_ko_gene_seqs.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_krona_plot.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_reads_from_sam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_reads_id_in_sam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_sankey_plot.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_top_hit.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/get_total_length.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/global_functions.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/hpc3.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/iTOL.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/js_cmds.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/js_hpc3.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/keep_best_hit.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/ko00001.keg +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/koala.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/label_tree.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/label_tree.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/link_16S_MAG.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/magabund.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/magabund2.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/manipulator_fasta.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/manipulator_msa.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/manipulator_newick.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/manipulator_sam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/mannwhitneyu.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/mean_MAG_cov.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/merge_df.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/merge_seq.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/metaAssembly.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/metabat2concoct.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/metabat2maxbin.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/msa_to_distance_matrix.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/ncbi_dataset.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/odp.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/parse_mmseqs_tsv.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/plot_mag.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/plot_sam_depth.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/plot_tree.R +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/prefix_file.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/prokka.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/reads2bam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/rename_leaves.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/rename_reads_for_Reago.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/rename_seq.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/rename_seqs.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/sam2bam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/sampling_GTDB_gnms.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/select_seq.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/sep_reads_by_barcode.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/slice_seq.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/split_fasta.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/split_folder.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/split_sam.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/submitHPC.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/subset_GTDB_meta.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/subset_df.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/subset_tree.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/top_16S_hits.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/top_hits_in_a_group.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/transpose.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/usearch_uc.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK/wilcox.py +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK.egg-info/dependency_links.txt +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK.egg-info/requires.txt +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/BioSAK.egg-info/top_level.txt +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/LICENSE +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/MANIFEST.in +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/README.md +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/setup.cfg +0 -0
- {BioSAK-1.86.0 → BioSAK-1.86.2}/setup.py +0 -0
|
@@ -6,26 +6,15 @@ from Bio import SeqIO
|
|
|
6
6
|
# Make ribbon diagrams of conserved linkages between genomes
|
|
7
7
|
# https://github.com/conchoecia/odp
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
def sep_path_basename_ext(file_in):
|
|
11
|
-
|
|
12
|
-
f_path, f_name = os.path.split(file_in)
|
|
13
|
-
if f_path == '':
|
|
14
|
-
f_path = '.'
|
|
15
|
-
f_base, f_ext = os.path.splitext(f_name)
|
|
16
|
-
|
|
17
|
-
return f_name, f_path, f_base, f_ext[1:]
|
|
18
|
-
|
|
19
|
-
|
|
20
9
|
ribbon_usage = '''
|
|
21
10
|
==================== ribbon example commands ====================
|
|
22
11
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
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
|
|
12
|
+
# Dependencies: opd
|
|
26
13
|
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
# example commands
|
|
15
|
+
odp="/scratch/PI/ocessongwz/Software/odp/scripts/odp"
|
|
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
|
|
29
18
|
|
|
30
19
|
Note:
|
|
31
20
|
1. Species names can't have '_' char
|
|
@@ -34,6 +23,16 @@ Note:
|
|
|
34
23
|
'''
|
|
35
24
|
|
|
36
25
|
|
|
26
|
+
def sep_path_basename_ext(file_in):
|
|
27
|
+
|
|
28
|
+
f_path, f_name = os.path.split(file_in)
|
|
29
|
+
if f_path == '':
|
|
30
|
+
f_path = '.'
|
|
31
|
+
f_base, f_ext = os.path.splitext(f_name)
|
|
32
|
+
|
|
33
|
+
return f_name, f_path, f_base, f_ext[1:]
|
|
34
|
+
|
|
35
|
+
|
|
37
36
|
def ribbon(args):
|
|
38
37
|
|
|
39
38
|
fa_in = args['fa']
|
|
@@ -55,13 +54,15 @@ def ribbon(args):
|
|
|
55
54
|
odp_exe = args['odp']
|
|
56
55
|
odp_rbh_to_ribbon_exe = args['odp_rbh_to_ribbon']
|
|
57
56
|
plot_all = args['plot_all']
|
|
57
|
+
plot_lgs = args['plot_lgs']
|
|
58
58
|
|
|
59
59
|
################################################# define file name #################################################
|
|
60
60
|
|
|
61
|
-
get_macrosynteny_plot_wd = '%s/get_macrosynteny_plot'
|
|
62
|
-
get_ribbon_diagram_wd = '%s/get_ribbon_diagram'
|
|
63
|
-
config_yaml_macrosynteny = '%s/config.yaml'
|
|
64
|
-
config_yaml_ribbon = '%s/config.yaml'
|
|
61
|
+
get_macrosynteny_plot_wd = '%s/get_macrosynteny_plot' % op_dir
|
|
62
|
+
get_ribbon_diagram_wd = '%s/get_ribbon_diagram' % op_dir
|
|
63
|
+
config_yaml_macrosynteny = '%s/config.yaml' % get_macrosynteny_plot_wd
|
|
64
|
+
config_yaml_ribbon = '%s/config.yaml' % get_ribbon_diagram_wd
|
|
65
|
+
cmd_txt = '%s/commands.txt' % op_dir
|
|
65
66
|
|
|
66
67
|
####################################################################################################################
|
|
67
68
|
|
|
@@ -108,12 +109,18 @@ def ribbon(args):
|
|
|
108
109
|
chrom_order_dict[s_id] = []
|
|
109
110
|
chrom_order_dict[s_id].append(c_id)
|
|
110
111
|
|
|
111
|
-
fa_in_abspath
|
|
112
|
-
op_dir_abspath
|
|
113
|
-
get_macrosynteny_plot_wd_abspath
|
|
114
|
-
get_ribbon_diagram_wd_abspath
|
|
112
|
+
fa_in_abspath = os.path.abspath(fa_in)
|
|
113
|
+
op_dir_abspath = os.path.abspath(op_dir)
|
|
114
|
+
get_macrosynteny_plot_wd_abspath = os.path.abspath(get_macrosynteny_plot_wd)
|
|
115
|
+
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
|
|
115
118
|
|
|
116
|
-
|
|
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)
|
|
117
124
|
|
|
118
125
|
################################### get config.yaml for getting macrosynteny plot ##################################
|
|
119
126
|
|
|
@@ -122,7 +129,13 @@ def ribbon(args):
|
|
|
122
129
|
config_yaml_macrosynteny_handle.write('ignore_autobreaks: True\n')
|
|
123
130
|
config_yaml_macrosynteny_handle.write('diamond_or_blastp: "diamond"\n')
|
|
124
131
|
config_yaml_macrosynteny_handle.write('duplicate_proteins: "pass"\n')
|
|
125
|
-
|
|
132
|
+
|
|
133
|
+
# write out plot_LGs
|
|
134
|
+
if plot_lgs is True:
|
|
135
|
+
config_yaml_macrosynteny_handle.write('plot_LGs: True\n')
|
|
136
|
+
else:
|
|
137
|
+
config_yaml_macrosynteny_handle.write('plot_LGs: False\n')
|
|
138
|
+
|
|
126
139
|
config_yaml_macrosynteny_handle.write('plot_sp_sp: True\n')
|
|
127
140
|
config_yaml_macrosynteny_handle.write('\n')
|
|
128
141
|
|
|
@@ -157,14 +170,12 @@ def ribbon(args):
|
|
|
157
170
|
|
|
158
171
|
# write out chromorder section
|
|
159
172
|
config_yaml_ribbon_handle.write('chromorder:\n')
|
|
160
|
-
|
|
161
173
|
if chrom_order_txt is not None:
|
|
162
174
|
for each_s in chrom_order_dict:
|
|
163
175
|
config_yaml_ribbon_handle.write(' %s:\n' % each_s)
|
|
164
176
|
for each_chrom in chrom_order_dict[each_s]:
|
|
165
177
|
config_yaml_ribbon_handle.write(' - %s\n' % each_chrom)
|
|
166
178
|
config_yaml_ribbon_handle.write('\n')
|
|
167
|
-
|
|
168
179
|
else:
|
|
169
180
|
for each_species in species_order_list:
|
|
170
181
|
current_chrom_list = species_to_chrom_dict.get(each_species, [])
|
|
@@ -175,7 +186,10 @@ def ribbon(args):
|
|
|
175
186
|
config_yaml_ribbon_handle.write('\n')
|
|
176
187
|
|
|
177
188
|
# write out rbh_directory section
|
|
178
|
-
|
|
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)
|
|
179
193
|
config_yaml_ribbon_handle.write('\n')
|
|
180
194
|
|
|
181
195
|
# write out species section
|
|
@@ -196,6 +210,15 @@ def ribbon(args):
|
|
|
196
210
|
snakemake_cmd_macrosynteny = 'snakemake --cores %s --snakefile %s' % (thread_num, odp_exe)
|
|
197
211
|
snakemake_cmd_ribbon = 'snakemake --cores %s --snakefile %s' % (thread_num, odp_rbh_to_ribbon_exe)
|
|
198
212
|
|
|
213
|
+
# write out commands
|
|
214
|
+
cmd_txt_handle = open(cmd_txt, 'w')
|
|
215
|
+
cmd_txt_handle.write('cd %s\n' % get_macrosynteny_plot_wd_abspath)
|
|
216
|
+
cmd_txt_handle.write(snakemake_cmd_macrosynteny + '\n')
|
|
217
|
+
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
|
+
cmd_txt_handle.close()
|
|
221
|
+
|
|
199
222
|
# get macrosynteny plot
|
|
200
223
|
print(snakemake_cmd_macrosynteny)
|
|
201
224
|
os.chdir(get_macrosynteny_plot_wd_abspath)
|
|
@@ -206,8 +229,13 @@ def ribbon(args):
|
|
|
206
229
|
os.chdir(get_ribbon_diagram_wd_abspath)
|
|
207
230
|
os.system(snakemake_cmd_ribbon)
|
|
208
231
|
|
|
232
|
+
################################################### final report ###################################################
|
|
233
|
+
|
|
234
|
+
print('Ribbon diagram exported to %s/output.pdf' % get_ribbon_diagram_wd)
|
|
209
235
|
print('Done!')
|
|
210
236
|
|
|
237
|
+
####################################################################################################################
|
|
238
|
+
|
|
211
239
|
|
|
212
240
|
if __name__ == '__main__':
|
|
213
241
|
|
|
@@ -229,7 +257,15 @@ if __name__ == '__main__':
|
|
|
229
257
|
ribbon_parser.add_argument('-t', required=False, type=int, default=1, help='number of core, default: 1')
|
|
230
258
|
ribbon_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
231
259
|
ribbon_parser.add_argument('-plot_all', required=False, action="store_true", help='plot_all')
|
|
260
|
+
ribbon_parser.add_argument('-plot_lgs', required=False, action="store_true", help='plot_LGs')
|
|
232
261
|
ribbon_parser.add_argument('-odp', required=False, default='odp', help='executable file odp, default: odp')
|
|
233
262
|
ribbon_parser.add_argument('-odp_rbh_to_ribbon', required=False, default='odp_rbh_to_ribbon', help='executable file odp_rbh_to_ribbon, default: odp_rbh_to_ribbon')
|
|
234
263
|
args = vars(ribbon_parser.parse_args())
|
|
235
264
|
ribbon(args)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
'''
|
|
268
|
+
|
|
269
|
+
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
|
+
plot_LGs
|
|
271
|
+
'''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.86.
|
|
3
|
+
Version: 1.86.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.86.
|
|
23
|
+
BioSAK v1.86.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.86.
|
|
3
|
+
Version: 1.86.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.86.
|
|
23
|
+
BioSAK v1.86.2
|
|
@@ -1019,6 +1019,7 @@ if __name__ == '__main__':
|
|
|
1019
1019
|
ribbon_parser.add_argument('-t', required=False, type=int, default=1, help='number of core, default: 1')
|
|
1020
1020
|
ribbon_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
1021
1021
|
ribbon_parser.add_argument('-plot_all', required=False, action="store_true", help='plot_all')
|
|
1022
|
+
ribbon_parser.add_argument('-plot_lgs', required=False, action="store_true", help='plot_LGs')
|
|
1022
1023
|
ribbon_parser.add_argument('-odp', required=False, default='odp', help='executable file odp, default: odp')
|
|
1023
1024
|
ribbon_parser.add_argument('-odp_rbh_to_ribbon', required=False, default='odp_rbh_to_ribbon', help='executable file odp_rbh_to_ribbon, default: odp_rbh_to_ribbon')
|
|
1024
1025
|
args = vars(parser.parse_args())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|