updated, reports more stuff now, including stats for external consistency checks
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@789 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
30c63daf89
commit
7afc10fd6f
|
|
@ -10,12 +10,17 @@ import org.broadinstitute.sting.utils.Utils;
|
|||
*
|
||||
*/
|
||||
public class GenotypingCallStats {
|
||||
public long covered = 0; // number of loci covered in all 3 individuals (not necessarily confidently called)
|
||||
public long assessed = 0; // number of loci with all 3 genotypes available at or above the specified cutoff
|
||||
public long ref = 0; // number of assessed loci, where all 3 people have homogeneous reference allele
|
||||
public long covered = 0; // number of loci covered in an individual (not necessarily confidently called)
|
||||
public long assessed = 0; // number of loci with confident calls
|
||||
public long ref = 0; // number of assessed loci where the reference is called
|
||||
public int variant = 0; // number of assessed loci where a variant is observed in the individual
|
||||
// NOTE: consistent_ref + inconsistent_ref is the total number of ref calls assessed for consistency (by some external application).
|
||||
// this number does not have to be equal to 'ref' ( total number of ref calls in this individual - we migh be unable to assess
|
||||
// the consistency for all of them!); same applies to (in)consistent_variant.
|
||||
public int consistent_variant = 0; // variants that are consistent in any (application-specific) sense, e.g. variant matches variants in other members of the family trio
|
||||
public int consistent_ref = 0; // reference calls that are consistent in any (app-specific) sense, e.g. consistent with other members of the family trio
|
||||
public int inconsistent_variant = 0; // variants that are inconsistent in any (application-specific) sense, e.g. variant does not match variants in other members of the family trio
|
||||
public int inconsistent_ref = 0; // reference calls that are inconsistent in any (app-specific) sense, e.g. inconsistent with other members of the family trio
|
||||
public int non_biallelic_variant = 0; // number of variant calls that are not biallelic
|
||||
|
||||
public GenotypingCallStats add(GenotypingCallStats other) {
|
||||
|
|
@ -25,6 +30,8 @@ public class GenotypingCallStats {
|
|||
this.variant += other.variant;
|
||||
this.consistent_variant += other.consistent_variant;
|
||||
this.consistent_ref += other.consistent_ref;
|
||||
this.inconsistent_variant += other.consistent_variant;
|
||||
this.inconsistent_ref += other.consistent_ref;
|
||||
this.non_biallelic_variant += other.non_biallelic_variant;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -35,13 +42,36 @@ public class GenotypingCallStats {
|
|||
StringBuilder b = new StringBuilder();
|
||||
|
||||
|
||||
b.append( String.format(" covered: %d%n assessed: %d (%3.2f%%)%n ref: %d (%3.2f%%)%n variants: %d (%3.2f%%)%n multiallelic: %d (%3.2f%%)%n",
|
||||
covered, assessed, Utils.percentage(assessed, covered),
|
||||
ref, Utils.percentage(ref,assessed),
|
||||
variant, Utils.percentage(variant,assessed),
|
||||
b.append( String.format(" covered: %d%n assessed: %d (%3.2f%% covered)%n",
|
||||
covered, assessed, Utils.percentage(assessed, covered) )
|
||||
);
|
||||
|
||||
b.append( String.format(" ref: %d (%3.2f%% assessed)%n",
|
||||
ref, Utils.percentage(ref,assessed))
|
||||
);
|
||||
|
||||
int z = consistent_ref+inconsistent_ref;
|
||||
b.append( String.format(" ref assessed for consistency: %d (%3.2f%% ref)%n",
|
||||
z, Utils.percentage(z, ref) )
|
||||
);
|
||||
b.append( String.format(" consistent ref: %d (%3.2f%% consistency-assessed ref)%n",
|
||||
consistent_ref, Utils.percentage(consistent_ref,z) )
|
||||
);
|
||||
|
||||
b.append( String.format(" variants: %d (%3.2f%% assessed)%n",
|
||||
variant, Utils.percentage(variant,assessed))
|
||||
);
|
||||
b.append( String.format(" multiallelic: %d (%3.2f%% variants)%n",
|
||||
non_biallelic_variant, Utils.percentage(non_biallelic_variant, variant))
|
||||
);
|
||||
|
||||
z = consistent_variant+inconsistent_variant;
|
||||
b.append( String.format(" variants assessed for consistency: %d (%3.2f%% variants)%n",
|
||||
z, Utils.percentage(z, variant) )
|
||||
);
|
||||
b.append( String.format(" consistent variants: %d (%3.2f%% consistency-assessed variants)%n",
|
||||
consistent_ref, Utils.percentage(consistent_variant,z) )
|
||||
);
|
||||
return b.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue