Skip to content
Merged
5 changes: 3 additions & 2 deletions dadi_cli/GenerateFs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ def generate_fs(
vcf_filename=vcf, popinfo_filename=pop_info, subsample=subsample_dict, calc_coverage=calc_coverage, extract_ploidy=True
)
# multiply number of individuals subsamples by the ploidy to get sample size
projections = [individuals*ploidy for individuals in subsample]
for pop in pop_ids:
projections = [individuals*ploidy[pop] for individuals in subsample]
print(projections, ploidy, subsample)
elif calc_coverage:
dd, ploidy = dadi.Misc.make_data_dict_vcf(vcf_filename=vcf, popinfo_filename=pop_info, calc_coverage=calc_coverage, extract_ploidy=True)
import collections
nseq = collections.defaultdict(int)
for line in open(pop_info).readlines():
nseq[line.strip().split()[-1]] += 1 * ploidy
nseq[line.strip().split()[-1]] += 1 * ploidy[line.strip().split()[-1]]
else:
dd = dadi.Misc.make_data_dict_vcf(vcf_filename=vcf, popinfo_filename=pop_info, calc_coverage=calc_coverage)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "dadi-cli"
version = "0.9.11"
version = "0.9.12"
requires-python = ">=3.9"
description = "A command line interface for dadi"
readme = "README.md"
Expand All @@ -18,7 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
]
dependencies = [
"dadi",
"dadi>=2.4.3",
]

[project.scripts]
Expand Down
Loading