a) Document BEAGLE codec, b) Bug fix: inbreeding coefficient shouldn't be computed for non-diploid organisms in current implementaiton
This commit is contained in:
parent
c011837147
commit
eb55061fd0
|
|
@ -68,6 +68,9 @@ public class InbreedingCoeff extends InfoFieldAnnotation implements StandardAnno
|
|||
if ( g.isNoCall() || !g.hasLikelihoods() )
|
||||
continue;
|
||||
|
||||
if (g.getPloidy() != 2) // only work for diploid samples
|
||||
continue;
|
||||
|
||||
N++;
|
||||
final double[] normalizedLikelihoods = MathUtils.normalizeFromLog10( g.getLikelihoods().getAsVector() );
|
||||
refCount += normalizedLikelihoods[idxAA];
|
||||
|
|
|
|||
|
|
@ -38,25 +38,41 @@ import java.util.*;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* TODO GUILLERMO DEL ANGEL
|
||||
* Codec for Beagle imputation engine
|
||||
*
|
||||
* <p>
|
||||
* Codec Description
|
||||
* Reads in tabular files with site markers and genotype posteriors, genotypes and phasing that Beagle produced
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* See also: @see <a href="http://vcftools.sourceforge.net/specs.html">VCF specification</a><br>
|
||||
* See also: @see <a href="http://faculty.washington.edu/browning/beagle/beagle.html">BEAGLE home page</a><br>
|
||||
* </p>
|
||||
|
||||
* </p>
|
||||
*
|
||||
* <h2>File format example</h2>
|
||||
* <h2>File format example for phased genotypes file</h2>
|
||||
* <pre>
|
||||
* line 1
|
||||
* line 2
|
||||
* line 3
|
||||
* dummy header
|
||||
* 20:60251 T T T T T T
|
||||
* 20:60321 G G G G G G
|
||||
* 20:60467 G G G G G G
|
||||
* </pre>
|
||||
*
|
||||
* <h2>File format example for genotype posteriors</h2>
|
||||
* <pre>
|
||||
* marker alleleA alleleB NA07056 NA07056 NA07056
|
||||
* 20:60251 T C 0.9962 0.0038 0 0.99245 0.00755 0 0.99245 0.00755 0
|
||||
* 20:60321 G T 0.98747 0.01253 0 0.99922 0.00078 0 0.99368 0.00632 0
|
||||
* 20:60467 G C 0.97475 0.02525 0 0.98718 0.01282 0 0.98718 0.01282 0
|
||||
* </pre>
|
||||
*
|
||||
* <h2>File format example for r2 file
|
||||
* <pre>
|
||||
* 20:60251 0.747
|
||||
* 20:60321 0.763
|
||||
* 20:60467 0.524
|
||||
* </pre>
|
||||
* </h2>
|
||||
* @author Mark DePristo
|
||||
* @since 2010
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue