Skip to content

Extra scripts

Pavel V. Dimens edited this page Jan 30, 2022 · 20 revisions

The scripts listed below can be found in the scripts/ directory and you may find them to be useful. None of these scripts are used by LepWrap.

Miscellaneous

extract_markers.sh

This simple script extracts contig and position information from the data_f.call.gz file generated from running the first steps of the pipeline (ParentCall2 and Filtering2) into the file snps.txt. The only argument is specifying the data file.

LGcutoff.sh

This is a "hard filter" where you set a maximum number of allowed linkage groups and any markers assigned to a linkage group greater than that will be converted to a single (i.e. linkage group 0). Useful right before the JoinSingles2All module.

refinemap.sh

This is a loop that takes a given map from Lep-Map3 SeparateChromosomes2 and iterates over a range of LOD scores to try to split out a specific linkage group that may be overclustered. It's fairly well annotated, so adjust it to your needs. Calls MapSummary.r at the end to generate a summary table.

usage

A convenient way to view the usage/help text of the LepMap/LepAnchor modules.

FilterLinkageMap.r

A very experimental script that filters out errant markers from a linkage group by drawing splines over your linkage map and performing 3 sliding windows of 2 different resolutions to apply penalties to markers that are outliers (2 x mean of local residuals) in that window. It's kinda complicated. If you plan on using this, you need to consider if filtering markers in this way is just cherry-picking data or is analytically/biologically justifiable. I have not employed this in my own work.

iterate_js2all.sh

Similar to refine_map.sh, this will loop over a range of LOD limit values (and a fixed LOD difference threshold) to try assigning your singles (markers assigned to LG 0) into the available linkage groups with the JoinSingles2All Lep-Map3 module. I recommend using purge_lg.sh to hard-filter your mapfile before doing this.

Conversion Scripts

popmap2pedigree

If you have a simple single-family cross, you can use popmap2pedigree to convert your Stacks or dDocent generated popmap file into a LepMap3-compliant pedigree file. Make sure your popmap is a tab-separated two-column text file with the first column of sample names and the second column of parent or progeny designations:

sample_1<tab>parent
sample_2     parent
f1_001     progeny
f1_002     progeny
f1_003     progeny
etc...

So long as the parents are designated parent, it shouldn't matter what progeny are designated as. Go wild 😃

(... but like, not too wild)

lepmap2anchor

This is a simple bash script that concatenates the distance intervals files in intervals into a single file necessary to feed into the Lep-Anchor wrapper lepanchor_wrapper.sh (part of Lep-Anchor, not included). It should be run in the intervals folder and the only argument is the markers file that can be obtained from extract_markers.sh.

lepmap2allmaps

This python3 script converts Lep-Map3 distances output into ALLMAPS format. Run it without arguments to see the usage text. Note: LepWrap does not run ALLMAPS.

Getting started

LepMap3 Workflow

LepAnchor Workflow

Other

Clone this wiki locally