Difference between revisions of "2017 Sep Taeyoung Lab note"

From Crop Genomics Lab.
Jump to: navigation, search
Line 11: Line 11:
 
==Pi ==
 
==Pi ==
 
vcftools --vcf variant.SG.vcf.SNP.Q30.d5.vcf --window-pi 10000 --window-pi-step 10000
 
vcftools --vcf variant.SG.vcf.SNP.Q30.d5.vcf --window-pi 10000 --window-pi-step 10000
 +
 +
==Structure Plotting==
 +
> data <- read.table('SG_hetero_run_K4.result.parsed.cluster')
 +
> Sp <- factor(data$V1,level=unique(data$V1))
 +
> ggplot(data,aes(Sp,data$V4,fill=data$V3,width=1))+geom_col(colour='grey0',width=0.01)+scale_fill_manual(breaks=c("c1","c2","c3","c4"),values=c("tomato","limegreen","dodgerblue1","mediumorchid1")) + theme(axis.text.x=element_text(angle=90,vjust=0.001,hjust=1),text=element_text(size=3))
 +
> ggsave(filename="SG_hetero_structure_k4.svg",width=40,height=8,device="svg",limitsize=F)

Revision as of 00:23, 19 September 2017

Contents

Fst

vcftools --vcf variant.SG.vcf.SNP.Q30.d5.vcf --weir-fst-pop SG_Landrace.bamlist --weir-fst-pop SG_Cultivar.bamlist --weir-fst-pop SG_Vege.bamlist --fst-window-size 10000 --fst-window-step 10000

Fst ploting

ggplot(data,aes(x=data$V2,y=data$V3,colour=data$V1))+geom_point()+scale_colour_manual(breaks=c('Blue','Navy'),values=c("royalblue","midnightblue"))

Tajima's D

vcftools --vcf variant.SG.vcf.SNP.Q30.d5.vcf --TajimaD 10000

Pi

vcftools --vcf variant.SG.vcf.SNP.Q30.d5.vcf --window-pi 10000 --window-pi-step 10000

Structure Plotting

> data <- read.table('SG_hetero_run_K4.result.parsed.cluster') > Sp <- factor(data$V1,level=unique(data$V1)) > ggplot(data,aes(Sp,data$V4,fill=data$V3,width=1))+geom_col(colour='grey0',width=0.01)+scale_fill_manual(breaks=c("c1","c2","c3","c4"),values=c("tomato","limegreen","dodgerblue1","mediumorchid1")) + theme(axis.text.x=element_text(angle=90,vjust=0.001,hjust=1),text=element_text(size=3)) > ggsave(filename="SG_hetero_structure_k4.svg",width=40,height=8,device="svg",limitsize=F)