BioSAK 1.75.6__tar.gz → 1.76.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.75.6 → BioSAK-1.76.2}/BioSAK/BLCA_op_parser.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/COG2020.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/CheckM.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/ConvertMSA.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/KEGG.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/MeanMappingDepth.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/MetaBiosample.py +21 -10
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/OneLineAln.py +1 -6
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/PhyloBiAssoc.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/RunGraphMB.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/SILVA_for_BLCA.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/SliceMSA.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/SubsampleLongReads.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/Tax4Fun2IndOTU.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/VERSION +4 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/arCOG.py +1 -2
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/bam2reads.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/compare_trees.py +0 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/dbCAN.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/enrich.py +2 -2
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_genome_GTDB.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_genome_NCBI.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/hpc3.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/iTOL.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/label_tree.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/merge_seq.py +1 -1
- BioSAK-1.76.2/BioSAK/metaAssembly.py +130 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/plot_mag.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/prokka.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/rename_seqs.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/select_seq.py +1 -4
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/slice_seq.py +1 -5
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/split_folder.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/submitHPC.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/subset_GTDB_meta.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/subset_tree.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/top_16S_hits.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/usearch_uc.py +1 -1
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK.egg-info/PKG-INFO +2 -2
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK.egg-info/SOURCES.txt +1 -9
- {BioSAK-1.75.6 → BioSAK-1.76.2}/PKG-INFO +2 -2
- {BioSAK-1.75.6 → BioSAK-1.76.2}/bin/BioSAK +12 -2
- BioSAK-1.75.6/BioSAK/BacDive.py +0 -152
- BioSAK-1.75.6/BioSAK/Barrnap.py +0 -0
- BioSAK-1.75.6/BioSAK/COG2003.py +0 -306
- BioSAK-1.75.6/BioSAK/COG2014.py +0 -734
- BioSAK-1.75.6/BioSAK/test.py +0 -20
- BioSAK-1.75.6/BioSAK/tmp_1.py +0 -46
- BioSAK-1.75.6/BioSAK/tmp_2_cog.py +0 -32
- BioSAK-1.75.6/BioSAK/tmp_3.py +0 -167
- BioSAK-1.75.6/BioSAK/tmp_4.py +0 -26
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/BioSAK_config.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/COG_boxplot_last1row.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/COG_boxplot_last2row.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/DnaFeaturesViewer.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/FastaSplitler_by_num.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/FastaSplitler_by_size.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/GTDB_for_BLCA.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/Gene2Ctg.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/KEGG_boxplot_last1row.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/KEGG_get_eukaryotic_kos.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/KeepRemovingTmp.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/MetaCHIP_phylo.hmm +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/MetaCyc_reactions_with_ec.txt +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/NetEnzymes.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/Newick_tree_plotter.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/PhyloBiAssoc.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/Prodigal.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/Reads_simulator.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/SankeyTaxon.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/VisBlastOp.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/VisGeneFlk.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/__init__.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/boxplot_last1row.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/boxplot_matrix_COG.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/boxplot_matrix_COG_backup.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/boxplot_matrix_KEGG.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/boxplot_matrix_dbCAN.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/cat_fa.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/cdd2cog.pl +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/checkm_marker.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/compare_trees.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/cross_link_seqs.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/download_GenBank_genome_subset_prokaryotes_csv.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/dwnld_sra_reads.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/exe_cmds.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/ezaai2mat.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/fa2id.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/fa2phy.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/fa2tree.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/format_converter.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/format_leaf_name.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/fq2fa.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/gbk2faa.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/gbk2ffn.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/gbk2fna.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/gbk_to_ffn_faa.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_EC_from_ko_stats_D.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_GTDB_taxon_gnm.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_MAG_reads_long.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_Pfam_hmms.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_SCG_tree.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_TopHits_taxonomy.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_aa_composition.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_bin_abundance copy.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_gc.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_gene_depth.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_genome_NCBI_v1.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_genome_NCBI_v2.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_gnm_size.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_ko_gene_seqs.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_krona_plot.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_reads_from_sam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_reads_id_in_sam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_sankey_plot.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_top_hit.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/get_total_length.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/global_functions.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/js_cmds.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/keep_best_hit.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/ko00001.keg +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/label_tree.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/link_16S_MAG.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/magabund.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/magabund2.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/manipulator_fasta.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/manipulator_msa.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/manipulator_newick.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/manipulator_sam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/mean_MAG_cov.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/metabat2concoct.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/metabat2maxbin.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/msa_to_distance_matrix.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/ncbi_dataset.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/parse_MetaCyc_RxnDB.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/parse_mmseqs_tsv.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/plot_sam_depth.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/plot_tree.R +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/prefix_file.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/reads2bam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/rename_leaves.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/rename_reads_for_Reago.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/rename_seq.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/sam2bam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/sampling_GTDB_gnms.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/sep_reads_by_barcode.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/split_fasta.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/split_sam.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK/top_hits_in_a_group.py +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK.egg-info/dependency_links.txt +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK.egg-info/requires.txt +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/BioSAK.egg-info/top_level.txt +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/LICENSE +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/MANIFEST.in +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/README.md +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/setup.cfg +0 -0
- {BioSAK-1.75.6 → BioSAK-1.76.2}/setup.py +0 -0
|
@@ -83,7 +83,7 @@ def BLCA_op_parser(args):
|
|
|
83
83
|
|
|
84
84
|
if __name__ == '__main__':
|
|
85
85
|
|
|
86
|
-
parser = argparse.ArgumentParser()
|
|
86
|
+
parser = argparse.ArgumentParser(usage=BLCA_op_parser_usage)
|
|
87
87
|
parser.add_argument('-in', required=True, help='BLCA output')
|
|
88
88
|
args = vars(parser.parse_args())
|
|
89
89
|
BLCA_op_parser(args)
|
|
@@ -688,7 +688,7 @@ def COG2020(args):
|
|
|
688
688
|
|
|
689
689
|
if __name__ == '__main__':
|
|
690
690
|
|
|
691
|
-
COG_parser = argparse.ArgumentParser()
|
|
691
|
+
COG_parser = argparse.ArgumentParser(usage=COG2020_parser_usage)
|
|
692
692
|
|
|
693
693
|
# arguments for COG_parser
|
|
694
694
|
COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
|
|
@@ -124,7 +124,7 @@ def CheckM(args):
|
|
|
124
124
|
|
|
125
125
|
if __name__ == "__main__":
|
|
126
126
|
|
|
127
|
-
CheckM_parser = argparse.ArgumentParser()
|
|
127
|
+
CheckM_parser = argparse.ArgumentParser(usage=CheckM_usage)
|
|
128
128
|
CheckM_parser.add_argument('-i', required=True, help='CheckM produced quality file')
|
|
129
129
|
CheckM_parser.add_argument('-o', required=True, help='output quality file (reformatted)')
|
|
130
130
|
CheckM_parser.add_argument('-g', required=False, help='MAG folder')
|
|
@@ -121,7 +121,7 @@ def ConvertMSA(args):
|
|
|
121
121
|
if __name__ == '__main__':
|
|
122
122
|
|
|
123
123
|
# initialize the options parser
|
|
124
|
-
parser = argparse.ArgumentParser()
|
|
124
|
+
parser = argparse.ArgumentParser(usage=ConvertMSA_usage)
|
|
125
125
|
parser.add_argument('-i', required=True, help='input alignment')
|
|
126
126
|
parser.add_argument('-xi', required=False, default='aln', help='input alignment extension')
|
|
127
127
|
parser.add_argument('-fi', required=True, help='input alignment format, e.g., fasta, phylip')
|
|
@@ -824,7 +824,7 @@ def Annotation_KEGG(args):
|
|
|
824
824
|
|
|
825
825
|
if __name__ == "__main__":
|
|
826
826
|
|
|
827
|
-
parser = argparse.ArgumentParser()
|
|
827
|
+
parser = argparse.ArgumentParser(usage=KEGG_parser_usage)
|
|
828
828
|
parser.add_argument('-seq_in', required=False, help='faa file')
|
|
829
829
|
parser.add_argument('-ko_in', required=False, help='annotation results from BlastKOALA/GhostKOALA, normally with name user_ko.txt')
|
|
830
830
|
parser.add_argument('-x', required=False, help='file extension')
|
|
@@ -63,7 +63,7 @@ def MeanMappingDepth(args):
|
|
|
63
63
|
|
|
64
64
|
if __name__ == '__main__':
|
|
65
65
|
|
|
66
|
-
MeanMappingDepth_parser = argparse.ArgumentParser()
|
|
66
|
+
MeanMappingDepth_parser = argparse.ArgumentParser(usage=MeanMappingDepth_usage)
|
|
67
67
|
|
|
68
68
|
MeanMappingDepth_parser.add_argument('-depth', required=True, help='input depth file from "samtools depth" ')
|
|
69
69
|
MeanMappingDepth_parser.add_argument('-T', required=False, action="store_true", help='get overall stats')
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import argparse
|
|
3
|
+
import subprocess
|
|
3
4
|
import multiprocessing as mp
|
|
4
5
|
|
|
5
6
|
MetaBiosample_usage = '''
|
|
6
7
|
==================== MetaBiosample example commands ====================
|
|
7
8
|
|
|
8
|
-
BioSAK
|
|
9
|
-
BioSAK
|
|
9
|
+
BioSAK metaBiosample -i SAMEA5126984 -a 'isolation_source,host,geo_loc_name,lat_lon' -o op_dir
|
|
10
|
+
BioSAK metaBiosample -i biosamples.txt -a 'isolation_source,host,geo_loc_name' -o op_dir -t 6
|
|
11
|
+
|
|
12
|
+
Dependencies: xtract, esearch and esummary
|
|
13
|
+
# https://www.ncbi.nlm.nih.gov/books/NBK179288/
|
|
10
14
|
|
|
11
15
|
=======================================================================
|
|
12
16
|
'''
|
|
13
17
|
|
|
18
|
+
def check_executables(program_list):
|
|
19
|
+
|
|
20
|
+
not_detected_programs = []
|
|
21
|
+
for needed_program in program_list:
|
|
22
|
+
if subprocess.call(['which', needed_program], stdout=open(os.devnull, 'wb')) != 0:
|
|
23
|
+
not_detected_programs.append(needed_program)
|
|
24
|
+
|
|
25
|
+
if not_detected_programs != []:
|
|
26
|
+
print('%s not detected, program exited!' % ','.join(not_detected_programs))
|
|
27
|
+
exit()
|
|
28
|
+
|
|
29
|
+
|
|
14
30
|
def MetaBiosample(args):
|
|
15
31
|
|
|
16
32
|
file_in = args['i']
|
|
@@ -20,6 +36,8 @@ def MetaBiosample(args):
|
|
|
20
36
|
force_overwrite = args['f']
|
|
21
37
|
execute_cmd = args['exe']
|
|
22
38
|
|
|
39
|
+
check_executables(['xtract', 'esearch', 'esummary'])
|
|
40
|
+
|
|
23
41
|
if os.path.isdir(op_dir) is True:
|
|
24
42
|
if force_overwrite is True:
|
|
25
43
|
os.system('rm -r %s' % op_dir)
|
|
@@ -66,7 +84,7 @@ def MetaBiosample(args):
|
|
|
66
84
|
|
|
67
85
|
if __name__ == '__main__':
|
|
68
86
|
|
|
69
|
-
arg_parser = argparse.ArgumentParser()
|
|
87
|
+
arg_parser = argparse.ArgumentParser(usage=MetaBiosample_usage)
|
|
70
88
|
arg_parser.add_argument('-i', required=True, help='biosample id file, one id per line')
|
|
71
89
|
arg_parser.add_argument('-a', required=True, help='attributes to extract')
|
|
72
90
|
arg_parser.add_argument('-o', required=True, help='output folder')
|
|
@@ -75,10 +93,3 @@ if __name__ == '__main__':
|
|
|
75
93
|
arg_parser.add_argument('-exe', required=False, action="store_true", help='execute cmds')
|
|
76
94
|
args = vars(arg_parser.parse_args())
|
|
77
95
|
MetaBiosample(args)
|
|
78
|
-
|
|
79
|
-
'''
|
|
80
|
-
|
|
81
|
-
cd /Users/songweizhi/Desktop
|
|
82
|
-
BioSAK MetaBiosample -i a.txt -a 'isolation_source,host,geo_loc_name,lat_lon' -o op_dir -f
|
|
83
|
-
|
|
84
|
-
'''
|
|
@@ -37,14 +37,9 @@ def OneLineAln(args):
|
|
|
37
37
|
|
|
38
38
|
if __name__ == '__main__':
|
|
39
39
|
|
|
40
|
-
OneLineAln_parser = argparse.ArgumentParser()
|
|
41
|
-
|
|
42
|
-
# arguments for rename_seq_parser
|
|
40
|
+
OneLineAln_parser = argparse.ArgumentParser(usage=OneLineAln_usage)
|
|
43
41
|
OneLineAln_parser.add_argument('-in', required=True, help='input MSA in fasta format')
|
|
44
42
|
OneLineAln_parser.add_argument('-out', required=False, default=None, help='output file')
|
|
45
43
|
OneLineAln_parser.add_argument('-upper', required=False, action='store_true', help='turn to uppercase')
|
|
46
|
-
|
|
47
44
|
args = vars(OneLineAln_parser.parse_args())
|
|
48
|
-
|
|
49
45
|
OneLineAln(args)
|
|
50
|
-
|
|
@@ -32,7 +32,7 @@ def PhyloBiAssoc(args):
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
if __name__ == "__main__":
|
|
35
|
-
PhyloBiAssoc_parser = argparse.ArgumentParser()
|
|
35
|
+
PhyloBiAssoc_parser = argparse.ArgumentParser(usage=PhyloBiAssoc_usage)
|
|
36
36
|
PhyloBiAssoc_parser.add_argument('-t', required=True, help='tree file')
|
|
37
37
|
PhyloBiAssoc_parser.add_argument('-d', required=True, help='data file')
|
|
38
38
|
args = vars(PhyloBiAssoc_parser.parse_args())
|
|
@@ -91,7 +91,7 @@ def RunGraphMB(arg_dict):
|
|
|
91
91
|
|
|
92
92
|
if __name__ == '__main__':
|
|
93
93
|
|
|
94
|
-
RunGraphMB_parser = argparse.ArgumentParser()
|
|
94
|
+
RunGraphMB_parser = argparse.ArgumentParser(usage=RunGraphMB_usage)
|
|
95
95
|
RunGraphMB_parser.add_argument('-gfa', required=True, help='gfa file')
|
|
96
96
|
RunGraphMB_parser.add_argument('-o', required=True, help='output folder (i.e., input folder to GraphMB)')
|
|
97
97
|
args = vars(RunGraphMB_parser.parse_args())
|
|
@@ -83,7 +83,7 @@ def SILVA_for_BLCA(args):
|
|
|
83
83
|
|
|
84
84
|
if __name__ == "__main__":
|
|
85
85
|
|
|
86
|
-
parser = argparse.ArgumentParser()
|
|
86
|
+
parser = argparse.ArgumentParser(usage=SILVA_for_BLCA_usage)
|
|
87
87
|
|
|
88
88
|
parser.add_argument('-SILVA_ssu', required=True, help='SILVA SSU file, e.g. SILVA_138_SSURef_NR99_tax_silva.fasta')
|
|
89
89
|
|
|
@@ -130,7 +130,7 @@ def SliceMSA(args):
|
|
|
130
130
|
if __name__ == '__main__':
|
|
131
131
|
|
|
132
132
|
# arguments for rename_seq_parser
|
|
133
|
-
SliceMSA_parser = argparse.ArgumentParser()
|
|
133
|
+
SliceMSA_parser = argparse.ArgumentParser(usage=SliceMSA_usage)
|
|
134
134
|
SliceMSA_parser.add_argument('-i', required=True, help='input MSA in fasta format')
|
|
135
135
|
SliceMSA_parser.add_argument('-fi', required=False, default='fasta', help='format (NOT file extension) of input MSA, default: fasta')
|
|
136
136
|
SliceMSA_parser.add_argument('-s', required=True, help='columns to export, e.g. 200-300, -100, 50-')
|
|
@@ -70,7 +70,7 @@ def SubsampleLongReads(args):
|
|
|
70
70
|
|
|
71
71
|
if __name__ == '__main__':
|
|
72
72
|
|
|
73
|
-
parser = argparse.ArgumentParser()
|
|
73
|
+
parser = argparse.ArgumentParser(usage=SubsampleLongReads_usage)
|
|
74
74
|
parser.add_argument('-i', required=True, help='input sequence file')
|
|
75
75
|
parser.add_argument('-s', required=True, help='separate subsample rates (1-100) with comma, e.g. 1,5,10')
|
|
76
76
|
parser.add_argument('-o', required=True, help='output directory')
|
|
@@ -17,7 +17,7 @@ def Tax4Fun2IndOTU(args):
|
|
|
17
17
|
|
|
18
18
|
if __name__ == '__main__':
|
|
19
19
|
|
|
20
|
-
COG_parser = argparse.ArgumentParser()
|
|
20
|
+
COG_parser = argparse.ArgumentParser(usage=Tax4Fun2IndOTU_usage)
|
|
21
21
|
COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
|
|
22
22
|
COG_parser.add_argument('-x', required=False, help='file extension')
|
|
23
23
|
COG_parser.add_argument('-m', required=True, help='sequence type, "N/n" for "nucleotide", "P/p" for "protein"')
|
|
@@ -689,8 +689,7 @@ def arCOG(args):
|
|
|
689
689
|
|
|
690
690
|
if __name__ == '__main__':
|
|
691
691
|
|
|
692
|
-
|
|
693
|
-
COG_parser = argparse.ArgumentParser()
|
|
692
|
+
COG_parser = argparse.ArgumentParser(usage=arCOG_parser_usage)
|
|
694
693
|
COG_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
|
|
695
694
|
COG_parser.add_argument('-x', required=False, help='file extension')
|
|
696
695
|
COG_parser.add_argument('-m', required=True, help='sequence type, "N/n" for "nucleotide", "P/p" for "protein"')
|
|
@@ -175,7 +175,7 @@ def bam2reads(args):
|
|
|
175
175
|
|
|
176
176
|
if __name__ == '__main__':
|
|
177
177
|
|
|
178
|
-
parser = argparse.ArgumentParser()
|
|
178
|
+
parser = argparse.ArgumentParser(usage=bam2reads_usage)
|
|
179
179
|
parser.add_argument('-b', required=True, help='Sorted Bam file')
|
|
180
180
|
parser.add_argument('-r', required=True, help='Interested region')
|
|
181
181
|
parser.add_argument('-s', required=False, default=None, help='Read sequence file')
|
|
@@ -229,7 +229,6 @@ def compare_trees(args):
|
|
|
229
229
|
if __name__ == '__main__':
|
|
230
230
|
|
|
231
231
|
compare_trees_parser = argparse.ArgumentParser(usage=compare_trees_usage)
|
|
232
|
-
#compare_trees_parser.add_argument('-p', required=True, help='output prefix')
|
|
233
232
|
compare_trees_parser.add_argument('-t1', required=True, help='tree (folder) 1')
|
|
234
233
|
compare_trees_parser.add_argument('-t2', required=True, help='tree (folder) 2')
|
|
235
234
|
compare_trees_parser.add_argument('-tx', required=False, default='newick', help='extention of tree files, default: newick')
|
|
@@ -446,7 +446,7 @@ def dbCAN(args):
|
|
|
446
446
|
|
|
447
447
|
if __name__ == '__main__':
|
|
448
448
|
|
|
449
|
-
dbCAN_parser = argparse.ArgumentParser()
|
|
449
|
+
dbCAN_parser = argparse.ArgumentParser(usage=dbCAN_parser_usage)
|
|
450
450
|
|
|
451
451
|
# arguments for COG_parser
|
|
452
452
|
dbCAN_parser.add_argument('-i', required=True, help='path to input sequences (in multi-fasta format)')
|
|
@@ -21,7 +21,7 @@ Functions that are enriched in the genomes in either group are identified using
|
|
|
21
21
|
U tests followed by a Bonferroni correction with a p value cut-off of 0.05 being considered
|
|
22
22
|
significant. Only significantly different functions with greater than 2-fold mean differences
|
|
23
23
|
are considered to be enriched. Functions detected only in the genomes from one group type are
|
|
24
|
-
considered to be enriched if they existed in at least 50 percent of the
|
|
24
|
+
considered to be enriched if they existed in at least 50 percent of the genomes in the group.
|
|
25
25
|
|
|
26
26
|
===============================================================================================
|
|
27
27
|
'''
|
|
@@ -251,7 +251,7 @@ def enrich(args):
|
|
|
251
251
|
|
|
252
252
|
if __name__ == '__main__':
|
|
253
253
|
|
|
254
|
-
enrich_parser = argparse.ArgumentParser()
|
|
254
|
+
enrich_parser = argparse.ArgumentParser(usage=enrich_usage)
|
|
255
255
|
enrich_parser.add_argument('-i', required=True, help='annotation files')
|
|
256
256
|
enrich_parser.add_argument('-x', required=True, help='file extension')
|
|
257
257
|
enrich_parser.add_argument('-g', required=True, help='grouping file')
|
|
@@ -82,7 +82,7 @@ def get_genome_GTDB(args):
|
|
|
82
82
|
|
|
83
83
|
if __name__ == '__main__':
|
|
84
84
|
|
|
85
|
-
parser = argparse.ArgumentParser()
|
|
85
|
+
parser = argparse.ArgumentParser(usage=get_genome_GTDB_parser_usage)
|
|
86
86
|
parser.add_argument('-i', required=True, help='genome id')
|
|
87
87
|
parser.add_argument('-o', required=True, help='output folder')
|
|
88
88
|
parser.add_argument('-fastani_dir', required=True, help='the "fastani" dir')
|
|
@@ -151,7 +151,7 @@ def download_GenBank_genome(args):
|
|
|
151
151
|
|
|
152
152
|
if __name__ == '__main__':
|
|
153
153
|
|
|
154
|
-
parser = argparse.ArgumentParser()
|
|
154
|
+
parser = argparse.ArgumentParser(usage=get_genome_NCBI_parser_usage)
|
|
155
155
|
parser.add_argument('-i', required=True, help='IDs of genomes to download')
|
|
156
156
|
parser.add_argument('-o', required=False, default=None, help='output folder')
|
|
157
157
|
parser.add_argument('-t', required=False, default=1, type=int, help='number of threads')
|
|
@@ -54,7 +54,7 @@ def hpc3(args):
|
|
|
54
54
|
|
|
55
55
|
if __name__ == '__main__':
|
|
56
56
|
|
|
57
|
-
hpc3_parser = argparse.ArgumentParser()
|
|
57
|
+
hpc3_parser = argparse.ArgumentParser(usage=hpc3_usage)
|
|
58
58
|
hpc3_parser.add_argument('-c', required=True, help='command to submit')
|
|
59
59
|
hpc3_parser.add_argument('-n', required=True, help='job name')
|
|
60
60
|
hpc3_parser.add_argument('-m', required=False, default=None, help='email address')
|
|
@@ -540,7 +540,7 @@ def iTOL(args):
|
|
|
540
540
|
if __name__ == '__main__':
|
|
541
541
|
|
|
542
542
|
# initialize the options parser
|
|
543
|
-
parser = argparse.ArgumentParser()
|
|
543
|
+
parser = argparse.ArgumentParser(usage=iTOL_usage)
|
|
544
544
|
parser.add_argument('-Labels', required=False, action='store_true', help='Labels')
|
|
545
545
|
parser.add_argument('-ColorStrip', required=False, action='store_true', help='ColorStrip')
|
|
546
546
|
parser.add_argument('-ColorRange', required=False, action='store_true', help='ColorRange')
|
|
@@ -110,7 +110,7 @@ def label_tree(args, config_dict):
|
|
|
110
110
|
if __name__ == '__main__':
|
|
111
111
|
|
|
112
112
|
# initialize the options parser
|
|
113
|
-
parser = argparse.ArgumentParser()
|
|
113
|
+
parser = argparse.ArgumentParser(usage=label_tree_usage)
|
|
114
114
|
|
|
115
115
|
parser.add_argument('-tree', required=True, help='tree file in newick format')
|
|
116
116
|
parser.add_argument('-label', required=False, default=None, help='label file (label,leaf)')
|
|
@@ -56,7 +56,7 @@ def merge_seq(args):
|
|
|
56
56
|
|
|
57
57
|
if __name__ == '__main__':
|
|
58
58
|
|
|
59
|
-
parser = argparse.ArgumentParser()
|
|
59
|
+
parser = argparse.ArgumentParser(usage=merge_seq_usage)
|
|
60
60
|
parser.add_argument('-1', required=True, help='input file 1')
|
|
61
61
|
parser.add_argument('-2', required=True, help='input file 2')
|
|
62
62
|
parser.add_argument('-o', required=True, help='output sequence file')
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import argparse
|
|
3
|
+
import subprocess
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
metaAssembly_usage = '''
|
|
7
|
+
==================== metaAssembly example commands ====================
|
|
8
|
+
|
|
9
|
+
BioSAK metaAssembly -i GCA_947846245.1 -o output_dir -f
|
|
10
|
+
BioSAK metaAssembly -i assembly_id.txt -o output_dir -f
|
|
11
|
+
|
|
12
|
+
# format of assembly_id.txt (one id per line)
|
|
13
|
+
GCA_947846245.1
|
|
14
|
+
GCF_026914265.1
|
|
15
|
+
GCF_002022765.2
|
|
16
|
+
|
|
17
|
+
Dependencies: datasets and dataformat
|
|
18
|
+
https://www.ncbi.nlm.nih.gov/datasets/docs/v2/download-and-install/
|
|
19
|
+
|
|
20
|
+
=======================================================================
|
|
21
|
+
'''
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def check_executables(program_list):
|
|
25
|
+
|
|
26
|
+
not_detected_programs = []
|
|
27
|
+
for needed_program in program_list:
|
|
28
|
+
|
|
29
|
+
if subprocess.call(['which', needed_program], stdout=open(os.devnull, 'wb')) != 0:
|
|
30
|
+
not_detected_programs.append(needed_program)
|
|
31
|
+
|
|
32
|
+
if not_detected_programs != []:
|
|
33
|
+
print('%s not detected, program exited!' % ','.join(not_detected_programs))
|
|
34
|
+
exit()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def metaAssembly(args):
|
|
38
|
+
|
|
39
|
+
assembly_id_txt = args['i']
|
|
40
|
+
op_dir = args['o']
|
|
41
|
+
force_overwrite = args['f']
|
|
42
|
+
|
|
43
|
+
check_executables(['datasets', 'dataformat'])
|
|
44
|
+
|
|
45
|
+
if os.path.isdir(op_dir) is True:
|
|
46
|
+
if force_overwrite is True:
|
|
47
|
+
os.system('rm -r %s' % op_dir)
|
|
48
|
+
else:
|
|
49
|
+
print('Output folder detected, program exited!')
|
|
50
|
+
exit()
|
|
51
|
+
|
|
52
|
+
tmp_dir = '%s/tmp' % op_dir
|
|
53
|
+
op_txt = '%s/output.txt' % op_dir
|
|
54
|
+
|
|
55
|
+
os.mkdir(op_dir)
|
|
56
|
+
os.mkdir(tmp_dir)
|
|
57
|
+
|
|
58
|
+
assembly_id_set = set()
|
|
59
|
+
if os.path.isfile(assembly_id_txt):
|
|
60
|
+
for assembly_id in open(assembly_id_txt):
|
|
61
|
+
assembly_id_set.add(assembly_id.strip())
|
|
62
|
+
if len(assembly_id_set) == 0:
|
|
63
|
+
print('No id found in %s, program exited!' % assembly_id_txt)
|
|
64
|
+
exit()
|
|
65
|
+
else:
|
|
66
|
+
assembly_id_set.add(assembly_id_txt)
|
|
67
|
+
|
|
68
|
+
op_txt_handle = open(op_txt, 'w')
|
|
69
|
+
op_txt_handle.write('Assembly\tBioSample\tDescription\tModel\tIsolation_Source\tMetagenome_Source\tHost\tLocation\tComment\n')
|
|
70
|
+
op_txt_handle.close()
|
|
71
|
+
|
|
72
|
+
processing_index = 1
|
|
73
|
+
for assembly_id in assembly_id_set:
|
|
74
|
+
print('Processing %s/%s: %s' % (processing_index, len(assembly_id_set), assembly_id))
|
|
75
|
+
op_metadata_tsv = '%s/%s_data_report.tsv' % (tmp_dir, assembly_id)
|
|
76
|
+
ncbi_datasets_cmd = 'datasets summary genome accession %s --as-json-lines | dataformat tsv genome > %s' % (assembly_id, op_metadata_tsv)
|
|
77
|
+
os.system(ncbi_datasets_cmd)
|
|
78
|
+
biosample_accession = 'na'
|
|
79
|
+
biosample_description_title = 'na'
|
|
80
|
+
biosample_description_comment = 'na'
|
|
81
|
+
isolation_source = 'na'
|
|
82
|
+
metagenome_source = 'na'
|
|
83
|
+
biosample_model = 'na'
|
|
84
|
+
host = 'na'
|
|
85
|
+
geo_loc_name = 'na'
|
|
86
|
+
col_index = dict()
|
|
87
|
+
line_num_index = 0
|
|
88
|
+
for each_line in open(op_metadata_tsv):
|
|
89
|
+
line_num_index += 1
|
|
90
|
+
line_split = each_line.strip().split('\t')
|
|
91
|
+
if line_num_index == 1:
|
|
92
|
+
col_index = {key: i for i, key in enumerate(line_split)}
|
|
93
|
+
else:
|
|
94
|
+
if line_split[col_index['Assembly BioSample Accession']] != '':
|
|
95
|
+
biosample_accession = line_split[col_index['Assembly BioSample Accession']]
|
|
96
|
+
if line_split[col_index['Assembly BioSample Description Title']] != '':
|
|
97
|
+
biosample_description_title = line_split[col_index['Assembly BioSample Description Title']]
|
|
98
|
+
if line_split[col_index['Assembly BioSample Description Comment']] != '':
|
|
99
|
+
biosample_description_comment = line_split[col_index['Assembly BioSample Description Comment']]
|
|
100
|
+
if line_split[col_index['Assembly BioSample Models']] != '':
|
|
101
|
+
biosample_model = line_split[col_index['Assembly BioSample Models']]
|
|
102
|
+
if line_split[col_index['Assembly BioSample Attribute Name']] != '':
|
|
103
|
+
biosample_attribute_name = line_split[col_index['Assembly BioSample Attribute Name']]
|
|
104
|
+
if line_split[col_index['Assembly BioSample Attribute Value']] != '':
|
|
105
|
+
biosample_attribute_value = line_split[col_index['Assembly BioSample Attribute Value']]
|
|
106
|
+
if biosample_attribute_name == 'isolation_source':
|
|
107
|
+
isolation_source = biosample_attribute_value
|
|
108
|
+
elif biosample_attribute_name == 'metagenome_source':
|
|
109
|
+
metagenome_source = biosample_attribute_value
|
|
110
|
+
elif biosample_attribute_name == 'host':
|
|
111
|
+
host = biosample_attribute_value
|
|
112
|
+
elif biosample_attribute_name == 'geo_loc_name':
|
|
113
|
+
geo_loc_name = biosample_attribute_value
|
|
114
|
+
|
|
115
|
+
str_to_write = '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s' % (assembly_id, biosample_accession, biosample_description_title, biosample_model, isolation_source, metagenome_source, host, geo_loc_name, biosample_description_comment)
|
|
116
|
+
|
|
117
|
+
with open(op_txt, 'a') as op_txt_handle:
|
|
118
|
+
op_txt_handle.write(str_to_write + '\n')
|
|
119
|
+
|
|
120
|
+
processing_index += 1
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
if __name__ == '__main__':
|
|
124
|
+
|
|
125
|
+
metaAssembly_parser = argparse.ArgumentParser(usage=metaAssembly_usage)
|
|
126
|
+
metaAssembly_parser.add_argument('-i', required=True, help='file contains assembly ids')
|
|
127
|
+
metaAssembly_parser.add_argument('-o', required=True, help='output directory')
|
|
128
|
+
metaAssembly_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
129
|
+
args = vars(metaAssembly_parser.parse_args())
|
|
130
|
+
metaAssembly(args)
|
|
@@ -198,7 +198,7 @@ def Plot_MAG(argument_list):
|
|
|
198
198
|
|
|
199
199
|
if __name__ == '__main__':
|
|
200
200
|
|
|
201
|
-
Plot_MAG_parser = argparse.ArgumentParser()
|
|
201
|
+
Plot_MAG_parser = argparse.ArgumentParser(usage=Plot_MAG_parser_usage)
|
|
202
202
|
Plot_MAG_parser.add_argument('-i', required=True, help='MAG folder')
|
|
203
203
|
Plot_MAG_parser.add_argument('-x', required=True, help='file extension')
|
|
204
204
|
Plot_MAG_parser.add_argument('-d', required=True, help='contig depth')
|
|
@@ -100,7 +100,7 @@ def prokka(args):
|
|
|
100
100
|
|
|
101
101
|
if __name__ == '__main__':
|
|
102
102
|
|
|
103
|
-
parser = argparse.ArgumentParser()
|
|
103
|
+
parser = argparse.ArgumentParser(usage=prokka_usage)
|
|
104
104
|
parser.add_argument('-i', required=True, help='genome folder')
|
|
105
105
|
parser.add_argument('-x', required=True, default='fna', help='file extension, deafult: fna')
|
|
106
106
|
parser.add_argument('-d', required=True, help='genome domain, Bacteria or Archaea')
|
|
@@ -68,7 +68,7 @@ def rename_seqs(args):
|
|
|
68
68
|
|
|
69
69
|
if __name__ == '__main__':
|
|
70
70
|
|
|
71
|
-
rename_seq_parser = argparse.ArgumentParser()
|
|
71
|
+
rename_seq_parser = argparse.ArgumentParser(usage=rename_seq_usage)
|
|
72
72
|
rename_seq_parser.add_argument('-i', required=True, help='input sequence folder')
|
|
73
73
|
rename_seq_parser.add_argument('-x', required=False, default='fasta', help='file extension, default: fasta')
|
|
74
74
|
rename_seq_parser.add_argument('-o', required=True, help='output folder')
|
|
@@ -81,10 +81,7 @@ def select_seq(args):
|
|
|
81
81
|
|
|
82
82
|
if __name__ == '__main__':
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
parser = argparse.ArgumentParser()
|
|
86
|
-
|
|
87
|
-
# arguments for select_seq
|
|
84
|
+
parser = argparse.ArgumentParser(usage=select_seq_usage)
|
|
88
85
|
parser.add_argument('-seq', required=True, help='sequence file')
|
|
89
86
|
parser.add_argument('-id', required=True, help='sequence ids,one id per line')
|
|
90
87
|
parser.add_argument('-option', required=True, type=int, help='choose from 0 and 1')
|
|
@@ -59,15 +59,11 @@ def slice_seq(args):
|
|
|
59
59
|
|
|
60
60
|
if __name__ == '__main__':
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
parser = argparse.ArgumentParser()
|
|
64
|
-
|
|
65
|
-
# arguments for select_seq
|
|
62
|
+
parser = argparse.ArgumentParser(usage=slice_seq_usage)
|
|
66
63
|
parser.add_argument('-in', required=True, help='sequence file')
|
|
67
64
|
parser.add_argument('-id', required=True, help='sequence id')
|
|
68
65
|
parser.add_argument('-range', required=True, help='sequence range, start-end (in bp). e.g. 200-4000')
|
|
69
66
|
parser.add_argument('-rc', required=False, action='store_true', help='write out reverse complement sequence')
|
|
70
67
|
parser.add_argument('-out', required=True, help='output file')
|
|
71
|
-
|
|
72
68
|
args = vars(parser.parse_args())
|
|
73
69
|
slice_seq(args)
|
|
@@ -55,7 +55,7 @@ def split_folder(args):
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
if __name__ == "__main__":
|
|
58
|
-
parser = argparse.ArgumentParser()
|
|
58
|
+
parser = argparse.ArgumentParser(usage=split_folder_parser_usage)
|
|
59
59
|
|
|
60
60
|
parser.add_argument('-in', required=True, help='file folder')
|
|
61
61
|
parser.add_argument('-x', required=True, help='file extension')
|
|
@@ -31,7 +31,7 @@ def submitHPC(args):
|
|
|
31
31
|
if __name__ == '__main__':
|
|
32
32
|
|
|
33
33
|
# arguments for COG_parser
|
|
34
|
-
submitHPC_parser = argparse.ArgumentParser()
|
|
34
|
+
submitHPC_parser = argparse.ArgumentParser(usage=submitHPC_usage)
|
|
35
35
|
submitHPC_parser.add_argument('-p', required=True, help='js prefix')
|
|
36
36
|
submitHPC_parser.add_argument('-c', required=True, help='commands txt')
|
|
37
37
|
submitHPC_parser.add_argument('-t', required=False, type=int, default=1, help='number of threads')
|
|
@@ -50,7 +50,7 @@ def subset_GTDB_meta(args):
|
|
|
50
50
|
|
|
51
51
|
if __name__ == '__main__':
|
|
52
52
|
|
|
53
|
-
parser = argparse.ArgumentParser()
|
|
53
|
+
parser = argparse.ArgumentParser(usage=subset_GTDB_meta_usage)
|
|
54
54
|
parser.add_argument('-meta', required=True, help='GTDB reference genome metadata')
|
|
55
55
|
parser.add_argument('-id', required=True, help='id of genomes')
|
|
56
56
|
parser.add_argument('-out', required=True, help='output file')
|
|
@@ -183,7 +183,7 @@ def subset_tree(args):
|
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
if __name__ == '__main__':
|
|
186
|
-
parser = argparse.ArgumentParser(
|
|
186
|
+
parser = argparse.ArgumentParser(usage=subset_tree_usage)
|
|
187
187
|
parser.add_argument('-h', action='help', help='Show this help message and exit')
|
|
188
188
|
parser.add_argument('-tree', required=True, type=str, help='input tree file')
|
|
189
189
|
parser.add_argument('-taxon', required=True, type=str, help='A file containing list of leaves to keep, one leaf per line')
|
|
@@ -176,7 +176,7 @@ def top_16S_hits(args):
|
|
|
176
176
|
|
|
177
177
|
if __name__ == '__main__':
|
|
178
178
|
|
|
179
|
-
top_16S_hits_parser = argparse.ArgumentParser()
|
|
179
|
+
top_16S_hits_parser = argparse.ArgumentParser(usage=top_16S_hits_usage)
|
|
180
180
|
top_16S_hits_parser.add_argument('-p', required=True, help='output prefix')
|
|
181
181
|
top_16S_hits_parser.add_argument('-q', required=True, help='query sequence file')
|
|
182
182
|
top_16S_hits_parser.add_argument('-r', required=True, help='SILVA or GTDB SSU sequence file')
|
|
@@ -50,7 +50,7 @@ def usearch_uc(args):
|
|
|
50
50
|
|
|
51
51
|
if __name__ == '__main__':
|
|
52
52
|
|
|
53
|
-
usearch_uc_parser = argparse.ArgumentParser()
|
|
53
|
+
usearch_uc_parser = argparse.ArgumentParser(usage=usearch_uc_usage)
|
|
54
54
|
usearch_uc_parser.add_argument('-uc', required=True, help='uc file from Usearch')
|
|
55
55
|
usearch_uc_parser.add_argument('-n', required=False, type=int, default=1, help='minimum number of sequence in a cluster, default: 1')
|
|
56
56
|
usearch_uc_parser.add_argument('-o', required=True, help='output file')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: BioSAK
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.76.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.
|
|
23
|
+
BioSAK v1.76.2
|