Difference between revisions of "Haploxt"
(6 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
= Input Files = | = Input Files = | ||
− | == Required | + | == Required Input == |
=== Haplotype File === | === Haplotype File === | ||
− | + | Fed to the option --haps or -h, the input haplotype file is in the form of one haplotype per line (no delimiter between alleles). The file could contain fields other than the actual haplotypes but must proceed the actual haplotype field. Allele coding is flexible: accepted coding includes 1234, ACGT, 12, AB etc. <br><br> | |
Sample haplotype file 1:<br> | Sample haplotype file 1:<br> | ||
Line 21: | Line 21: | ||
342222444221344312343433333122313344113321324223112323334412<br> | 342222444221344312343433333122313344113321324223112323334412<br> | ||
− | = | + | === SNP File === |
− | + | Fed to the option --snps or -s, the input SNP file is a list of SNP name in the same order as in the haplotype file. One SNP per line. <br> <br> | |
− | + | Sample SNP file: <br> | |
+ | SNP1<br> | ||
+ | SNP2<br> | ||
+ | SNP3<br> | ||
+ | ...<br> <br> | ||
− | == -- | + | == Optional Input == |
+ | === Relevant SNP File === | ||
+ | Fed to the option --relevant or -r, the relevant SNP file is a list of SNPs among which LD values are desired. | ||
− | + | = Options = | |
+ | == --allelefrequency == | ||
+ | Option to calculate allele frequency and output to prefix.freq. <br> | ||
− | == -- | + | == --allelecounts == |
+ | Option to calculate allele counts and output to prefix.ac. <br> | ||
− | + | == --ld == | |
+ | Option to calculate LD. Note that this option has to be turned on for LD to be calculated. <br> | ||
− | == -- | + | == --windowSize or -w == |
+ | Option to specify the # of flanking SNPs with which LD values are calculated for each SNP. Default is 1,000, meaning that LD with 1,000 SNPs on each side (2,000 total) will be calculated for each SNP. <br> | ||
− | is | + | == --r2Threshold or -t == |
+ | Minimum r<sup>2</sup> value for a pair of SNPs to be in output. Default is 0.00. <br> | ||
− | + | == --DprimeThreshold or -d == | |
− | + | Minimum D' value for a pair of SNPs to be in output. Default is 0.00. <br> | |
− | |||
− | |||
− | |||
− | |||
− | <br> | + | == --pairWithSNP == |
+ | Option to calcuate LD only with a particular SNP. <br> | ||
− | == -- | + | == --pairWithList == |
+ | A list of SNPs with which LD values will be calculated. <br> | ||
− | + | == --coupling == | |
+ | Option to output for each pair the alleles that are positively correlated. <br> | ||
− | + | == --prefix or -o == | |
− | + | Option to specify output prefix. <br> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <br> | + | = Output = |
+ | == .freq == | ||
+ | Generated when option --allelefrequency is turned on. <br> <br> | ||
− | <br> | + | sample.freq <br> |
+ | SNP AL1 AL2 Freq1 MAF<br> | ||
+ | chr12:16099 1 3 0.4000 0.4000<br> | ||
+ | chr12:16163 4 2 0.9000 0.1000<br> | ||
+ | rs7358779 2 3 0.1000 0.1000<br> | ||
+ | chr12:17063 1 3 0.8000 0.2000<br> | ||
+ | ...<br> | ||
+ | <br> | ||
− | == -- | + | == .ac == |
+ | Generated when option --allelecounts is turned on. <br> <br> | ||
− | + | sample.ac<br> | |
+ | SNP AL1 AL2 AC1 MAC<br> | ||
+ | chr12:16099 1 3 4 4<br> | ||
+ | chr12:16163 4 2 9 1<br> | ||
+ | rs7358779 2 3 1 1<br> | ||
+ | chr12:17063 1 3 8 2<br> | ||
+ | <br> | ||
− | + | == .xt == | |
− | + | Generated when option --ld is turned on. <br> <br> | |
− | |||
− | |||
− | |||
− | |||
− | <br> | + | sample.xt<br> |
+ | M1 M2 DPRIME DELTASQ COUPLING<br> | ||
+ | chr12:16252 chr12:16585 1.0000 0.6667 2,1<br> | ||
+ | chr12:16252 chr12:16665 1.0000 1.0000 2,3<br> | ||
+ | chr12:16252 chr12:16693 1.0000 1.0000 2,4<br> | ||
+ | ...<br> | ||
+ | <br> | ||
− | == | + | = download = |
+ | You can download the source codes and example files [https://www.sph.umich.edu/csg/yli/haploxt_V108.tgz haploxt]. | ||
− | + | To install, simply type the following command: | |
− | + | ./build.csh | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | = sample command line = | |
− | + | ./haploxt_names -s sample.snps -h sample.hap --allelefreq --ld -w 500 -t 0.5 --coupling -o sample.out | |
− | = | + | = Additional Questions = |
− | + | Please email [mailto:yunli@med.unc.edu Yun Li]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 18:22, 21 October 2010
haploxt is a C/C++ software developed by Yun Li and Goncalo Abecasis. It calculates LD (D' and r2) from phased haplotypes.
Input Files
Required Input
Haplotype File
Fed to the option --haps or -h, the input haplotype file is in the form of one haplotype per line (no delimiter between alleles). The file could contain fields other than the actual haplotypes but must proceed the actual haplotype field. Allele coding is flexible: accepted coding includes 1234, ACGT, 12, AB etc.
Sample haplotype file 1:
Indiv1 HAPLO1 142344111132344413444421333122313342113321324233112323134222
Indiv1 HAPLO2 144222444221443323334431431242131234311333144223411321334422
Indiv2 HAPLO1 144224441221443323334331431243131232311321123323432321334412
Indiv2 HAPLO2 342222444221344312343433333122313344113321324223112323334412
Sample haplotype file 2:
142344111132344413444421333122313342113321324233112323134222
144222444221443323334431431242131234311333144223411321334422
144224441221443323334331431243131232311321123323432321334412
342222444221344312343433333122313344113321324223112323334412
SNP File
Fed to the option --snps or -s, the input SNP file is a list of SNP name in the same order as in the haplotype file. One SNP per line.
Sample SNP file:
SNP1
SNP2
SNP3
...
Optional Input
Relevant SNP File
Fed to the option --relevant or -r, the relevant SNP file is a list of SNPs among which LD values are desired.
Options
--allelefrequency
Option to calculate allele frequency and output to prefix.freq.
--allelecounts
Option to calculate allele counts and output to prefix.ac.
--ld
Option to calculate LD. Note that this option has to be turned on for LD to be calculated.
--windowSize or -w
Option to specify the # of flanking SNPs with which LD values are calculated for each SNP. Default is 1,000, meaning that LD with 1,000 SNPs on each side (2,000 total) will be calculated for each SNP.
--r2Threshold or -t
Minimum r2 value for a pair of SNPs to be in output. Default is 0.00.
--DprimeThreshold or -d
Minimum D' value for a pair of SNPs to be in output. Default is 0.00.
--pairWithSNP
Option to calcuate LD only with a particular SNP.
--pairWithList
A list of SNPs with which LD values will be calculated.
--coupling
Option to output for each pair the alleles that are positively correlated.
--prefix or -o
Option to specify output prefix.
Output
.freq
Generated when option --allelefrequency is turned on.
sample.freq
SNP AL1 AL2 Freq1 MAF
chr12:16099 1 3 0.4000 0.4000
chr12:16163 4 2 0.9000 0.1000
rs7358779 2 3 0.1000 0.1000
chr12:17063 1 3 0.8000 0.2000
...
.ac
Generated when option --allelecounts is turned on.
sample.ac
SNP AL1 AL2 AC1 MAC
chr12:16099 1 3 4 4
chr12:16163 4 2 9 1
rs7358779 2 3 1 1
chr12:17063 1 3 8 2
.xt
Generated when option --ld is turned on.
sample.xt
M1 M2 DPRIME DELTASQ COUPLING
chr12:16252 chr12:16585 1.0000 0.6667 2,1
chr12:16252 chr12:16665 1.0000 1.0000 2,3
chr12:16252 chr12:16693 1.0000 1.0000 2,4
...
download
You can download the source codes and example files haploxt.
To install, simply type the following command:
./build.csh
sample command line
./haploxt_names -s sample.snps -h sample.hap --allelefreq --ld -w 500 -t 0.5 --coupling -o sample.out
Additional Questions
Please email Yun Li.