-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updates to get PhoSin and HomSap working #112
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ dependencies: | |
- pip | ||
- slim==4.0 | ||
- snakemake==7.32.4 | ||
- bedtools | ||
- ldc | ||
- seaborn | ||
- pysam | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# for analysis2 pi plot, binning genomic regions | ||
|
||
|
||
import sys | ||
import numpy as np | ||
|
||
|
||
num_average = 5 # number of lines to average | ||
|
||
|
||
with open(sys.argv[1]) as infile: | ||
group = [] | ||
counter = 0 | ||
header = infile.readline().strip().split() | ||
header = header[:-1] | ||
print("\t".join(header)) | ||
for line in infile: | ||
newline = line.strip().split() | ||
newline = newline[:-1] | ||
#print(newline) # get rid of seed number | ||
newline = list(map(float,newline)) | ||
group.append(np.array(newline)) | ||
|
||
if counter % num_average != 0: | ||
pass | ||
elif counter == 0: | ||
pass | ||
else: | ||
# average rows | ||
avgs = np.mean(group, axis=0) | ||
print("\t".join(map(str,avgs))) | ||
group = [] # reset | ||
|
||
counter+=1 |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# snakemake settings | ||
"seed": 12345 | ||
"replicates": 3 | ||
"output_dir": "results" | ||
|
||
# species-specific settings | ||
"species": "PhoSin" | ||
"demo_models": [ | ||
{"id":"Constant", | ||
"num_samples_per_population": [100], | ||
}, | ||
{"id":"Vaquita2Epoch_1R22", | ||
"num_samples_per_population": 3*[100], | ||
} | ||
] | ||
"genetic_map": null | ||
"chrm_list": "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21" | ||
"dfe_list": ["none", "Gamma_R22"] | ||
"annotation_list": ["all_sites", "Phocoena_sinus.mPhoSin1.pri.110_exons"] | ||
"mask_file": "workflows/masks/PhoSin_fake.mask.bed" | ||
"stairway_annot_mask" : "" # set this or any of the below to 'none' to skip annot masking | ||
"msmc_annot_mask" : "" | ||
"gone_annot_mask" : "" | ||
"smcpp_annot_mask" : "" | ||
|
||
# slim settings | ||
"slim_scaling_factor": 1 | ||
"slim_burn_in": 10 | ||
|
||
# n(t) specific configs | ||
"methods" : ["stairwayplot", "gone", "smcpp", "msmc"] | ||
"num_sampled_genomes_msmc" : [6] | ||
"num_msmc_iterations" : 20 | ||
"gone_phase" : 1 # 0 for pseudohaploid, 1 for phased, 2 for unknown phase | ||
"gone_max_snps" : 50000 # default=50000 | ||
"gone_threads" : 8 | ||
"gone_num_gens" : 2000 # default=2000 | ||
"gone_num_bins" : 400 # default=400 | ||
|
||
|
||
# exe paths | ||
"poly_dfe_exec": "ext/polyDFE/polyDFE-2.0-linux-64-bit" | ||
"dfe_alpha_exec": "ext/dfe-alpha-release-2.16/est_dfe" | ||
"dfe_alpha_data_path_1": "ext/dfe-alpha-release-2.16/data" | ||
"dfe_alpha_data_path_2": "three-epoch" | ||
"grapes_exec": "ext/grapes/multi_grapes" | ||
"msmc_exec" : "ext/msmc2/build/release/msmc2" | ||
"stairwayplot_code" : "ext/stairwayplot/swarmops.jar" | ||
"gone_code" : "ext/GONE/Linux" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"seed": 12345 | ||
"replicates": 2 | ||
|
||
"species": "PhoSin" | ||
"demo_models": | ||
[ | ||
{"id":"Vaquita2Epoch_1R22", | ||
"num_samples_per_population": [20], | ||
} | ||
] | ||
|
||
"genetic_map": null | ||
"chrm_list": "2,9,20" | ||
"dfe_list": ["none", "Gamma_R22"] | ||
"annotation_list": ["none", "Phocoena_sinus.mPhoSin1.pri.110_exons"] | ||
"output_dir": "results" | ||
"mask_file": "workflows/masks/PhoSin_fake.mask.bed" | ||
|
||
# set any of the below to 'none' to skip annot masking | ||
"stairway_annot_mask" : "" | ||
"msmc_annot_mask" : "" | ||
"gone_annot_mask" : "" | ||
"smcpp_annot_mask" : "" | ||
|
||
# slim settings | ||
"slim_scaling_factor": 15 | ||
"slim_burn_in": 10 | ||
|
||
# n(t) specific configs | ||
"methods" : ["stairwayplot", "gone", "smcpp", "msmc"] | ||
|
||
"num_sampled_genomes_msmc" : [6] | ||
"num_msmc_iterations" : 20 | ||
|
||
"gone_phase" : 1 # 0 for pseudohaploid, 1 for phased, 2 for unknown phase | ||
"gone_max_snps" : 50000 # default=50000 | ||
"gone_threads" : 8 | ||
"gone_num_gens" : 2000 # default=2000 | ||
"gone_num_bins" : 400 # default=400 | ||
|
||
# exe paths | ||
"poly_dfe_exec": "ext/polyDFE/polyDFE-2.0-linux-64-bit" | ||
"dfe_alpha_exec": "ext/dfe-alpha-release-2.16/est_dfe" | ||
"dfe_alpha_data_path_1": "ext/dfe-alpha-release-2.16/data" | ||
"dfe_alpha_data_path_2": "three-epoch" | ||
"grapes_exec": "ext/grapes/multi_grapes" | ||
"msmc_exec" : "ext/msmc2/build/release/msmc2" | ||
"stairwayplot_code" : "ext/stairwayplot/swarmops.jar" | ||
"gone_code" : "ext/GONE/Linux" |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is another spot where I hit a snag that also relates to not having a genetic map. Since a lot of places expected a non-empty mask file to exist, I figured this would be simpler and be would unlikely impact the results. I admit it's a little hacky though. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
1 0 1 | ||
2 0 1 | ||
3 0 1 | ||
4 0 1 | ||
5 0 1 | ||
6 0 1 | ||
7 0 1 | ||
8 0 1 | ||
9 0 1 | ||
10 0 1 | ||
11 0 1 | ||
12 0 1 | ||
13 0 1 | ||
14 0 1 | ||
15 0 1 | ||
16 0 1 | ||
17 0 1 | ||
18 0 1 | ||
19 0 1 | ||
20 0 1 | ||
21 0 1 | ||
X 0 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrated Chris Smith's poster figs to here. Still some work needed, but will push figures from here to manuscript soon.