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.
- ipyrad2/__init__.py +16 -0
- ipyrad2/_version.py +24 -0
- ipyrad2/analysis/__init__.py +61 -0
- ipyrad2/analysis/converters/__init__.py +22 -0
- ipyrad2/analysis/converters/vcf_to_hdf5.py +656 -0
- ipyrad2/analysis/extracters/__init__.py +33 -0
- ipyrad2/analysis/extracters/locus_extracter.py +472 -0
- ipyrad2/analysis/extracters/sequence_common.py +230 -0
- ipyrad2/analysis/extracters/snps_extracter.py +1399 -0
- ipyrad2/analysis/extracters/window_extracter.py +991 -0
- ipyrad2/analysis/methods/__init__.py +47 -0
- ipyrad2/analysis/methods/admixture.py +346 -0
- ipyrad2/analysis/methods/baba/__init__.py +21 -0
- ipyrad2/analysis/methods/baba/models.py +79 -0
- ipyrad2/analysis/methods/baba/runner.py +1822 -0
- ipyrad2/analysis/methods/bpp.py +756 -0
- ipyrad2/analysis/methods/bpp_posteriors.py +105 -0
- ipyrad2/analysis/methods/bpp_summary.py +123 -0
- ipyrad2/analysis/methods/common.py +688 -0
- ipyrad2/analysis/methods/dapc.py +256 -0
- ipyrad2/analysis/methods/pca.py +800 -0
- ipyrad2/analysis/methods/pca_drawing.py +286 -0
- ipyrad2/analysis/methods/popgen/__init__.py +21 -0
- ipyrad2/analysis/methods/popgen/common.py +193 -0
- ipyrad2/analysis/methods/popgen/estimators.py +406 -0
- ipyrad2/analysis/methods/popgen/models.py +185 -0
- ipyrad2/analysis/methods/popgen/runner.py +451 -0
- ipyrad2/analysis/methods/popgen/seq_backend.py +1314 -0
- ipyrad2/analysis/methods/popgen/snp_backend.py +296 -0
- ipyrad2/analysis/methods/snmf.py +635 -0
- ipyrad2/analysis/methods/snps_imputer.py +182 -0
- ipyrad2/analysis/methods/treeslider.py +1140 -0
- ipyrad2/analysis/utils.py +163 -0
- ipyrad2/assembler/__init__.py +3 -0
- ipyrad2/assembler/assemble.py +2257 -0
- ipyrad2/assembler/beds.py +826 -0
- ipyrad2/assembler/hdf5_utils.py +163 -0
- ipyrad2/assembler/loci.py +1897 -0
- ipyrad2/assembler/paralogs.py +913 -0
- ipyrad2/assembler/read_filters.py +352 -0
- ipyrad2/assembler/sort_utils.py +12 -0
- ipyrad2/assembler/variants.py +1495 -0
- ipyrad2/assembler/write_seqs.py +384 -0
- ipyrad2/assembler/write_snps.py +700 -0
- ipyrad2/classic/__init__.py +3 -0
- ipyrad2/classic/cli_classic.py +234 -0
- ipyrad2/cli/__init__.py +3 -0
- ipyrad2/cli/cli_admixture.py +139 -0
- ipyrad2/cli/cli_analysis.py +570 -0
- ipyrad2/cli/cli_assemble.py +217 -0
- ipyrad2/cli/cli_baba.py +149 -0
- ipyrad2/cli/cli_bpp.py +167 -0
- ipyrad2/cli/cli_dapc.py +135 -0
- ipyrad2/cli/cli_demux.py +169 -0
- ipyrad2/cli/cli_denovo.py +166 -0
- ipyrad2/cli/cli_lex.py +114 -0
- ipyrad2/cli/cli_main.py +483 -0
- ipyrad2/cli/cli_map.py +100 -0
- ipyrad2/cli/cli_pca.py +163 -0
- ipyrad2/cli/cli_popgen.py +152 -0
- ipyrad2/cli/cli_snmf.py +158 -0
- ipyrad2/cli/cli_snpex.py +147 -0
- ipyrad2/cli/cli_treeslider.py +153 -0
- ipyrad2/cli/cli_trim.py +179 -0
- ipyrad2/cli/cli_vcf_to_hdf5.py +65 -0
- ipyrad2/cli/cli_wex.py +113 -0
- ipyrad2/cli/command_log.py +68 -0
- ipyrad2/cli/common.py +24 -0
- ipyrad2/demuxer/__init__.py +3 -0
- ipyrad2/demuxer/demux.py +1162 -0
- ipyrad2/demuxer/demux_pipeline.py +869 -0
- ipyrad2/demuxer/demux_report.py +471 -0
- ipyrad2/demuxer/match.py +975 -0
- ipyrad2/demuxer/sample_names.py +37 -0
- ipyrad2/denovo/__init__.py +2 -0
- ipyrad2/denovo/align.py +1346 -0
- ipyrad2/denovo/cluster.py +163 -0
- ipyrad2/denovo/common.py +75 -0
- ipyrad2/denovo/denovo.py +1702 -0
- ipyrad2/denovo/graph.py +1334 -0
- ipyrad2/denovo/graph_split.py +269 -0
- ipyrad2/mapper/__init__.py +8 -0
- ipyrad2/mapper/legacy_map_bams.py +453 -0
- ipyrad2/mapper/map_samples_prep.py +304 -0
- ipyrad2/mapper/map_stats.py +604 -0
- ipyrad2/mapper/mapper.py +599 -0
- ipyrad2/trimmer/__init__.py +2 -0
- ipyrad2/trimmer/adapters.fa +14 -0
- ipyrad2/trimmer/trim_fastqs.py +730 -0
- ipyrad2/utils/__init__.py +0 -0
- ipyrad2/utils/exceptions.py +11 -0
- ipyrad2/utils/jit_funcs.py +91 -0
- ipyrad2/utils/kmers.py +1177 -0
- ipyrad2/utils/logger.py +104 -0
- ipyrad2/utils/names.py +699 -0
- ipyrad2/utils/parallel/__init__.py +22 -0
- ipyrad2/utils/parallel/pipeline.py +681 -0
- ipyrad2/utils/parallel/pool.py +544 -0
- ipyrad2/utils/params.py +222 -0
- ipyrad2/utils/pops.py +228 -0
- ipyrad2/utils/profiling.py +83 -0
- ipyrad2/utils/progress.py +58 -0
- ipyrad2/utils/seqs.py +46 -0
- ipyrad2-0.1.9.dist-info/METADATA +749 -0
- ipyrad2-0.1.9.dist-info/RECORD +111 -0
- ipyrad2-0.1.9.dist-info/WHEEL +5 -0
- ipyrad2-0.1.9.dist-info/entry_points.txt +3 -0
- ipyrad2-0.1.9.dist-info/licenses/LICENSE.txt +674 -0
- ipyrad2-0.1.9.dist-info/scm_file_list.json +184 -0
- ipyrad2-0.1.9.dist-info/scm_version.json +8 -0
- 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)
|