Post date: Jun 13, 2016 3:14:20 AM
perl ../scripts/makeMultiFamLinkage.pl offspringGenotypesfamA.txt offspringGenotypesfamB.txt offspringGenotypesfamC.txt
This generates lm_tcrist.txt, which includes one families,
116 individuals (191 offspring, 6 parents) and 17,478 SNPs.
java -cp ~/source/lepmap2/bin/ Filtering data=lm_tcrist.txt epsilon=0.01 dataTolerance=0.005 missingLimit=10 keepAlleles=1 > data_tcristlm.txt
***
Mendel error statistics:
0->0 : 0
0->1 : 0
0->2 : 0
Error rate = 0.0
1->0 : 0
1->1 : 0
1->2 : 0
Error rate = 0.0
2->0 : 0
2->1 : 0
2->2 : 0
Error rate = 0.0
0,2->0,2 : 1598324
0,2->1 : 0
1,2->1,2 : 0
1,2->0 : 0
Error rate = 0.0
***
Filtering markers based on segregation distortion
Removed 11546 markers from family famA
( from which 4884 due to missing parent genotypes, run ParentCall to fix the parents )
Removed 13523 markers from family famB
( from which 12426 due to missing parent genotypes, run ParentCall to fix the parents )
Removed 16870 markers from family famC
( from which 16598 due to missing parent genotypes, run ParentCall to fix the parents )
Maternally informative markers = 4312 (of 17478)
Paternally informative markers = 5989
Maternally or paternally informative markers = 9893
***
java -cp ~/source/lepmap2/bin/ SeparateChromosomes data=data_tcristlm.txt lodLimit=4 sizeLimit=50 > lgs_tcrist.txt
LOD 4: Number of LGs = 12, markers in LGs = 6873, singles = 10605
LOD 5: Number of LGs = 19, markers in LGs = 5927, singles = 11551
LOD 6: Number of LGs = 21, markers in LGs = 5800, singles = 11678
LOD 7: Number of LGs = 21, markers in LGs = 5716, singles = 11762
LOD 8: Number of LGs = 22, markers in LGs = 5532, singles = 11946
LOD 9: Number of LGs = 23, markers in LGs = 5187, singles = 12291
LOD 10: Number of LGs = 23, markers in LGs = 5004, singles = 12474
LOD 15: Number of LGs = 22, markers in LGs = 3344, singles = 14134
## using LOD 4
java -cp ~/source/lepmap2/bin/ JoinSingles lgs_tcrist.txt data=data_tcristlm.txt lodLimit=3 lodDifference=2 > lgs_tcrist_js.txt
joined 616 single markers, non-conflicting LOD score > 3.490038550540774
Number of LGs = 12, markers in LGs = 7572, singles = 9906
5. Assign (or unassign) entire scaffolds (including male informative markers) to LGs. I modified the script on June 28th, 2016. Now $alt is the proportion of the second most common LG relative to the most common LG. So, if the second best LG is support by > 50% as many SNPs as the best LG, the scaffold is not assigned a LG.
Combine map and scaffold data
map<-read.table("femLgsJs_lyclm.txt",header=FALSE)
snps<-read.table("combinedSnpList.txt",header=FALSE)
o<-cbind(map,snps)
colnames(o)<-c("flg","scaf","pos")
write.table(o,"tcrLgs.txt",row.names=FALSE,col.names=TRUE,quote=FALSE)
Run perl script
## key params ##
## decide on LG for scaf
## rules:
## $nsnp SNPs supporting LG with $prct of SNPs in agreement
## $min SNPs total
## $alt is maximum % for an alternative LG
$prct = 0.1;
$nsnp = 2;
$min = $nsnp;
$alt = 0.5;
#############
perl assignScafFilter.pl tcrLgs.txt
assigned LGs for 237 scaffolds (89% of SNPs), failed to assign LGs for 298 scaffolds
tail -n +2 mod_tcrLgs.txt | cut -f 1 -d " " > mod_tcrLgsSnp.txt
6. Run order chromosome, use all three families and run one chromosome at a time for speed.
perl wrap_qsub_slurm_orderScafs.pl
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=1 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG1tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=2 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG2tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=3 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG3tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=4 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG4tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=5 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG5tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=6 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG6tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=7 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG7tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=8 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG8tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=9 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG9tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=10 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG10tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=11 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG11tcr.txt
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=12 numThreads=4 initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LG12tcr.txt
Repeated this with only family A and the brown (female) or green (male) parent. Here are examples:
perl wrap_qsub_slurm_orderScafsBrown.pl
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=12 numThreads=4 informativeMask=2 families=famA initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LGbrwn12tcr.txt
perl wrap_qsub_slurm_orderScafsGreen.pl
cd /uufs/chpc.utah.edu/common/home/u6000989/data/timema/timema_mappingfams/mapdata/lm2map
java -cp ~/source/lepmap2/bin/ OrderMarkers map=mod_tcrLgsSnp.txt data=data_tcristlm.txt minError=0.01 chromosome=12 numThreads=4 informativeMask=1 families=famA initRecombination=0.05 0.05 learnRecombinationParameters=1 1 > order_LGgrn12tcr.txt