ipyrad2 0.1.9__py3-none-any.whl

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 (111) hide show
  1. ipyrad2/__init__.py +16 -0
  2. ipyrad2/_version.py +24 -0
  3. ipyrad2/analysis/__init__.py +61 -0
  4. ipyrad2/analysis/converters/__init__.py +22 -0
  5. ipyrad2/analysis/converters/vcf_to_hdf5.py +656 -0
  6. ipyrad2/analysis/extracters/__init__.py +33 -0
  7. ipyrad2/analysis/extracters/locus_extracter.py +472 -0
  8. ipyrad2/analysis/extracters/sequence_common.py +230 -0
  9. ipyrad2/analysis/extracters/snps_extracter.py +1399 -0
  10. ipyrad2/analysis/extracters/window_extracter.py +991 -0
  11. ipyrad2/analysis/methods/__init__.py +47 -0
  12. ipyrad2/analysis/methods/admixture.py +346 -0
  13. ipyrad2/analysis/methods/baba/__init__.py +21 -0
  14. ipyrad2/analysis/methods/baba/models.py +79 -0
  15. ipyrad2/analysis/methods/baba/runner.py +1822 -0
  16. ipyrad2/analysis/methods/bpp.py +756 -0
  17. ipyrad2/analysis/methods/bpp_posteriors.py +105 -0
  18. ipyrad2/analysis/methods/bpp_summary.py +123 -0
  19. ipyrad2/analysis/methods/common.py +688 -0
  20. ipyrad2/analysis/methods/dapc.py +256 -0
  21. ipyrad2/analysis/methods/pca.py +800 -0
  22. ipyrad2/analysis/methods/pca_drawing.py +286 -0
  23. ipyrad2/analysis/methods/popgen/__init__.py +21 -0
  24. ipyrad2/analysis/methods/popgen/common.py +193 -0
  25. ipyrad2/analysis/methods/popgen/estimators.py +406 -0
  26. ipyrad2/analysis/methods/popgen/models.py +185 -0
  27. ipyrad2/analysis/methods/popgen/runner.py +451 -0
  28. ipyrad2/analysis/methods/popgen/seq_backend.py +1314 -0
  29. ipyrad2/analysis/methods/popgen/snp_backend.py +296 -0
  30. ipyrad2/analysis/methods/snmf.py +635 -0
  31. ipyrad2/analysis/methods/snps_imputer.py +182 -0
  32. ipyrad2/analysis/methods/treeslider.py +1140 -0
  33. ipyrad2/analysis/utils.py +163 -0
  34. ipyrad2/assembler/__init__.py +3 -0
  35. ipyrad2/assembler/assemble.py +2257 -0
  36. ipyrad2/assembler/beds.py +826 -0
  37. ipyrad2/assembler/hdf5_utils.py +163 -0
  38. ipyrad2/assembler/loci.py +1897 -0
  39. ipyrad2/assembler/paralogs.py +913 -0
  40. ipyrad2/assembler/read_filters.py +352 -0
  41. ipyrad2/assembler/sort_utils.py +12 -0
  42. ipyrad2/assembler/variants.py +1495 -0
  43. ipyrad2/assembler/write_seqs.py +384 -0
  44. ipyrad2/assembler/write_snps.py +700 -0
  45. ipyrad2/classic/__init__.py +3 -0
  46. ipyrad2/classic/cli_classic.py +234 -0
  47. ipyrad2/cli/__init__.py +3 -0
  48. ipyrad2/cli/cli_admixture.py +139 -0
  49. ipyrad2/cli/cli_analysis.py +570 -0
  50. ipyrad2/cli/cli_assemble.py +217 -0
  51. ipyrad2/cli/cli_baba.py +149 -0
  52. ipyrad2/cli/cli_bpp.py +167 -0
  53. ipyrad2/cli/cli_dapc.py +135 -0
  54. ipyrad2/cli/cli_demux.py +169 -0
  55. ipyrad2/cli/cli_denovo.py +166 -0
  56. ipyrad2/cli/cli_lex.py +114 -0
  57. ipyrad2/cli/cli_main.py +483 -0
  58. ipyrad2/cli/cli_map.py +100 -0
  59. ipyrad2/cli/cli_pca.py +163 -0
  60. ipyrad2/cli/cli_popgen.py +152 -0
  61. ipyrad2/cli/cli_snmf.py +158 -0
  62. ipyrad2/cli/cli_snpex.py +147 -0
  63. ipyrad2/cli/cli_treeslider.py +153 -0
  64. ipyrad2/cli/cli_trim.py +179 -0
  65. ipyrad2/cli/cli_vcf_to_hdf5.py +65 -0
  66. ipyrad2/cli/cli_wex.py +113 -0
  67. ipyrad2/cli/command_log.py +68 -0
  68. ipyrad2/cli/common.py +24 -0
  69. ipyrad2/demuxer/__init__.py +3 -0
  70. ipyrad2/demuxer/demux.py +1162 -0
  71. ipyrad2/demuxer/demux_pipeline.py +869 -0
  72. ipyrad2/demuxer/demux_report.py +471 -0
  73. ipyrad2/demuxer/match.py +975 -0
  74. ipyrad2/demuxer/sample_names.py +37 -0
  75. ipyrad2/denovo/__init__.py +2 -0
  76. ipyrad2/denovo/align.py +1346 -0
  77. ipyrad2/denovo/cluster.py +163 -0
  78. ipyrad2/denovo/common.py +75 -0
  79. ipyrad2/denovo/denovo.py +1702 -0
  80. ipyrad2/denovo/graph.py +1334 -0
  81. ipyrad2/denovo/graph_split.py +269 -0
  82. ipyrad2/mapper/__init__.py +8 -0
  83. ipyrad2/mapper/legacy_map_bams.py +453 -0
  84. ipyrad2/mapper/map_samples_prep.py +304 -0
  85. ipyrad2/mapper/map_stats.py +604 -0
  86. ipyrad2/mapper/mapper.py +599 -0
  87. ipyrad2/trimmer/__init__.py +2 -0
  88. ipyrad2/trimmer/adapters.fa +14 -0
  89. ipyrad2/trimmer/trim_fastqs.py +730 -0
  90. ipyrad2/utils/__init__.py +0 -0
  91. ipyrad2/utils/exceptions.py +11 -0
  92. ipyrad2/utils/jit_funcs.py +91 -0
  93. ipyrad2/utils/kmers.py +1177 -0
  94. ipyrad2/utils/logger.py +104 -0
  95. ipyrad2/utils/names.py +699 -0
  96. ipyrad2/utils/parallel/__init__.py +22 -0
  97. ipyrad2/utils/parallel/pipeline.py +681 -0
  98. ipyrad2/utils/parallel/pool.py +544 -0
  99. ipyrad2/utils/params.py +222 -0
  100. ipyrad2/utils/pops.py +228 -0
  101. ipyrad2/utils/profiling.py +83 -0
  102. ipyrad2/utils/progress.py +58 -0
  103. ipyrad2/utils/seqs.py +46 -0
  104. ipyrad2-0.1.9.dist-info/METADATA +749 -0
  105. ipyrad2-0.1.9.dist-info/RECORD +111 -0
  106. ipyrad2-0.1.9.dist-info/WHEEL +5 -0
  107. ipyrad2-0.1.9.dist-info/entry_points.txt +3 -0
  108. ipyrad2-0.1.9.dist-info/licenses/LICENSE.txt +674 -0
  109. ipyrad2-0.1.9.dist-info/scm_file_list.json +184 -0
  110. ipyrad2-0.1.9.dist-info/scm_version.json +8 -0
  111. ipyrad2-0.1.9.dist-info/top_level.txt +1 -0
ipyrad2/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env python
2
+
3
+ from __future__ import annotations
4
+
5
+ try:
6
+ from ._version import __version__
7
+ except ImportError:
8
+ try:
9
+ from importlib.metadata import PackageNotFoundError, version
10
+ except Exception: # pragma: no cover - fallback for very old Pythons
11
+ from importlib_metadata import PackageNotFoundError, version # type: ignore
12
+
13
+ try:
14
+ __version__ = version("ipyrad2")
15
+ except PackageNotFoundError:
16
+ __version__ = "0.0.0+unknown"
ipyrad2/_version.py ADDED
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '0.1.9'
22
+ __version_tuple__ = version_tuple = (0, 1, 9)
23
+
24
+ __commit_id__ = commit_id = 'g0393cec41'
@@ -0,0 +1,61 @@
1
+ """Canonical public surface for phase-1 and phase-2 analysis tools and helpers."""
2
+
3
+ from importlib import import_module
4
+
5
+ __all__ = [
6
+ "Bpp",
7
+ "LocusExtracter",
8
+ "PCAFamilyResult",
9
+ "SNPsExtracter",
10
+ "SNPsImputer",
11
+ "VCFToHDF5",
12
+ "WindowExtracter",
13
+ "run_admixture_method",
14
+ "run_bpp_method",
15
+ "run_dapc_method",
16
+ "run_locus_extracter",
17
+ "run_pca_analysis",
18
+ "run_pca_method",
19
+ "run_popgen_method",
20
+ "run_snps_extracter",
21
+ "run_snmf_method",
22
+ "run_tsne_analysis",
23
+ "run_umap_analysis",
24
+ "run_vcf_to_hdf5",
25
+ "run_window_extracter",
26
+ ]
27
+
28
+
29
+ _LAZY_EXPORTS = {
30
+ "VCFToHDF5": (".converters.vcf_to_hdf5", "VCFToHDF5"),
31
+ "run_vcf_to_hdf5": (".converters.vcf_to_hdf5", "run_vcf_to_hdf5"),
32
+ "LocusExtracter": (".extracters.locus_extracter", "LocusExtracter"),
33
+ "run_locus_extracter": (".extracters.locus_extracter", "run_locus_extracter"),
34
+ "SNPsExtracter": (".extracters.snps_extracter", "SNPsExtracter"),
35
+ "run_snps_extracter": (".extracters.snps_extracter", "run_snps_extracter"),
36
+ "WindowExtracter": (".extracters.window_extracter", "WindowExtracter"),
37
+ "run_window_extracter": (".extracters.window_extracter", "run_window_extracter"),
38
+ "SNPsImputer": (".methods.snps_imputer", "SNPsImputer"),
39
+ "Bpp": (".methods.bpp", "Bpp"),
40
+ "run_admixture_method": (".methods.admixture", "run_admixture_method"),
41
+ "run_bpp_method": (".methods.bpp", "run_bpp_method"),
42
+ "run_dapc_method": (".methods.dapc", "run_dapc_method"),
43
+ "run_popgen_method": (".methods.popgen", "run_popgen_method"),
44
+ "run_snmf_method": (".methods.snmf", "run_snmf_method"),
45
+ "PCAFamilyResult": (".methods.pca", "PCAFamilyResult"),
46
+ "run_pca_analysis": (".methods.pca", "run_pca_analysis"),
47
+ "run_pca_method": (".methods.pca", "run_pca_method"),
48
+ "run_tsne_analysis": (".methods.pca", "run_tsne_analysis"),
49
+ "run_umap_analysis": (".methods.pca", "run_umap_analysis"),
50
+ }
51
+
52
+
53
+ def __getattr__(name: str):
54
+ """Load heavier or optional analysis helpers lazily."""
55
+ if name in _LAZY_EXPORTS:
56
+ module_name, attr_name = _LAZY_EXPORTS[name]
57
+ module = import_module(module_name, __name__)
58
+ value = getattr(module, attr_name)
59
+ globals()[name] = value
60
+ return value
61
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -0,0 +1,22 @@
1
+ """Data-conversion tools for the analysis workflow."""
2
+
3
+ from importlib import import_module
4
+
5
+ __all__ = ["VCFToHDF5", "run_vcf_to_hdf5"]
6
+
7
+
8
+ _LAZY_EXPORTS = {
9
+ "VCFToHDF5": (".vcf_to_hdf5", "VCFToHDF5"),
10
+ "run_vcf_to_hdf5": (".vcf_to_hdf5", "run_vcf_to_hdf5"),
11
+ }
12
+
13
+
14
+ def __getattr__(name: str):
15
+ """Load converter helpers lazily so parser imports stay lightweight."""
16
+ if name in _LAZY_EXPORTS:
17
+ module_name, attr_name = _LAZY_EXPORTS[name]
18
+ module = import_module(module_name, __name__)
19
+ value = getattr(module, attr_name)
20
+ globals()[name] = value
21
+ return value
22
+ raise AttributeError(name)