diff --git a/dadi_cli/GenerateFs.py b/dadi_cli/GenerateFs.py index e80bd03..a0346ff 100644 --- a/dadi_cli/GenerateFs.py +++ b/dadi_cli/GenerateFs.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index cae8b7f..5ecef98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -18,7 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", ] dependencies = [ - "dadi", + "dadi>=2.4.3", ] [project.scripts]