BioSAK 1.92.0__tar.gz → 1.92.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.92.0 → BioSAK-1.92.2}/BioSAK/VERSION +4 -4
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/hpc3.py +18 -6
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/subset_df.py +36 -34
- BioSAK-1.92.2/BioSAK/tmp_2.py +34 -0
- BioSAK-1.92.2/BioSAK/tmp_3.py +6 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK.egg-info/PKG-INFO +2 -2
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK.egg-info/SOURCES.txt +2 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/PKG-INFO +2 -2
- {BioSAK-1.92.0 → BioSAK-1.92.2}/bin/BioSAK +4 -3
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/BLCA_op_parser.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/BioSAK_config.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/COG2020.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/COG_boxplot_last1row.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/COG_boxplot_last2row.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/CheckM.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/DnaFeaturesViewer.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/FastaSplitler_by_num.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/FastaSplitler_by_size.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/GTDB_for_BLCA.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/Gene2Ctg.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/KEGG.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/KEGG_boxplot_last1row.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/KeepRemovingTmp.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/MeanMappingDepth.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/MetaBiosample.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/MetaCHIP_phylo.hmm +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/NetEnzymes.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/Prodigal.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/Reads_simulator.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/RunGraphMB.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/SILVA_for_BLCA.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/SankeyTaxon.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/SubsampleLongReads.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/Tax4Fun2IndOTU.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/VisBlastOp.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/VisGeneFlk.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/__init__.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/add_desc.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/arCOG.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/bam2reads.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot_last1row.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot_matrix_COG.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot_matrix_KEGG.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/cat_fa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/cdd2cog.pl +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/checkm_marker.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/compare_sets.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/count_num.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/cross_link_seqs.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/dbCAN.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/dwnld_sra_reads.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/enrich.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/exe_cmds.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/ezaai2mat.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/fa2id.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/fastaai.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/format_converter.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/fq2fa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gapseq.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gbk2faa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gbk2ffn.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gbk2fna.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gbk2gff.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gbk_to_ffn_faa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gc.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_MAG_reads_long.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_Pfam_hmms.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_TopHits_taxonomy.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_aa_composition.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_bin_abundance copy.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_data_matrix.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_gene_depth.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_genome_GTDB.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_genome_NCBI.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_genome_NCBI_v1.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_genome_NCBI_v2.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_gnm_size.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_ko_gene_seqs.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_krona_plot.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_reads_from_sam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_reads_id_in_sam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_top_hit.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/get_total_length.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/gff2chrom.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/global_functions.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/js_cmds.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/js_hpc3.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/keep_best_hit.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/ko00001.keg +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/koala.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/link_16S_MAG.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/magabund.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/magabund2.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/manipulator_fasta.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/manipulator_msa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/manipulator_newick.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/manipulator_sam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/mann_whitney_u.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/mean_MAG_cov.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/merge_df.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/merge_seq.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/metaAssembly.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/metabat2concoct.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/metabat2maxbin.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/msa_to_distance_matrix.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/ncbi_dataset.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/odp.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/parse_mmseqs_tsv.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/plot_mag.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/plot_sam_depth.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/plot_tree.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/prefix_file.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/prokka.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/reads2bam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/rename_reads_for_Reago.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/rename_seq.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/rename_seqs.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/ribbon.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/sam2bam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/sampling_GTDB_gnms.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/sankey.R +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/sankey.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/select_seq.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/sep_reads_by_barcode.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/slice_seq.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/split_fasta.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/split_folder.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/split_sam.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/srun.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/statsTaxa.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/submitHPC.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/subset_GTDB_meta.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/subset_tree.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/tmp_1.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/top_16S_hits.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/top_hits_in_a_group.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/transpose.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/usearch_uc.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK/wilcox.py +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK.egg-info/dependency_links.txt +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK.egg-info/requires.txt +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/BioSAK.egg-info/top_level.txt +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/LICENSE +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/MANIFEST.in +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/README.md +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/setup.cfg +0 -0
- {BioSAK-1.92.0 → BioSAK-1.92.2}/setup.py +0 -0
|
@@ -3,14 +3,16 @@ import argparse
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
hpc3_usage = '''
|
|
6
|
-
|
|
6
|
+
========================= hpc3 example commands =========================
|
|
7
7
|
|
|
8
8
|
BioSAK hpc3 -q cpu-share -n iqtree_1 -c "iqtree -h"
|
|
9
|
-
BioSAK hpc3 -q cpu -
|
|
10
|
-
BioSAK hpc3 -q cpu-share -t 1 -n wget_cog -c "wget https://ftp.ncbi.nih.gov/pub/COG/COG2020/data/cog-20.fa.gz"
|
|
9
|
+
BioSAK hpc3 -q cpu-share -t 1 -n iqtree_3 -c "iqtree -h"
|
|
11
10
|
BioSAK hpc3 -q cpu-share -t 12 -tpc 3 -n mcmctree -c mcmctree_cmds.txt
|
|
11
|
+
BioSAK hpc3 -q cpu -a oces -conda mybase -n iqtree_2 -c "iqtree -h"
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
# To use srun, you commands must NOT contain the double quote symbol (").
|
|
14
|
+
|
|
15
|
+
=========================================================================
|
|
14
16
|
'''
|
|
15
17
|
|
|
16
18
|
|
|
@@ -26,6 +28,7 @@ def hpc3(args):
|
|
|
26
28
|
queue_name = args['q']
|
|
27
29
|
conda_env = args['conda']
|
|
28
30
|
setting_a = args['a']
|
|
31
|
+
use_srun = args['srun']
|
|
29
32
|
|
|
30
33
|
js_file = '%s.sh' % job_name
|
|
31
34
|
js_file_handle = open(js_file, 'w')
|
|
@@ -57,8 +60,16 @@ def hpc3(args):
|
|
|
57
60
|
cmd_list.append(each_cmd.strip())
|
|
58
61
|
|
|
59
62
|
for each_cmd in cmd_list[:-1]:
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
if use_srun is False:
|
|
64
|
+
js_file_handle.write('srun -n %s %s &\n' % (core_num_per_cmd, each_cmd))
|
|
65
|
+
else:
|
|
66
|
+
js_file_handle.write('srun -n %s BioSAK srun -c "%s" &\n' % (core_num_per_cmd, each_cmd))
|
|
67
|
+
|
|
68
|
+
if use_srun is False:
|
|
69
|
+
js_file_handle.write('srun -n %s %s\n' % (core_num_per_cmd, cmd_list[-1]))
|
|
70
|
+
else:
|
|
71
|
+
js_file_handle.write('srun -n %s BioSAK srun -c "%s"\n' % (core_num_per_cmd, cmd_list[-1]))
|
|
72
|
+
|
|
62
73
|
js_file_handle.write('wait\n')
|
|
63
74
|
|
|
64
75
|
js_file_handle.close()
|
|
@@ -80,5 +91,6 @@ if __name__ == '__main__':
|
|
|
80
91
|
hpc3_parser.add_argument('-a', required=False, default='boqianpy', help='-A, boqianpy or oces, default: boqianpy')
|
|
81
92
|
hpc3_parser.add_argument('-q', required=True, help='queue, select from: cpu, cpu-share')
|
|
82
93
|
hpc3_parser.add_argument('-conda', required=False, default=None, help='conda environment')
|
|
94
|
+
hpc3_parser.add_argument('-srun', required=False, action='store_true', help='use srun')
|
|
83
95
|
args = vars(hpc3_parser.parse_args())
|
|
84
96
|
hpc3(args)
|
|
@@ -52,42 +52,44 @@ def subset_df(args):
|
|
|
52
52
|
# read in rows_to_keep_file
|
|
53
53
|
rows_to_keep_set = set()
|
|
54
54
|
rows_missing_set = set()
|
|
55
|
-
if
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
if rows_to_keep_file is not None:
|
|
56
|
+
if os.path.isfile(rows_to_keep_file) is False:
|
|
57
|
+
print('%s not found, program exited!' % rows_to_keep_file)
|
|
58
|
+
exit()
|
|
59
|
+
else:
|
|
60
|
+
file_row_index = 0
|
|
61
|
+
for each_r in open(rows_to_keep_file):
|
|
62
|
+
ignore_current_row = False
|
|
63
|
+
if (skip1row is True) and (file_row_index == 0):
|
|
64
|
+
ignore_current_row = True
|
|
65
|
+
if ignore_current_row is False:
|
|
66
|
+
row_id = each_r.strip().split()[0]
|
|
67
|
+
if row_id in df_row_header_list:
|
|
68
|
+
rows_to_keep_set.add(row_id)
|
|
69
|
+
else:
|
|
70
|
+
rows_missing_set.add(row_id)
|
|
71
|
+
file_row_index += 1
|
|
71
72
|
|
|
72
73
|
# read in cols_to_keep_file
|
|
73
74
|
cols_to_keep_set = set()
|
|
74
75
|
cols_missing_set = set()
|
|
75
|
-
if
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
if cols_to_keep_file is not None:
|
|
77
|
+
if os.path.isfile(cols_to_keep_file) is False:
|
|
78
|
+
print('%s not found, program exited!' % cols_to_keep_file)
|
|
79
|
+
exit()
|
|
80
|
+
else:
|
|
81
|
+
file_row_index = 0
|
|
82
|
+
for each_c in open(cols_to_keep_file):
|
|
83
|
+
ignore_current_row = False
|
|
84
|
+
if (skip1row is True) and (file_row_index == 0):
|
|
85
|
+
ignore_current_row = True
|
|
86
|
+
if ignore_current_row is False:
|
|
87
|
+
col_id = each_c.strip().split()[0]
|
|
88
|
+
if col_id in df_col_header_list:
|
|
89
|
+
cols_to_keep_set.add(col_id)
|
|
90
|
+
else:
|
|
91
|
+
cols_missing_set.add(col_id)
|
|
92
|
+
file_row_index += 1
|
|
91
93
|
|
|
92
94
|
# report
|
|
93
95
|
if len(rows_missing_set) > 0:
|
|
@@ -129,8 +131,8 @@ if __name__ == '__main__':
|
|
|
129
131
|
subset_df_parser = argparse.ArgumentParser(usage=subset_df_usage)
|
|
130
132
|
subset_df_parser.add_argument('-i', required=True, help='input file')
|
|
131
133
|
subset_df_parser.add_argument('-o', required=True, help='output file')
|
|
132
|
-
subset_df_parser.add_argument('-c', required=False, default=
|
|
133
|
-
subset_df_parser.add_argument('-r', required=False, default=
|
|
134
|
+
subset_df_parser.add_argument('-c', required=False, default=None, help='header of columns to keep')
|
|
135
|
+
subset_df_parser.add_argument('-r', required=False, default=None, help='header of rows to keep')
|
|
134
136
|
subset_df_parser.add_argument('-s', required=False, default='tab', help='column separator, choose from tab and comma, default: tab')
|
|
135
137
|
subset_df_parser.add_argument('-b', required=False, action='store_true', help='write out dataframe in 0/1 format')
|
|
136
138
|
subset_df_parser.add_argument('-m', required=False, action='store_true', help='convert 0 to -1')
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import glob
|
|
3
|
+
from Bio import SeqIO
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
file_list = glob.glob('b_rep_set_splitted/*.fa')
|
|
7
|
+
blastn_dir = 'blastn_splitted'
|
|
8
|
+
|
|
9
|
+
seq_to_file_dict = dict()
|
|
10
|
+
for each_file in file_list:
|
|
11
|
+
for each_seq in SeqIO.parse(each_file, 'fasta'):
|
|
12
|
+
seq_id = each_seq.id
|
|
13
|
+
seq_to_file_dict[seq_id] = os.path.basename(each_file)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
dict = dict()
|
|
17
|
+
for each_line in open('b_rep_set.fasta.blastn'):
|
|
18
|
+
|
|
19
|
+
seq_id = each_line.split('\t')[0]
|
|
20
|
+
fa_file_name = seq_to_file_dict[seq_id]
|
|
21
|
+
blastn_file = '%s/%s.blastn' % (blastn_dir, fa_file_name)
|
|
22
|
+
|
|
23
|
+
if blastn_file not in dict:
|
|
24
|
+
dict[blastn_file] = []
|
|
25
|
+
|
|
26
|
+
dict[blastn_file].append(each_line.strip())
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
for each_b_file in dict:
|
|
30
|
+
lines = dict[each_b_file]
|
|
31
|
+
each_b_file_handle = open(each_b_file, 'w')
|
|
32
|
+
each_b_file_handle.write('\n'.join(lines))
|
|
33
|
+
each_b_file_handle.close()
|
|
34
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
for i in range(1, 73):
|
|
4
|
+
|
|
5
|
+
cmd = 'srun -n 1 python3 00_DataNeeded/BLCA/2.blca_main.py -x -p 1 -r 00_DataNeeded/db_GTDB214.1/ssu_all_r214_BLCAparsed.taxonomy -q 00_DataNeeded/db_GTDB214.1/ssu_all_r214_BLCAparsed.fasta -i b_rep_set_%s.fa -o b_rep_set_%s_BLCA_out.1.txt &' % (i, i)
|
|
6
|
+
print(cmd)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.92.
|
|
3
|
+
Version: 1.92.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.92.
|
|
23
|
+
BioSAK v1.92.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.92.
|
|
3
|
+
Version: 1.92.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.92.
|
|
23
|
+
BioSAK v1.92.2
|
|
@@ -791,8 +791,9 @@ if __name__ == '__main__':
|
|
|
791
791
|
hpc3_parser.add_argument('-t', required=False, type=int, default=12, help='number of core, default: 12')
|
|
792
792
|
hpc3_parser.add_argument('-tpc', required=False, type=int, default=1, help='number of core per command, default: 1')
|
|
793
793
|
hpc3_parser.add_argument('-a', required=False, default='boqianpy', help='-A, boqianpy or oces, default: boqianpy')
|
|
794
|
-
hpc3_parser.add_argument('-q', required=True, help='queue, select from
|
|
794
|
+
hpc3_parser.add_argument('-q', required=True, help='queue, select from cpu, cpu-share, himem and himem-share')
|
|
795
795
|
hpc3_parser.add_argument('-conda', required=False, default=None, help='conda environment')
|
|
796
|
+
hpc3_parser.add_argument('-srun', required=False, action='store_true', help='use srun')
|
|
796
797
|
args = vars(parser.parse_args())
|
|
797
798
|
hpc3.hpc3(args)
|
|
798
799
|
|
|
@@ -845,8 +846,8 @@ if __name__ == '__main__':
|
|
|
845
846
|
subset_df_parser = subparsers.add_parser('subset_df', usage=subset_df.subset_df_usage)
|
|
846
847
|
subset_df_parser.add_argument('-i', required=True, help='input file')
|
|
847
848
|
subset_df_parser.add_argument('-o', required=True, help='output file')
|
|
848
|
-
subset_df_parser.add_argument('-
|
|
849
|
-
subset_df_parser.add_argument('-
|
|
849
|
+
subset_df_parser.add_argument('-c', required=False, default=None, help='header of columns to keep')
|
|
850
|
+
subset_df_parser.add_argument('-r', required=False, default=None, help='header of rows to keep')
|
|
850
851
|
subset_df_parser.add_argument('-s', required=False, default='tab', help='column separator, choose from tab and comma, default: tab')
|
|
851
852
|
subset_df_parser.add_argument('-b', required=False, action='store_true', help='write out dataframe in 0/1 format')
|
|
852
853
|
subset_df_parser.add_argument('-m', required=False, action='store_true', help='convert 0 to -1')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|