Skip to content

Commit a33a803

Browse files
committed
merge iterations into extra params
1 parent d14c47e commit a33a803

File tree

4 files changed

+23
-29
lines changed

4 files changed

+23
-29
lines changed

config.yaml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Configuration file for LepWrap
22

3-
###################
4-
#### Lep-Map 3 ####
5-
###################
3+
#########################################################
4+
# Lep-Map 3 #
5+
#########################################################
66

77
#---------------#
88
# ParentCall2 #
99
#---------------#
1010
# the filtered VCF file with your genotype likelihoods:
11-
vcf: "out.15.miss95recode.vcf"
11+
vcf: "out.15.missrecode90.vcf"
1212

1313
# Instructions to create pedigree file: https://sourceforge.net/p/lep-map3/wiki/software/LepMap3 Home/#parentcall2
1414
# the pedigree file associated with your data
@@ -35,16 +35,16 @@ extra_params_Filtering: ""
3535
# LOD score in the range of lod_min to lod_max
3636

3737
# The minimum LOD for SeperateChromosomes2
38-
lod_min: 20
38+
lod_min: 10
3939

4040
# The maximum LOD for SeperateChromosomes2
41-
lod_max: 40
41+
lod_max: 50
4242

4343
# Use only markers with informative father (1), mother(2), both parents(3) or neither parent(0)
44-
informative: "informativeMask=123"
44+
informative: "informativeMask=3"
4545

4646
# If there are any additional parameters you would like to use for SeparateChromosomes2 (e.g. distrotionLOD=1), add them here
47-
extra_params_SeparateChromosomes: "sizeLimit=5 distortionLOD=1"
47+
extra_params_SeparateChromosomes: "sizeLimit=5 distortionLod=1"
4848

4949

5050
#-------------------#
@@ -61,7 +61,7 @@ lod_limit: "lodLimit=2"
6161
lod_difference: "lodDifference=2"
6262

6363
# If there are any additional parameters you would like to use for JoinSingles2All (e.g. iterate=1), add them here
64-
extra_params_JoinSingles: "iterate=1 distortionLOD=1"
64+
extra_params_JoinSingles: "iterate=1 distortionLod=1"
6565

6666

6767
#-----------------#
@@ -72,11 +72,9 @@ extra_params_JoinSingles: "iterate=1 distortionLOD=1"
7272
# Set exp_lg to your expected number of chromosomes
7373
exp_lg: 24
7474

75-
# Set iterations to the number of iterations you want per chromosome (more is better). Recommend 30 or more
76-
iterations: 100
77-
7875
# If there are any additional parameters you would like to use for OrderMarkers2 (e.g. hyperPhaser=1), add them here
79-
extra_params_OrderMarkers: "hyperPhaser=1 useKosambi=1 phasingIterations=2"
76+
# I recommend setting numMergeIterations to ~100 (Lep-Map3 default is 6)
77+
extra_params_OrderMarkers: "hyperPhaser=1 useKosambi=1 phasingIterations=2 numMergeIterations=100"
8078

8179

8280
#-----------------#
@@ -99,25 +97,25 @@ trim_cutoff: 100
9997
#--------------------#
10098
# The second round of OrderMarkers will use the same basic parameters as the first round (but not the extra params)
10199
# If there are additional parameters you would like to use, add them here:
102-
extra_params_reOrderMarkers: "improveOrder=1 useKosambi=1"
103-
100+
extra_params_reOrderMarkers: "improveOrder=1 useKosambi=1 numMergeIterations=75"
104101

105102
#-----------------------#
106103
# Calculate Distances #
107104
#-----------------------#
108105
# If you used useKosambi=1 or useMorgan=1 for Ordering/reOrdering, add that same
109106
# parameter to distance_method:
110-
distance_method: ""
107+
distance_method: "useKosambi=1"
108+
111109

110+
#########################################################
111+
# Lep-Anchor #
112+
#########################################################
112113

113-
####################
114-
#### Lep-Anchor ####
115-
####################
116114
# change this to true if you also want to run Lep-Anchor
117115
run_lepanchor: true
118116

119117
# the path to the genome assembly you are trying to anchor
120-
# ideally it *is not* gzipped and ends in .fa, but there are built-in workarounds if it is.
118+
# ideally it is *not* gzipped and ends in .fa, but there are built-in workarounds if it is.
121119
assembly: "YFT.genome.latest.fasta"
122120

123121
# the number of linkage groups you have
@@ -182,4 +180,4 @@ extra_params_PlaceOrient: "keepEmptyIntervals=1 numRuns=10"
182180
LA_edge_length: 20
183181

184182
# Set trim_cuttoff to the centiMorgan distance cutoff (5 is reasonable)
185-
LA_trim_cutoff: 3
183+
LA_trim_cutoff: 5

rules/LepMap3/LepMap3.smk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data_tol=config["data_tol"]
1313
filtering_extra = config["extra_params_Filtering"]
1414
# separate chromosomes #
1515
lod_max = str(config["lod_max"])
16-
lod_range = list(range(config["lod_min"], config["lod_max"]+1))
16+
lod_range = list(range(config["lod_min"], lod_max+1))
1717
informative = config["informative"]
1818
sepchrom_extra = config["extra_params_SeparateChromosomes"]
1919
# join singles #
@@ -22,16 +22,14 @@ lod_lim = config["lod_limit"]
2222
lod_diff = config["lod_difference"]
2323
js2a_extra = config["extra_params_JoinSingles"]
2424
# ordering #
25-
lg_range = list(range(1, config["exp_lg"]+1))
2625
lg_count = config["exp_lg"]
27-
ITER = config["iterations"]
26+
lg_range = list(range(1, lg_count+1))
2827
order_extra = config["extra_params_OrderMarkers"]
2928
# trimming #
3029
edge_len = str(config["edge_length"])
3130
trim_thresh = str(config["trim_cutoff"])
3231
# ordering II #
3332
reorder_extra = config["extra_params_reOrderMarkers"]
34-
ITER2 = round(ITER/2)
3533
# distances #
3634
dist_method = config["distance_method"]
3735

rules/LepMap3/order.smk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ rule order_markers:
1111
message: "Ordering linkage group {params.chrom} with {params.iterations} iterations"
1212
params:
1313
chrom = "{lg_range}",
14-
iterations = ITER,
1514
extra = order_extra
1615
threads: 2
1716
shell:
1817
"""
19-
zcat {input.datacall} | java -cp software/LepMap3 OrderMarkers2 map={input.filt_map} {params.extra} data=- numThreads={threads} numMergeIterations={params.iterations} chromosome={params.chrom} &> {output.runlog}
18+
zcat {input.datacall} | java -cp software/LepMap3 OrderMarkers2 map={input.filt_map} {params.extra} data=- numThreads={threads} chromosome={params.chrom} &> {output.runlog}
2019
sed -n '/\*\*\* LG \=/,$p' {output.runlog} > {output.lg}
2120
grep "recombin" {output.runlog} > {log.recomb}
2221
awk '/#java/{{flag=1}} flag; /logL/{{flag=0}}' {output.runlog} > {log.run}

rules/LepMap3/reorder.smk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ rule reorder_markers:
1212
message: "Reordering linkage group {params.lg} with {params.iterations} iterations"
1313
params:
1414
lg = "{lg_range}",
15-
iterations = ITER2,
1615
extra = reorder_extra
1716
threads: 2
1817
shell:
1918
"""
20-
zcat {input.datacall} | java -cp software/LepMap3 OrderMarkers2 {params.extra} map={input.filt_map} data=- numThreads={threads} evaluateOrder={input.lg_order} numMergeIterations={params.iterations} &> {output.runlog}
19+
zcat {input.datacall} | java -cp software/LepMap3 OrderMarkers2 {params.extra} map={input.filt_map} data=- numThreads={threads} evaluateOrder={input.lg_order} &> {output.runlog}
2120
sed -n '/\*\*\* LG \=/,$p' {output.runlog} > {output.lg}
2221
grep "recombin" {output.runlog} > {log.recomb}
2322
awk '/#java/{{flag=1}} flag; /logL/{{flag=0}}' {output.runlog} > {log.run}

0 commit comments

Comments
 (0)