Skip to content

Commit

Permalink
Merge pull request #53 from gymrek-lab/feat/vcf_output
Browse files Browse the repository at this point in the history
Feat/vcf output
  • Loading branch information
mlamkin7 authored Jun 27, 2022
2 parents 9b4393a + 6c81f8d commit f1a2f12
Show file tree
Hide file tree
Showing 11 changed files with 438 additions and 209,600 deletions.
6 changes: 4 additions & 2 deletions haptools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def karyogram(bp, sample, out, title, centromeres, colors):
@main.command()
@click.option('--model', help="Admixture model in .dat format. See docs for info.", \
type=str, required=True)
@click.option('--mapdir', help="Directory containing files ending in .map with genetic map coords ", \
@click.option('--mapdir', help="Directory containing files with chr\{1-22,X\} and ending in .map in the file name with genetic map coords.", \
type=str, required=True)
@click.option('--out', help="Prefix to name output files.", \
type=str, required=True)
Expand All @@ -74,10 +74,12 @@ def simgenotype(invcf, sample_info, model, mapdir, out, popsize, seed, chroms):
--mapdir map/ \
--out test
"""
from .sim_genotypes import simulate_gt, write_breakpoints
from .sim_genotype import simulate_gt, write_breakpoints, output_vcf, validate_params
chroms = chroms.split(',')
validate_params(model, mapdir, chroms, popsize, invcf, sample_info)
samples, breakpoints = simulate_gt(model, mapdir, chroms, popsize, seed)
breakpoints = write_breakpoints(samples, breakpoints, out)
output_vcf(breakpoints, model, invcf, sample_info, out)

############ Haptools simphenotype ###############
DEFAULT_SIMU_REP = 1
Expand Down
Loading

0 comments on commit f1a2f12

Please sign in to comment.