Created
          March 6, 2015 12:37 
        
      - 
      
 - 
        
Save nuada/e37f9ce91db918a19752 to your computer and use it in GitHub Desktop.  
    Calculate kinship coefficient for set of samples in VCF
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| bcftools norm -Ou -m -any $1 | # Split multi-allelic alleles | |
| bcftools norm -Ou -f /resources/hg19/ucsc.hg19.fasta | # Normalize | |
| bcftools annotate -Ob -x ID -I +'%CHROM:%POS:%REF:%ALT' | # Replace IDs with unique ID | |
| plink --bcf /dev/stdin --keep-allele-order --double-id --allow-extra-chr 0 --make-bed --out variants | |
| king -b variants.bed --kinship --prefix kinship | |
| king -b variants.bed --individual | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment