Skip to content

Commit

Permalink
now computing stats on subwindows within focal (#92)
Browse files Browse the repository at this point in the history
* now computing stats on subwindows within focal

* state of things for probgen poster

* outputting vcf for shic

* updating env.yml

* flatten samples

* fixed environment.yml

---------

Co-authored-by: andrewkern <[email protected]>
  • Loading branch information
mufernando and andrewkern authored Jun 23, 2023
1 parent f6f94fd commit 2d0b547
Show file tree
Hide file tree
Showing 5 changed files with 1,015 additions and 60 deletions.
8 changes: 8 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: analysis2
channels:
- conda-forge
- bioconda
- r
dependencies:
- gcc
- gmp
Expand All @@ -28,6 +29,13 @@ dependencies:
- mamba
- openjdk
- sweepfinder2
- scikit-learn
- r-base
- r-essentials
- r-irkernel
- r-ggplot2
- r-dplyr
- libprotobuf=3.21.12
- pip:
- git+https://github.com/popsim-consortium/stdpopsim.git
- scikit-allel
Expand Down
865 changes: 865 additions & 0 deletions power_analysis.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion workflows/config/snakemake/small_sweep.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General configs
seed: 12345
replicates: 2
replicates: 3
output_dir: results

# Contig configs
Expand All @@ -27,11 +27,13 @@ annotation_list:
num_windows: 2 # number of sweep locations in chromosome
focal_size: 5_000_000 # size of the focal sweep window in bp
buffer_cM: 2.5
num_subwins: 10 # number of subwindows within focal to compute statistic
# Sweep configs
coeffs:
bounds: [0.03, 0.1]
grid_size: 1 # This will yield just one s=0.03 or 2Ns~600
sweep_min_freq: 0.8
time_multipliers: [1, 2, 4]

# slim settings
slim_scaling_factor: 2
Expand Down
7 changes: 5 additions & 2 deletions workflows/config/snakemake/sweep_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ genetic_map: HapMapII_GRCh38
demo_model:
id: OutOfAfrica_3G09
samples:
YRI: 1000
CEU: 1000
YRI: 10
CEU: 10
CHB: 0

# BGS configs
Expand All @@ -27,11 +27,14 @@ annotation_list:
num_windows: 100 # number of sweep locations in chromosome
focal_size: 5_000_000 # size of the focal sweep window in bp
buffer_cM: 2.5
num_subwins: 10 # number of subwindows within focal to compute statistic

# Sweep configs
coeffs:
bounds: [0.03, 0.1]
grid_size: 1 # This will yield just one s=0.03 or 2Ns~600
sweep_min_freq: 0.8
time_multipliers: [1]

# slim settings
slim_scaling_factor: 2
Expand Down
Loading

0 comments on commit 2d0b547

Please sign in to comment.