Giter VIP home page Giter VIP logo

ld-decay-calculating's Introduction

LD-decay-calculating

Directions

The first Method for Haploview outputs

  • Using the Haploview tool change vcf format file into the ped and info file .

example:

vcftools --gzvcf test.vcf.gz  --plink --out HH

plink --file test --recode HV --out test

java -jar ~/biosoftware/Haploview.jar -n -pedfile example.ped -info example.info \
-maxdistance 1000 -minMAF 0.05 -hwcutoff 0 -dprime -memory 4096 -out test
  • Then use the R script called from the command line to caculate the average LD values in each bin for the LD zone.
   Rscript LD_decay_calculating_for_Haploview.R -i input.file -l 100000 -b 10000 -o output.file

The second Method for vcftools outputs

  • Using the vcftools to caculate the LD values .

example:

vcftools --vcf test.vcf --geno-r2 --ld-window-bp 100000 --out ld_window_100000 --min-r2 0.000001

awk '{if($1=="CHR"){print $0"\tDISTENCE"}else{print $0"\t"$3-$2}}' ld_window_100000.geno.ld > input.file
  • Then use the R script called from the command line to caculate the average LD values in each bin for the LD zone.
   Rscript LD_decay_calculating_for_vcftools.R -i input.file -l 100000 -b 10000 -o output.file
  • The help manual is as follows:
Usage: LD_decay_calculating.R [options] args
Options:
	-i CHARACTER, --input=CHARACTER
		Input file name. The file output from Haploview. [required]

	-l INTEGER, --LD_length=INTEGER
		The farthest distance betweent two SNPs, Unit:bp. [required]

	-b INTEGER, --bin_size=INTEGER
		The bin size to caculating the avagerage LD, Unit:bp. [required]

	-o CHARACTER, --output=CHARACTER
		output file name [default= LD_decay_out.txt]

	-h, --help
		Show this help message and exit

ld-decay-calculating's People

Contributors

wenkaiyan-kevin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.