1 SNP名称替换
替换固定列的内容
awk -F "\t" '{ OFS="\t" }{1"chr"
2=
4"'snp'"}1' goat232-1.map > goat232-2.map
awk -F "\t" '{ OFS="\t" }{1"chr"
2=
4"'snp'"}1' 51.map > 51-1.map
2 map/ped 文件排序
plink --file 51 --keep 1.txt --chr-set 30 --recode --out 52
plink --file 72breeds --keep 1.txt --chr-set 30 --recode --out 51
2 #sambada软件的使用
conda activate seletion
cd /
- 工作文件夹:/mnt/d/peng/climate/sambada-0.8.3-ubuntu
tar -zxvf sambada-0.8.3-ubuntu.tar.gz
cd /binaries
./sambada param-cattle.txt cattle-env.csv cattle-mark.txt
./sambada param.txt env-data.txt mol-data.txt
./sambada param-a.txt env-data.txt mol-data.txt
2.自己数据分析
1提取或者排除群体、格式转化:
plink --file 90breeds --keep 20IN.txt --chr-set 29 --recode --out Bin20
./recode-plink 1020 43299 51 51-mark.txt
./recode-plink-lfmm 1020 43299 51 outputFile
计算选择信号(注意,文件需要转化成unix格式,cnconding 为ANSI)
./sambada 51-param.txt 53-env.txt 51-mark.txt
sort排序
sort -rn num.txt
sort -t ':' -k 3 -nr all.CLR.10k.txt > all.CLR.10k-sort.txt
sort -k 3 -gr all.CLR.10k.txt > all.CLR.10k-sort.txt
head -n 10 all.CLR.10k-sort.txt
sort -k 3 -gr all-xpclr.txt > all-xpclr.txt-sort.txt
awk '{print 2,
4,$5}' goat-mark-1-Out-1.txt > sam.txt
sort -k 5 -gr sam.txt > sam-sort.txt
head -n 1000 sam-sort.txt > sam-1000.txt
head -n 50000 sam-sort.txt > sam-50000.txt