biofile-kit 0.0.2__tar.gz → 0.1.0__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.
Files changed (42) hide show
  1. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/LICENSE +21 -21
  2. biofile_kit-0.0.2/README.md → biofile_kit-0.1.0/PKG-INFO +71 -30
  3. biofile_kit-0.0.2/PKG-INFO → biofile_kit-0.1.0/README.md +21 -19
  4. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/bin/fasta_tools.py +57 -53
  5. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/bin/gff_tools.py +11 -1
  6. biofile_kit-0.1.0/biofile_kit/bin/gt_kit.py +29 -0
  7. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/bin/gtf_tools.py +30 -30
  8. biofile_kit-0.1.0/biofile_kit/bin/vcf_tools.py +29 -0
  9. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/__init__.py +33 -29
  10. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/fa2tab.py +3 -5
  11. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/gap_location.py +38 -38
  12. biofile_kit-0.1.0/biofile_kit/fasta_utils/hardmasked_to_softmasked.py +47 -0
  13. biofile_kit-0.1.0/biofile_kit/fasta_utils/telomere_finder.py +130 -0
  14. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/__init__.py +3 -1
  15. biofile_kit-0.1.0/biofile_kit/gff_utils/stats.py +39 -0
  16. biofile_kit-0.1.0/biofile_kit/gt_utils/__init__.py +12 -0
  17. biofile_kit-0.1.0/biofile_kit/gt_utils/genotype_consistency_analysis.py +62 -0
  18. biofile_kit-0.1.0/biofile_kit/gt_utils/merge.py +54 -0
  19. biofile_kit-0.1.0/biofile_kit/gt_utils/stat_gt.py +66 -0
  20. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gtf_utils/__init__.py +11 -11
  21. biofile_kit-0.1.0/biofile_kit/vcf_utils/__init__.py +8 -0
  22. biofile_kit-0.1.0/biofile_kit/vcf_utils/vcf2gt.py +139 -0
  23. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/pyproject.toml +24 -20
  24. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/ORF_finder.py +0 -0
  25. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/SSR_finder.py +0 -0
  26. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/format_fasta.py +0 -0
  27. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/generate_random_nucl.py +0 -0
  28. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/get_longest_seq_for_gene.py +0 -0
  29. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/get_reverse_complementary_seq.py +0 -0
  30. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/get_seq_len.py +0 -0
  31. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/id_index_seq.py +0 -0
  32. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/motif_finder.py +0 -0
  33. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/fasta_utils/seq_rename.py +0 -0
  34. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/get_feature_density.py +0 -0
  35. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/gff2bed.py +0 -0
  36. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/gff2gtf.py +0 -0
  37. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/gff_extract_seq.py +0 -0
  38. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/gff_sort.py +0 -0
  39. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gff_utils/rename.py +0 -0
  40. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gtf_utils/gtf2bed.py +0 -0
  41. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gtf_utils/gtf_extract_seq.py +0 -0
  42. {biofile_kit-0.0.2 → biofile_kit-0.1.0}/biofile_kit/gtf_utils/gtf_sort.py +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 BioFileKit
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Leo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,30 +1,71 @@
1
- # Introduction
2
- **BioFileKit: A Python command-line toolkit dedicated to simplifying the reading, writing, conversion,
3
- parsing and basic operations of various biological data file formats.**
4
-
5
- # Install
6
- ```
7
- pip install biofile-kit
8
- ```
9
-
10
- # Usage example
11
- ## Generate random nucleotide sequences
12
- ```shell
13
- fasta_tools random_nucl -n seq1,seq2 -l 1000,1200
14
- ```
15
- ```
16
- >seq1 length=1000
17
- CGCCAGGCCTGCCCTGCGACGGAGGTTCCCCGTATGACTGCCCTATATCATTCCTGCTAAACTCAATCCACAAGATCAATTCACTCCGGGGAACAACTGCCACTAGAAACCGTAGGTTACCATCAATAGTTCCCCACTTGGAGGAAGAAGTCTTTGAAGCAGGTTGTCATCCAGCATTCTTTCTAAACGTCATTGGACATAGGGGTAAGCTCATATCCTCTCCCAACCATTCAGAAGTCCATGACCATGTCCGGTGCAAATTTGAAAGTCATGATGGTGAGGGAGCAAGAGAGCGCAGATCACGGATAAGTATTAAAAAGTGCTGTCGAGGCCGCAGTGGAAGTGACTAATTGGCTGATGCACGGACCTCCAGTGTACAGCTCATGTTTCAGGTGCGTCGGACTGTCAGTGACTCAATTTTCTGGGCCCAACTCCGCGTTCGGTGGATTAGTAACTATAGTGGTTGCATGAGGTACTGAGATTGAGCCGTGAAAAGCATTCAAAGTGCGGTTCCTCAACCTATTATTATTAAGACATAAGTTTGCTAGCGCTTTGTTGCAATCGTGTCGTGGAATGCGATTGATGCTTAGCAGTTTCCGGGAAGTACGGACTCATGCCGTTATGTGCGCCAACAAACAGCGCGTGTTTCATTTCGCGCCGGTCGCCTGGCGCGTGTTATGGGATCGCACTTCACCGTGCTGATATCGCTGAGGCGAGGGTTCCTCGAGATATTGGCTTGGCTCGCCAGGCAGTAGTCGTGGTCAGCCCGACTTGGCACGCTAAAGACGAGCCCACGTGCATTCGGTCGGAATCAGTTAGACGTCGAACGATTCGATCCAGCGTGAGGCCTATCCTTTGCCCATTTAACTCCGTATTCACGGTCTCCTTGATACATAGTGTACTTAGTGTTACCAGCGAACTCCGACGCGGACAGTGTCCTCGGAGTATTACCTCCAAAGAAATTCTCGGGCCGAACAGCGTAGTCTATACCGCCTGGGTG
18
- >seq2 length=1200
19
- ATAGGTGTAGTGTGTCTTCATCTTGATGTAAGTTCGTTCACCCAGATCTGCTAAAACGCATGGCATTTTTTTCGCATACGGTCCACTGGCACTATATGATTCCCAGTACTTCGCAGATTTGGGGGGGTAAGAGTCCGCGGAAGCGTTGTTCTGACGCGTACGCATGTTCGGTATTTTTTACGGGTGAGTTGCATCGGTTGTGTATTGGTCCATGTTAAGACGGTTATCGGGCAGGCTTCTCAATGCGGTGAGTCGGGAAGACACTAGCCAGCGAAATTATGTGATCGCTGGAATAGGATCGATGTAGCAACGACACTTTCCTGGCCTACAGACGGACTTGGACCGGATCAATCGTCTTATATAATAATACACGTCGCAGAACGGTCTGTGTATAGGACCGGTAGAATGAGTAGTTCATACTCCGGCCCGCAGGTACCCCTGTACGCATGAAAGTCCAAGCTCTCGCTGAACCGACACCTCTAGCCGAGGTACGTATGCATGACCTGGTTGTTCTCTTCGGGTCACGACAGTTGCCTATTTACGCTCGGATACCAGGAAACTTTGCCGGGAGTTCGCCCCCAGTAGTTCCCGGGTTGGGGTCGGGGTGTTCTGCCGATTACCGGATGTATCTCACCTGAGATTCAGCATCGGTGCGAACATCGTGAATCCTAAAGGTTGAACAAAGGAAGGCCTCCATGCGTTGGAAAGTCCTCGAAGTGGAGAAGTCTATCGTAGATCAACCGATAGGCAATGAAAAGAAAAAGCGCAACAGACGCCACGCTTCTAGATCGCAGTTGGCCTTTTAATGGCGAATCCATTTACCGAGCGAAGAAAAAGCCTGGCTAGCTTGTTTAAAACTGGTAACACTGAATCTCCGAAAGAGTAGCTATAGGCTCCCAGCACAGCCTGCGGCTGGCGCCAACGCCTAACGAAAATGCCAATCCACTTAGTTGTGTTAACTGTCTCCCCACTATATGCGGCTTACCAGGGAGTGTAATTTCTGGCGATGACCAGCGTTTCCTTTGGGTTCCGTCGAATTCCTTAGATCTAGGACAGCAGTTCGAATTACTTGGCGTGGTCGCATCAGGACTTCGCGTAGTGGCTATCCAGATCATAGACTGAGTCACGTATTTGACGCCAGACCTAAGACCCCACGATGGTTTCTAGTCGTAACTTGAGTGAGCTAGCTCGCCTCGTGTC
20
- ```
21
- ## ORF prediction
22
- ```shell
23
- fasta_tools random_nucl -n seq1,seq2 -l 1000,1200 | fasta_tools ORF_finder -c -
24
- ```
25
- ```
26
- >seq1 length=42 ORF_prediction
27
- MRLMLSSFREVRTHAVMCANKQRVFHFAPVAWRVLWDRTSPC*
28
- >seq2 length=87 ORF_prediction
29
- MIWIATTRSPDATTPSNSNCCPRSKEFDGTQRKRWSSPEITLPGKPHIVGRQLTQLSGLAFSLGVGASRRLCWEPIATLSEIQCYQF*
30
- ```
1
+ Metadata-Version: 2.1
2
+ Name: biofile-kit
3
+ Version: 0.1.0
4
+ Summary: Bioinformatics File Operations Toolkit.
5
+ Home-page: https://github.com/wenlinXu-njfu/BioFileKit
6
+ License: MIT
7
+ Author: Wenlin Xu
8
+ Author-email: wenlinxu.njfu@outlook.com
9
+ Requires-Python: >=3.8
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Dist: pybioinformatic (>=1.2.5)
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Introduction
22
+ **BioFileKit: A Python command-line toolkit dedicated to simplifying the reading, writing, conversion,
23
+ parsing and basic operations of various biological data file formats.**
24
+
25
+ # Install
26
+ ```
27
+ pip install biofile-kit --upgrade
28
+ ```
29
+
30
+ # Change log
31
+ ## v0.1.0
32
+ - New
33
+ - Fasta file tools ([fasta_tools](biofile_kit/bin/fasta_tools.py)):
34
+ - [change hard masked to soft masked](biofile_kit/fasta_utils/hardmasked_to_softmasked.py)
35
+ - [telomere finder](biofile_kit/fasta_utils/telomere_finder.py)
36
+ - Gff file tools ([gff_tools](biofile_kit/bin/gff_tools.py)):
37
+ - [Statistical analysis of GFF file](biofile_kit/gff_utils/stats.py)
38
+ - Genotype file tools ([gt_kit](biofile_kit/bin/gt_kit.py)):
39
+ - [genotype consistency analysis](biofile_kit/gt_utils/genotype_consistency_analysis.py)
40
+ - [genotype file merging](biofile_kit/gt_utils/merge.py)
41
+ - [statistical analysis of SNP loci](biofile_kit/gt_utils/stat_gt.py)
42
+ - VCF file tools ([vcf_tools](biofile_kit/bin/vcf_tools.py)):
43
+ - [convert the file format from VCF to Genotype (GT)](biofile_kit/vcf_utils/vcf2gt.py)
44
+ - Modified
45
+ - Null
46
+ - Deleted
47
+ - Null
48
+
49
+ # Usage example
50
+ ## Generate random nucleotide sequences
51
+ ```shell
52
+ fasta_tools random_nucl -n seq1,seq2 -l 1000,1200
53
+ ```
54
+ ```
55
+ >seq1 length=1000
56
+ CGCCAGGCCTGCCCTGCGACGGAGGTTCCCCGTATGACTGCCCTATATCATTCCTGCTAAACTCAATCCACAAGATCAATTCACTCCGGGGAACAACTGCCACTAGAAACCGTAGGTTACCATCAATAGTTCCCCACTTGGAGGAAGAAGTCTTTGAAGCAGGTTGTCATCCAGCATTCTTTCTAAACGTCATTGGACATAGGGGTAAGCTCATATCCTCTCCCAACCATTCAGAAGTCCATGACCATGTCCGGTGCAAATTTGAAAGTCATGATGGTGAGGGAGCAAGAGAGCGCAGATCACGGATAAGTATTAAAAAGTGCTGTCGAGGCCGCAGTGGAAGTGACTAATTGGCTGATGCACGGACCTCCAGTGTACAGCTCATGTTTCAGGTGCGTCGGACTGTCAGTGACTCAATTTTCTGGGCCCAACTCCGCGTTCGGTGGATTAGTAACTATAGTGGTTGCATGAGGTACTGAGATTGAGCCGTGAAAAGCATTCAAAGTGCGGTTCCTCAACCTATTATTATTAAGACATAAGTTTGCTAGCGCTTTGTTGCAATCGTGTCGTGGAATGCGATTGATGCTTAGCAGTTTCCGGGAAGTACGGACTCATGCCGTTATGTGCGCCAACAAACAGCGCGTGTTTCATTTCGCGCCGGTCGCCTGGCGCGTGTTATGGGATCGCACTTCACCGTGCTGATATCGCTGAGGCGAGGGTTCCTCGAGATATTGGCTTGGCTCGCCAGGCAGTAGTCGTGGTCAGCCCGACTTGGCACGCTAAAGACGAGCCCACGTGCATTCGGTCGGAATCAGTTAGACGTCGAACGATTCGATCCAGCGTGAGGCCTATCCTTTGCCCATTTAACTCCGTATTCACGGTCTCCTTGATACATAGTGTACTTAGTGTTACCAGCGAACTCCGACGCGGACAGTGTCCTCGGAGTATTACCTCCAAAGAAATTCTCGGGCCGAACAGCGTAGTCTATACCGCCTGGGTG
57
+ >seq2 length=1200
58
+ ATAGGTGTAGTGTGTCTTCATCTTGATGTAAGTTCGTTCACCCAGATCTGCTAAAACGCATGGCATTTTTTTCGCATACGGTCCACTGGCACTATATGATTCCCAGTACTTCGCAGATTTGGGGGGGTAAGAGTCCGCGGAAGCGTTGTTCTGACGCGTACGCATGTTCGGTATTTTTTACGGGTGAGTTGCATCGGTTGTGTATTGGTCCATGTTAAGACGGTTATCGGGCAGGCTTCTCAATGCGGTGAGTCGGGAAGACACTAGCCAGCGAAATTATGTGATCGCTGGAATAGGATCGATGTAGCAACGACACTTTCCTGGCCTACAGACGGACTTGGACCGGATCAATCGTCTTATATAATAATACACGTCGCAGAACGGTCTGTGTATAGGACCGGTAGAATGAGTAGTTCATACTCCGGCCCGCAGGTACCCCTGTACGCATGAAAGTCCAAGCTCTCGCTGAACCGACACCTCTAGCCGAGGTACGTATGCATGACCTGGTTGTTCTCTTCGGGTCACGACAGTTGCCTATTTACGCTCGGATACCAGGAAACTTTGCCGGGAGTTCGCCCCCAGTAGTTCCCGGGTTGGGGTCGGGGTGTTCTGCCGATTACCGGATGTATCTCACCTGAGATTCAGCATCGGTGCGAACATCGTGAATCCTAAAGGTTGAACAAAGGAAGGCCTCCATGCGTTGGAAAGTCCTCGAAGTGGAGAAGTCTATCGTAGATCAACCGATAGGCAATGAAAAGAAAAAGCGCAACAGACGCCACGCTTCTAGATCGCAGTTGGCCTTTTAATGGCGAATCCATTTACCGAGCGAAGAAAAAGCCTGGCTAGCTTGTTTAAAACTGGTAACACTGAATCTCCGAAAGAGTAGCTATAGGCTCCCAGCACAGCCTGCGGCTGGCGCCAACGCCTAACGAAAATGCCAATCCACTTAGTTGTGTTAACTGTCTCCCCACTATATGCGGCTTACCAGGGAGTGTAATTTCTGGCGATGACCAGCGTTTCCTTTGGGTTCCGTCGAATTCCTTAGATCTAGGACAGCAGTTCGAATTACTTGGCGTGGTCGCATCAGGACTTCGCGTAGTGGCTATCCAGATCATAGACTGAGTCACGTATTTGACGCCAGACCTAAGACCCCACGATGGTTTCTAGTCGTAACTTGAGTGAGCTAGCTCGCCTCGTGTC
59
+ ```
60
+
61
+ ## ORF prediction
62
+ ```shell
63
+ fasta_tools random_nucl -n seq1,seq2 -l 1000,1200 | fasta_tools ORF_finder -c -
64
+ ```
65
+ ```
66
+ >seq1 length=42 ORF_prediction
67
+ MRLMLSSFREVRTHAVMCANKQRVFHFAPVAWRVLWDRTSPC*
68
+ >seq2 length=87 ORF_prediction
69
+ MIWIATTRSPDATTPSNSNCCPRSKEFDGTQRKRWSSPEITLPGKPHIVGRQLTQLSGLAFSLGVGASRRLCWEPIATLSEIQCYQF*
70
+ ```
71
+
@@ -1,29 +1,31 @@
1
- Metadata-Version: 2.1
2
- Name: biofile-kit
3
- Version: 0.0.2
4
- Summary: Bioinformatics File Operations Toolkit.
5
- Author: Wenlin Xu
6
- Author-email: wenlinxu.njfu@outlook.com
7
- Requires-Python: >=3.8,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.8
10
- Classifier: Programming Language :: Python :: 3.9
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Requires-Dist: pybioinformatic (>=1.2.4,<2.0.0)
16
- Description-Content-Type: text/markdown
17
-
18
1
  # Introduction
19
2
  **BioFileKit: A Python command-line toolkit dedicated to simplifying the reading, writing, conversion,
20
3
  parsing and basic operations of various biological data file formats.**
21
4
 
22
5
  # Install
23
6
  ```
24
- pip install biofile-kit
7
+ pip install biofile-kit --upgrade
25
8
  ```
26
9
 
10
+ # Change log
11
+ ## v0.1.0
12
+ - New
13
+ - Fasta file tools ([fasta_tools](biofile_kit/bin/fasta_tools.py)):
14
+ - [change hard masked to soft masked](biofile_kit/fasta_utils/hardmasked_to_softmasked.py)
15
+ - [telomere finder](biofile_kit/fasta_utils/telomere_finder.py)
16
+ - Gff file tools ([gff_tools](biofile_kit/bin/gff_tools.py)):
17
+ - [Statistical analysis of GFF file](biofile_kit/gff_utils/stats.py)
18
+ - Genotype file tools ([gt_kit](biofile_kit/bin/gt_kit.py)):
19
+ - [genotype consistency analysis](biofile_kit/gt_utils/genotype_consistency_analysis.py)
20
+ - [genotype file merging](biofile_kit/gt_utils/merge.py)
21
+ - [statistical analysis of SNP loci](biofile_kit/gt_utils/stat_gt.py)
22
+ - VCF file tools ([vcf_tools](biofile_kit/bin/vcf_tools.py)):
23
+ - [convert the file format from VCF to Genotype (GT)](biofile_kit/vcf_utils/vcf2gt.py)
24
+ - Modified
25
+ - Null
26
+ - Deleted
27
+ - Null
28
+
27
29
  # Usage example
28
30
  ## Generate random nucleotide sequences
29
31
  ```shell
@@ -35,6 +37,7 @@ CGCCAGGCCTGCCCTGCGACGGAGGTTCCCCGTATGACTGCCCTATATCATTCCTGCTAAACTCAATCCACAAGATCAAT
35
37
  >seq2 length=1200
36
38
  ATAGGTGTAGTGTGTCTTCATCTTGATGTAAGTTCGTTCACCCAGATCTGCTAAAACGCATGGCATTTTTTTCGCATACGGTCCACTGGCACTATATGATTCCCAGTACTTCGCAGATTTGGGGGGGTAAGAGTCCGCGGAAGCGTTGTTCTGACGCGTACGCATGTTCGGTATTTTTTACGGGTGAGTTGCATCGGTTGTGTATTGGTCCATGTTAAGACGGTTATCGGGCAGGCTTCTCAATGCGGTGAGTCGGGAAGACACTAGCCAGCGAAATTATGTGATCGCTGGAATAGGATCGATGTAGCAACGACACTTTCCTGGCCTACAGACGGACTTGGACCGGATCAATCGTCTTATATAATAATACACGTCGCAGAACGGTCTGTGTATAGGACCGGTAGAATGAGTAGTTCATACTCCGGCCCGCAGGTACCCCTGTACGCATGAAAGTCCAAGCTCTCGCTGAACCGACACCTCTAGCCGAGGTACGTATGCATGACCTGGTTGTTCTCTTCGGGTCACGACAGTTGCCTATTTACGCTCGGATACCAGGAAACTTTGCCGGGAGTTCGCCCCCAGTAGTTCCCGGGTTGGGGTCGGGGTGTTCTGCCGATTACCGGATGTATCTCACCTGAGATTCAGCATCGGTGCGAACATCGTGAATCCTAAAGGTTGAACAAAGGAAGGCCTCCATGCGTTGGAAAGTCCTCGAAGTGGAGAAGTCTATCGTAGATCAACCGATAGGCAATGAAAAGAAAAAGCGCAACAGACGCCACGCTTCTAGATCGCAGTTGGCCTTTTAATGGCGAATCCATTTACCGAGCGAAGAAAAAGCCTGGCTAGCTTGTTTAAAACTGGTAACACTGAATCTCCGAAAGAGTAGCTATAGGCTCCCAGCACAGCCTGCGGCTGGCGCCAACGCCTAACGAAAATGCCAATCCACTTAGTTGTGTTAACTGTCTCCCCACTATATGCGGCTTACCAGGGAGTGTAATTTCTGGCGATGACCAGCGTTTCCTTTGGGTTCCGTCGAATTCCTTAGATCTAGGACAGCAGTTCGAATTACTTGGCGTGGTCGCATCAGGACTTCGCGTAGTGGCTATCCAGATCATAGACTGAGTCACGTATTTGACGCCAGACCTAAGACCCCACGATGGTTTCTAGTCGTAACTTGAGTGAGCTAGCTCGCCTCGTGTC
37
39
  ```
40
+
38
41
  ## ORF prediction
39
42
  ```shell
40
43
  fasta_tools random_nucl -n seq1,seq2 -l 1000,1200 | fasta_tools ORF_finder -c -
@@ -45,4 +48,3 @@ MRLMLSSFREVRTHAVMCANKQRVFHFAPVAWRVLWDRTSPC*
45
48
  >seq2 length=87 ORF_prediction
46
49
  MIWIATTRSPDATTPSNSNCCPRSKEFDGTQRKRWSSPEITLPGKPHIVGRQLTQLSGLAFSLGVGASRRLCWEPIATLSEIQCYQF*
47
50
  ```
48
-
@@ -1,53 +1,57 @@
1
- #!/usr/bin/env python
2
- """
3
- File: gff_tools.py
4
- Description: Fasta file tools.
5
- CreateDate: 2025/7/2
6
- Author: xuwenlin
7
- E-mail: wenlinxu.njfu@outlook.com
8
- """
9
- import click
10
- from biofile_kit.fasta_utils import (
11
- fa2tab,
12
- format_fasta,
13
- gap_location,
14
- generate_random_nucl,
15
- get_longest_seq_for_gene,
16
- get_reverse_complementary_seq,
17
- get_seq_len,
18
- id_index_seq,
19
- motif_finder,
20
- ORF_finder,
21
- seq_rename,
22
- SSR_finder,
23
- __version__
24
- )
25
- from pybioinformatic import Displayer
26
-
27
- displayer = Displayer(__file__.split('/')[-1], version=__version__)
28
-
29
-
30
- @click.group(context_settings=dict(help_option_names=['-h', '--help']))
31
- @click.option('-V', '--version', 'version', help='Show author and version information.',
32
- is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
33
- def fasta_tools():
34
- """Fasta file tools."""
35
- pass
36
-
37
-
38
- fasta_tools.add_command(fa2tab, 'fa2tab')
39
- fasta_tools.add_command(format_fasta, 'format_fasta')
40
- fasta_tools.add_command(gap_location, 'gap_location')
41
- fasta_tools.add_command(generate_random_nucl, 'random_nucl')
42
- fasta_tools.add_command(get_longest_seq_for_gene, 'get_longest_seq_for_gene')
43
- fasta_tools.add_command(get_reverse_complementary_seq, 'get_reverse_complementary_seq')
44
- fasta_tools.add_command(get_seq_len, 'get_seq_len')
45
- fasta_tools.add_command(id_index_seq, 'id_index_seq')
46
- fasta_tools.add_command(motif_finder, 'motif_finder')
47
- fasta_tools.add_command(ORF_finder, 'ORF_finder')
48
- fasta_tools.add_command(seq_rename, 'seq_rename')
49
- fasta_tools.add_command(SSR_finder, 'SSR_finder')
50
-
51
-
52
- if __name__ == '__main__':
53
- fasta_tools()
1
+ #!/usr/bin/env python
2
+ """
3
+ File: gff_tools.py
4
+ Description: Fasta file tools.
5
+ CreateDate: 2025/7/2
6
+ Author: xuwenlin
7
+ E-mail: wenlinxu.njfu@outlook.com
8
+ """
9
+ import click
10
+ from biofile_kit.fasta_utils import (
11
+ fa2tab,
12
+ format_fasta,
13
+ gap_location,
14
+ generate_random_nucl,
15
+ get_longest_seq_for_gene,
16
+ get_reverse_complementary_seq,
17
+ get_seq_len,
18
+ hardmasked_to_softmasked,
19
+ id_index_seq,
20
+ motif_finder,
21
+ ORF_finder,
22
+ seq_rename,
23
+ SSR_finder,
24
+ telomere_finder,
25
+ __version__
26
+ )
27
+ from pybioinformatic import Displayer
28
+
29
+ displayer = Displayer(__file__.split('/')[-1], version=__version__)
30
+
31
+
32
+ @click.group(context_settings=dict(help_option_names=['-h', '--help']))
33
+ @click.option('-V', '--version', 'version', help='Show author and version information.',
34
+ is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
35
+ def fasta_tools():
36
+ """Fasta file tools."""
37
+ pass
38
+
39
+
40
+ fasta_tools.add_command(fa2tab, 'fa2tab')
41
+ fasta_tools.add_command(format_fasta, 'format_fasta')
42
+ fasta_tools.add_command(gap_location, 'gap_location')
43
+ fasta_tools.add_command(generate_random_nucl, 'random_nucl')
44
+ fasta_tools.add_command(get_longest_seq_for_gene, 'get_longest_seq_for_gene')
45
+ fasta_tools.add_command(get_reverse_complementary_seq, 'get_reverse_complementary_seq')
46
+ fasta_tools.add_command(get_seq_len, 'get_seq_len')
47
+ fasta_tools.add_command(hardmasked_to_softmasked, 'hardmasked_to_softmasked')
48
+ fasta_tools.add_command(id_index_seq, 'id_index_seq')
49
+ fasta_tools.add_command(motif_finder, 'motif_finder')
50
+ fasta_tools.add_command(ORF_finder, 'ORF_finder')
51
+ fasta_tools.add_command(seq_rename, 'seq_rename')
52
+ fasta_tools.add_command(SSR_finder, 'SSR_finder')
53
+ fasta_tools.add_command(telomere_finder, 'telomere_finder')
54
+
55
+
56
+ if __name__ == '__main__':
57
+ fasta_tools()
@@ -7,8 +7,17 @@ Author: xuwenlin
7
7
  E-mail: wenlinxu.njfu@outlook.com
8
8
  """
9
9
  import click
10
- from biofile_kit.gff_utils import get_feature_density, gff2bed, gff2gtf, gff_extract_seq, gff_sort, rename, __version__
11
10
  from pybioinformatic import Displayer
11
+ from biofile_kit.gff_utils import (
12
+ get_feature_density,
13
+ gff2bed,
14
+ gff2gtf,
15
+ gff_extract_seq,
16
+ gff_sort,
17
+ rename,
18
+ stats,
19
+ __version__
20
+ )
12
21
 
13
22
  displayer = Displayer(__file__.split('/')[-1], version=__version__)
14
23
 
@@ -27,6 +36,7 @@ gff_tools.add_command(gff2gtf, 'to_gtf')
27
36
  gff_tools.add_command(gff_extract_seq, 'extract_seq')
28
37
  gff_tools.add_command(gff_sort, 'sort')
29
38
  gff_tools.add_command(rename, 'rename')
39
+ gff_tools.add_command(stats, 'stats')
30
40
 
31
41
 
32
42
  if __name__ == '__main__':
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python
2
+ """
3
+ File: gt_kit.py
4
+ Description: GT file tools.
5
+ CreateDate: 2024/6/1
6
+ Author: xuwenlin
7
+ E-mail: wenlinxu.njfu@outlook.com
8
+ """
9
+ import click
10
+ from biofile_kit.gt_utils import gs, merge, stats, __version__
11
+ from pybioinformatic import Displayer
12
+ displayer = Displayer(__file__.split('/')[-1], version=__version__)
13
+
14
+
15
+ @click.group(context_settings=dict(help_option_names=['-h', '--help']))
16
+ @click.option('-V', '--version', 'version', help='Show author and version information.',
17
+ is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
18
+ def gt_kit():
19
+ """GT file tools."""
20
+ pass
21
+
22
+
23
+ gt_kit.add_command(gs, 'gs')
24
+ gt_kit.add_command(merge, 'merge')
25
+ gt_kit.add_command(stats, 'stats')
26
+
27
+
28
+ if __name__ == '__main__':
29
+ gt_kit()
@@ -1,30 +1,30 @@
1
- #!/usr/bin/env python
2
- """
3
- File: gff_tools.py
4
- Description: Gtf file tools.
5
- CreateDate: 2025/7/2
6
- Author: xuwenlin
7
- E-mail: wenlinxu.njfu@outlook.com
8
- """
9
- import click
10
- from biofile_kit.gtf_utils import gtf2bed, gtf_extract_seq, gtf_sort, __version__
11
- from pybioinformatic import Displayer
12
-
13
- displayer = Displayer(__file__.split('/')[-1], version=__version__)
14
-
15
-
16
- @click.group(context_settings=dict(help_option_names=['-h', '--help']))
17
- @click.option('-V', '--version', 'version', help='Show author and version information.',
18
- is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
19
- def gtf_tools():
20
- """Gtf file tools."""
21
- pass
22
-
23
-
24
- gtf_tools.add_command(gtf_sort, 'sort')
25
- gtf_tools.add_command(gtf_extract_seq, 'extract_seq')
26
- gtf_tools.add_command(gtf2bed, 'to_bed')
27
-
28
-
29
- if __name__ == '__main__':
30
- gtf_tools()
1
+ #!/usr/bin/env python
2
+ """
3
+ File: gff_tools.py
4
+ Description: Gtf file tools.
5
+ CreateDate: 2025/7/2
6
+ Author: xuwenlin
7
+ E-mail: wenlinxu.njfu@outlook.com
8
+ """
9
+ import click
10
+ from biofile_kit.gtf_utils import gtf2bed, gtf_extract_seq, gtf_sort, __version__
11
+ from pybioinformatic import Displayer
12
+
13
+ displayer = Displayer(__file__.split('/')[-1], version=__version__)
14
+
15
+
16
+ @click.group(context_settings=dict(help_option_names=['-h', '--help']))
17
+ @click.option('-V', '--version', 'version', help='Show author and version information.',
18
+ is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
19
+ def gtf_tools():
20
+ """Gtf file tools."""
21
+ pass
22
+
23
+
24
+ gtf_tools.add_command(gtf_sort, 'sort')
25
+ gtf_tools.add_command(gtf_extract_seq, 'extract_seq')
26
+ gtf_tools.add_command(gtf2bed, 'to_bed')
27
+
28
+
29
+ if __name__ == '__main__':
30
+ gtf_tools()
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python
2
+ """
3
+ File: vcf_tools.py
4
+ Description: Vcf file tools.
5
+ CreateDate: 2025/7/19
6
+ Author: xuwenlin
7
+ E-mail: wenlinxu.njfu@outlook.com
8
+ """
9
+ from io import TextIOWrapper
10
+ import click
11
+ from pybioinformatic import Displayer
12
+ from biofile_kit.vcf_utils import vcf2gt, __version__
13
+
14
+ displayer = Displayer(__file__.split('/')[-1], version=__version__)
15
+
16
+
17
+ @click.group(context_settings=dict(help_option_names=['-h', '--help']))
18
+ @click.option('-V', '--version', 'version', help='Show author and version information.',
19
+ is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
20
+ def vcf_tools():
21
+ """Vcf file tools."""
22
+ pass
23
+
24
+
25
+ vcf_tools.add_command(vcf2gt, 'vcf2gt')
26
+
27
+
28
+ if __name__ == '__main__':
29
+ vcf_tools()
@@ -1,30 +1,34 @@
1
- from biofile_kit.fasta_utils.fa2tab import run as fa2tab
2
- from biofile_kit.fasta_utils.format_fasta import run as format_fasta
3
- from biofile_kit.fasta_utils.gap_location import run as gap_location
4
- from biofile_kit.fasta_utils.generate_random_nucl import run as generate_random_nucl
5
- from biofile_kit.fasta_utils.get_longest_seq_for_gene import run as get_longest_seq_for_gene
6
- from biofile_kit.fasta_utils.get_reverse_complementary_seq import run as get_reverse_complementary_seq
7
- from biofile_kit.fasta_utils.get_seq_len import run as get_seq_len
8
- from biofile_kit.fasta_utils.id_index_seq import run as id_index_seq
9
- from biofile_kit.fasta_utils.motif_finder import run as motif_finder
10
- from biofile_kit.fasta_utils.ORF_finder import run as ORF_finder
11
- from biofile_kit.fasta_utils.seq_rename import run as seq_rename
12
- from biofile_kit.fasta_utils.SSR_finder import run as SSR_finder
13
-
14
- __version__ = '0.1.0'
15
-
16
- __all__ = [
17
- 'fa2tab',
18
- 'format_fasta',
19
- 'gap_location',
20
- 'generate_random_nucl',
21
- 'get_longest_seq_for_gene',
22
- 'get_reverse_complementary_seq',
23
- 'get_seq_len',
24
- 'id_index_seq',
25
- 'motif_finder',
26
- 'ORF_finder',
27
- 'seq_rename',
28
- 'SSR_finder',
29
- '__version__'
1
+ from biofile_kit.fasta_utils.fa2tab import run as fa2tab
2
+ from biofile_kit.fasta_utils.format_fasta import run as format_fasta
3
+ from biofile_kit.fasta_utils.gap_location import run as gap_location
4
+ from biofile_kit.fasta_utils.generate_random_nucl import run as generate_random_nucl
5
+ from biofile_kit.fasta_utils.get_longest_seq_for_gene import run as get_longest_seq_for_gene
6
+ from biofile_kit.fasta_utils.get_reverse_complementary_seq import run as get_reverse_complementary_seq
7
+ from biofile_kit.fasta_utils.get_seq_len import run as get_seq_len
8
+ from biofile_kit.fasta_utils.hardmasked_to_softmasked import run as hardmasked_to_softmasked
9
+ from biofile_kit.fasta_utils.id_index_seq import run as id_index_seq
10
+ from biofile_kit.fasta_utils.motif_finder import run as motif_finder
11
+ from biofile_kit.fasta_utils.ORF_finder import run as ORF_finder
12
+ from biofile_kit.fasta_utils.seq_rename import run as seq_rename
13
+ from biofile_kit.fasta_utils.SSR_finder import run as SSR_finder
14
+ from biofile_kit.fasta_utils.telomere_finder import run as telomere_finder
15
+
16
+ __version__ = '0.1.1'
17
+
18
+ __all__ = [
19
+ 'fa2tab',
20
+ 'format_fasta',
21
+ 'gap_location',
22
+ 'generate_random_nucl',
23
+ 'get_longest_seq_for_gene',
24
+ 'get_reverse_complementary_seq',
25
+ 'get_seq_len',
26
+ 'hardmasked_to_softmasked',
27
+ 'id_index_seq',
28
+ 'motif_finder',
29
+ 'ORF_finder',
30
+ 'seq_rename',
31
+ 'SSR_finder',
32
+ 'telomere_finder',
33
+ '__version__'
30
34
  ]
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  """
3
3
  File: fa2tab.py
4
- Description:
4
+ Description: Convert FASTA to tabular format.
5
5
  CreateDate: 2023/10/14
6
6
  Author: xuwenlin
7
7
  E-mail: wenlinxu.njfu@outlook.com
@@ -22,9 +22,7 @@ def main(fasta_file: Union[str, TextIOWrapper],
22
22
 
23
23
 
24
24
  @click.command(context_settings=dict(help_option_names=['-h', '--help']))
25
- @click.option('-i', '--fasta_file', 'fasta_file',
26
- metavar='<fasta file|stdin>', type=click.File('r'), required=True,
27
- help='Input FASTA file.')
25
+ @click.argument('fasta_file', metavar='<fasta file|stdin>', type=click.File('r'), required=True)
28
26
  @click.option('-p', '--parse_seqids', 'parse_seqids',
29
27
  is_flag=True, flag_value=True,
30
28
  help='Parse sequence id.')
@@ -34,7 +32,7 @@ def main(fasta_file: Union[str, TextIOWrapper],
34
32
  @click.option('-V', '--version', 'version', help='Show author and version information.',
35
33
  is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
36
34
  def run(fasta_file, parse_seqids, output_file):
37
- """Description."""
35
+ """Convert FASTA to tabular format."""
38
36
  main(fasta_file, parse_seqids, output_file)
39
37
 
40
38
 
@@ -1,38 +1,38 @@
1
- #!/usr/bin/env python
2
- """
3
- File: gap_location.py
4
- Description: Gap location.
5
- CreateDate: 2025/5/26
6
- Author: xuwenlin
7
- E-mail: wenlinxu.njfu@outlook.com
8
- """
9
- from typing import Union
10
- from io import TextIOWrapper
11
- import click
12
- from pybioinformatic import Fasta, Displayer
13
-
14
- displayer = Displayer(__file__.split('/')[-1], version='0.1.0')
15
-
16
-
17
- def main(asm_file: Union[str, TextIOWrapper],
18
- output_file: TextIOWrapper = None):
19
- with Fasta(asm_file) as fa:
20
- for seq_obj in fa.parse():
21
- for gap in seq_obj.locate_gap():
22
- click.echo(gap, output_file)
23
-
24
-
25
- @click.command(context_settings=dict(help_option_names=['-h', '--help']))
26
- @click.argument('asm_file', metavar='<assembly fasta file | stdin>', required=True, nargs=1)
27
- @click.option('-o', '--output-file', 'output_file',
28
- metavar='<file|stdout>', type=click.File('w'),
29
- help='Output file, stdout by default.')
30
- @click.option('-V', '--version', 'version', help='Show author and version information.',
31
- is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
32
- def run(asm_file, output_file):
33
- """Gap location."""
34
- main(asm_file, output_file)
35
-
36
-
37
- if __name__ == '__main__':
38
- run()
1
+ #!/usr/bin/env python
2
+ """
3
+ File: gap_location.py
4
+ Description: Gap location.
5
+ CreateDate: 2025/5/26
6
+ Author: xuwenlin
7
+ E-mail: wenlinxu.njfu@outlook.com
8
+ """
9
+ from typing import Union
10
+ from io import TextIOWrapper
11
+ import click
12
+ from pybioinformatic import Fasta, Displayer
13
+
14
+ displayer = Displayer(__file__.split('/')[-1], version='0.1.0')
15
+
16
+
17
+ def main(asm_file: Union[str, TextIOWrapper],
18
+ output_file: TextIOWrapper = None):
19
+ with Fasta(asm_file) as fa:
20
+ for seq_obj in fa.parse():
21
+ for gap in seq_obj.locate_gap():
22
+ click.echo(f'{seq_obj.id}\t{gap[0]}\t{gap[1]}', output_file)
23
+
24
+
25
+ @click.command(context_settings=dict(help_option_names=['-h', '--help']))
26
+ @click.argument('asm_file', metavar='<assembly fasta file | stdin>', type=click.File('r'), required=True, nargs=1)
27
+ @click.option('-o', '--output-file', 'output_file',
28
+ metavar='<file|stdout>', type=click.File('w'),
29
+ help='Output file, stdout by default.')
30
+ @click.option('-V', '--version', 'version', help='Show author and version information.',
31
+ is_flag=True, is_eager=True, expose_value=False, callback=displayer.version_info)
32
+ def run(asm_file, output_file):
33
+ """Gap location."""
34
+ main(asm_file, output_file)
35
+
36
+
37
+ if __name__ == '__main__':
38
+ run()