Skip to content

aguilar-gomez/PBSfromVCF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PBSfromVCF

First calculate FST by site using vcftools:

A pop0pop1

vcftools --vcf file.vcf
--weir-fst-pop pop0.list --weir-fst-pop pop1.list
--out ./pop0pop1 > fst.outA &

B pop0pop2

vcftools --vcf file.vcf
--weir-fst-pop pop0.list --weir-fst-pop pop2.list
--out ./pop0pop2 > fst.outB &

C pop1pop2

vcftools --vcf file.vcf
--weir-fst-pop pop1.list --weir-fst-pop pop2.list
--out ./pop1pop2 > fst.outC &

Join all Fst files:

paste -d "\t" pop0pop1.weir.fst pop0pop2.weir.fst pop1pop2.weir.fst | cut -f1-3,6,9 > pop012.fst

Exclude “nan” positions

grep -v "nan" pop012.fst> pop012pbs

Arguments for the Rscript:

  • titleOfPlot - name displayed in the Manhattan plot
  • pop0 - name of population 0
  • pop1 - name of population 1
  • pop2 - name of population 2
  • outquantile - quantile of outliers to be written into a file (possibly to annotate)
  • color - color in the plot to alternate with gray
  • pop012pbs - file with fst values generated by following steps above
  • name - name for output table with all pbs values per site

How to run it:

Rscript PBSfromvcftools.R titleOfPlot pop0 pop1 pop2 outquantile color pop012pbs name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages