{"id":22895772,"url":"https://github.com/pseudogene/radmap","last_synced_at":"2025-08-12T02:32:32.886Z","repository":{"id":79848626,"uuid":"93157543","full_name":"pseudogene/radmap","owner":"pseudogene","description":"Analyse RAD-tags and generate the Genetic Map with GWAS","archived":true,"fork":false,"pushed_at":"2021-02-17T14:22:08.000Z","size":3145,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T08:15:05.632Z","etag":null,"topics":["bioinformatics","docker","genetic","gwas","radseq"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseudogene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-06-02T11:03:31.000Z","updated_at":"2024-10-31T07:39:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"13e8f7c2-54e5-42b9-8545-225a5a980eaa","html_url":"https://github.com/pseudogene/radmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pseudogene/radmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudogene%2Fradmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudogene%2Fradmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudogene%2Fradmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudogene%2Fradmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseudogene","download_url":"https://codeload.github.com/pseudogene/radmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudogene%2Fradmap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269988919,"owners_count":24508555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","docker","genetic","gwas","radseq"],"created_at":"2024-12-13T23:31:54.659Z","updated_at":"2025-08-12T02:32:30.946Z","avatar_url":"https://github.com/pseudogene.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Warning: This is a pre-release version, we are actively developing this repository. Issues, bugs and features will happen, rise and change.\n\n# RAD-tag to Genetic Map\n\n[![Build Status](https://travis-ci.org/pseudogene/radmap.svg?branch=master)](https://travis-ci.org/pseudogene/radmap)\n\nWe foster the openness, integrity, and reproducibility of scientific research.\n\nScripts and tools used to develop a pipeline to analyse RAD-tags and generate the Genetic Map with GWAS.\n\n\n## How to use this repository?\n\nThis repository host both the scripts and tools developed by this study. Feel free to adapt the scripts and tools, but remember to cite their authors!\n\nTo look at our scripts and raw results, **browse** through this repository. If you want to reproduce our results you will need to **clone** this repository, build the docker, and the run all the scripts. If you want to use our data for our own research, **fork** this repository and **cite** the authors.\n\n\n## Prepare a docker\n\nAll required files and tools run in a self-contained [docker](https://www.docker.com/) image.\n\n#### Clone the repository\n\n```\ngit clone --recursive https://github.com/pseudogene/radmap.git\ncd radmap\n```\n\n#### Create a docker\n\n```\ndocker build --rm=true -t radmap .\n```\n\n#### Start the docker\n\nTo import and export the results of your analysis, you need to link a folder to the docker. In this example your data will be store in `results` (current filesystem) which will be seem as been `/map` from within the docker by using `-v \u003cUSERFOLDER\u003e:/map`.\n\n```\nmkdir results\ndocker run -i -t --rm -v $(pwd)/results:/map radmap /bin/bash\n```\n\n## Data importation\nplink _classic_ file [PED](http://zzz.bwh.harvard.edu/plink/data.shtml#ped) and [MAP](http://zzz.bwh.harvard.edu/plink/data.shtml#map) are required as well as a **pedigree file**.\n\nThe **pedigree file** consists of on columns 1-4+. The columns are separated by tabs. The columns 1-4 are individual name, father, mother and sex; the next columns are for extra phenotypes: phenotype\\_1 to phenotype\\_n. The phenotypes are not required, but will be helpful for the GWAS analysis.\n\n```\nsample     father  mother  sex  phenotype_1\nF1_C2_070  P0_sir  P0_dam  M    30\nF1_C2_120  P0_sir  P0_dam  F    1\nP0_dam     0       0       F    -\nP0_sir     0       0       M    -\n```\n\n#### From STACKS\n\nIf you ran [stacks](http://catchenlab.life.illinois.edu/stacks/), you can generate the plink files using [populations](http://catchenlab.life.illinois.edu/stacks/comp/populations.php) command:\n\n```\n populations -P dir -b batch_id [-M popmap] (filters) --write_single_snp -k --plink\nor\n populations -V vcf -O dir [-M popmap] (filters) --write_single_snp -k --plink\n```\n\n```\ne.g.:\n populations -P ./stakcs/ -M map.pop -b 1 -p 2 -r 0.75 --min_maf 0.01 --write_single_snp -k --plink\n```\n\nThis should generate the ped and map file in `./stakcs/batch_1.plink.ped` and `./stakcs/batch_1.plink.map`.\n\n#### From dDocent\n\nIf you used [dDocent](https://ddocent.wordpress.com/), you can convert your `Final.recode.vcf` with vcftools\n\n```\nvcftools --vcf Final.recode.vcf --plink --maf 0.01 --out plink\n```\n\n## LepMap2\nSee the official documentation at [https://sourceforge.net/p/lepmap2/wiki/Home/](https://sourceforge.net/p/lepmap2/wiki/Home/)\n\n#### Create the lepmap input file (recommended)\n\n```\nplinktomap.pl --ped plink.ped --meta meta_parents.txt --lepmap \u003einput.linkage\n```\n\n#### Run LepMap2\n\n```\n#Filter dataset\njava -cp /usr/local/bin/lepmap2 Filtering data=input.linkage dataTolerance=0.001 MAFLimit=0.01 \u003einput_f.linkage\n\n#Test the best LOD limit (form 0.5 to 15)\nfor I in $(seq 0.5 0.5 15)\ndo\n  java -cp /usr/local/bin/lepmap2 SeparateChromosomes data=input_f.linkage sizeLimit=10 lodLimit=${I} \u003e/dev/null 2\u003e\u003elod.log\ndone\n\ngrep \"Number of LGs\" lod.log \u003elod.txt\ncat lod.txt\n\n#For the best LOD limit (e.g. 5.5)\njava -cp /usr/local/bin/lepmap2 SeparateChromosomes data=input_f.linkage sizeLimit=10 lodLimit=5.5 \u003einput.map\njava -cp /usr/local/bin/lepmap2 JoinSingles input.map data=input_f.linkage lodLimit=0.5 \u003einput.jsmap\n\n#Calculate a genetic map (see LepMap2 documentation for more details)\njava -cp /usr/local/bin/lepmap2 OrderMarkers useKosambi=1 maxDistance=50 map=input.jsmap data=input_f.linkage \u003elepmap.ordered\n```\n\n## LepMap3 (recommended)\nSee the official documentation at [https://sourceforge.net/p/lep-map3/wiki/Home/](https://sourceforge.net/p/lep-map3/wiki/Home/)\n\n#### Create the lepmap input file (recommended)\n\n```\nplinktomap.pl --ped plink.ped --meta meta_parents.txt --lepmap3 \u003einput.linkage\nlinkage2post.pl -in input.linkage | java -cp /usr/local/bin/lepmap2 Transpose \u003e input.post\n```\n\n#### Run LepMap3\n\n```\n#Filter dataset\njava -cp /usr/local/bin/lepmap3 Filtering2 data=input.post dataTolerance=0.001 MAFLimit=0.01 \u003einput_f.call\n\n#Test the best LOD limit (form 5 to 30)\nfor I in $(seq 5 1 30)\ndo\n  java -cp /usr/local/bin/lepmap3 SeparateChromosomes2 data=input_f.call lodLimit=\"${I}\" sizeLimit=10 \u003e/dev/null 2\u003e\u003elod.log\ndone\n\ngrep \"Number of LGs\" lod.log \u003elod.txt\ncat lod.txt\n\n#For the best LOD limit (e.g. 8)\n  java -cp /usr/local/bin/lepmap3 SeparateChromosomes2 data=input_f.call lodLimit=8 sizeLimit=10 \u003einput.map\n  java -cp /usr/local/bin/lepmap3 JoinSingles2All map=input.map data=input_f.call lodLimit=0.5 iterate=1 \u003einput.jsmap\n\n#Calculate a genetic map (see LepMap3 documentation for more details)\n  java -cp /usr/local/bin/lepmap3 OrderMarkers2 useKosambi=1 map=input.jsmap data=input_f.call \u003elepmap.ordered\n```\n\n\n## R/SNPassoc\nSee the official documentation at [https://CRAN.R-project.org/package=SNPassoc](https://CRAN.R-project.org/package=SNPassoc)\n\n### Data preparation\n\n#### Create the SNPAssoc input file (ALL markers)\n\n```\nplinktomap.pl --plink plink.map --ped plink.ped --meta meta_parents.txt --snpassoc \u003einput.all.snp\n```\n\n#### Create the SNPAssoc input file (mappable markers: filtered by LepMap2)\n\n```\nplinktomap.pl --plink plink.map --ped plink.ped --meta meta_parents.txt --map input.jsmap --snpassoc \u003einput.mappable.snp\n```\n\n#### Create the SNPAssoc input file (based on LepMap2/3 Genetic Map, `female` map)  (recommended)\n\n```\nplinktomap.pl --plink plink.map --ped plink.ped --meta meta_parents.txt --map input.jsmap --gmap lepmap.ordered --female --snpassoc \u003einput.snp 2\u003einput.gmap\n```\n\n## Run R/SNPassoc\n\n#### All or mappable markers\n\n```\nlibrary(SNPassoc)\nSNP \u003c- read.delim(\"input.all.snp\");\nSNPAssoc\u003c-setupSNP(data=SNP,colSNPs=4:length(SNP), sep=\"/\");\nSNPAssocSex\u003c-WGassociation(sex~1, data=SNPAssoc, model=\"codominant\")\nBonSNPAssocSex\u003c-Bonferroni.sig(SNPAssocSex, model = \"codominant\", alpha = 0.05, include.all.SNPs=FALSE);\nsummary(SNPAssocSex)\nplot(SNPAssocSex, whole=FALSE, print.label.SNPs = FALSE)\n```\n\n#### based on LepMap2/3 Genetic Map  (recommended)\n\n```\nlibrary(SNPassoc)\nSNP \u003c- read.delim(\"input.snp\",header=TRUE);\norder \u003c- read.delim(\"input.gmap\");\norder$Marker \u003c- paste('X',order$Marker,sep=\"\");  #If Stacks output\n#order$Marker\u003c-gsub(\":\", \".\", order$Marker);     #If dDocent output\nSNPAssoc\u003c-setupSNP(data=SNP,colSNPs=4:length(SNP), sort=TRUE, info=order,sep=\"/\");\nSNPAssocSex\u003c-WGassociation(sex, data=SNPAssoc, model=\"codominant\");\nBonSNPAssocSex\u003c-Bonferroni.sig(SNPAssocSex, model = \"codominant\", alpha = 0.05, include.all.SNPs=FALSE);\nsummary(SNPAssocSex)\npng(\"AssocSex.png\");\nplot(SNPAssocSex, whole=FALSE, print.label.SNPs = FALSE, sort.chromosome=TRUE);\ndev.off();\nwrite.csv(SNPAssocSex,file=\"AssocSex.csv\");\n```\n\n## Generate the summary Genetic map\n\n#### Create the final genetic map\n\n```\nplinktomap.pl --genetic input.gmap --extra AssocSex.csv \u003egenetic_map.tsv\n```\n\n#### Create the final genetic map with the marker sequences and locations (Stacks only)   (recommended **for publication**)\n\n```\nplinktomap.pl --genetic input.gmap --extra AssocSex.csv --markers batch_\u003cn\u003e.catalog.tags.tsv --loc \u003egenetic_map.tsv\n```\n\n## Issues\n\nIf you have any problems with or questions about the scripts, please contact us through a [GitHub issue](https://github.com/pseudogene/radmap/issues).\nAny issue related to the scientific results themselves must be done directly with the authors.\n\n\n## Contributing\n\nYou are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.\n\n\n## License and distribution\n\nThe content of this project itself including the raw data and work are licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/), and the source code presented is licensed under the [GPLv3 license](http://www.gnu.org/licenses/gpl-3.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudogene%2Fradmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseudogene%2Fradmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudogene%2Fradmap/lists"}