add test for inherited de novo
MODIFY
test/data-setup.sh
test/data-setup.sh
@@ -38,6 +38,7 @@ gemini load --skip-gene-tables --test-mode -v test.comp_het.5.vcf --skip-gerp-bp
gemini load --skip-gene-tables --test-mode -v test.comp_het.6.vcf --skip-gerp-bp --skip-cadd -t snpEff -p test.comp_het.2.ped test.comp_het_default.6.db
gemini load --skip-gene-tables --test-mode -v test.comp_het.7.vcf --skip-gerp-bp --skip-cadd -t snpEff -p test.comp_het.2.ped test.comp_het_default.7.db &
gemini load --skip-gene-tables --test-mode -v test.auto_dom.vcf --skip-gerp-bp --skip-cadd -t snpEff -p test.auto_dom.ped test.auto_dom.db &
+gemini load --skip-gene-tables --test-mode -v inherited-dn.vcf --skip-gerp-bp --skip-cadd -t VEP -p inherited-dn.ped test.inherited_dn.db &
gemini load --skip-gene-tables --test-mode -v test.auto_dom.no_parents.vcf --skip-gerp-bp --skip-cadd -t snpEff -p test.auto_dom.no_parents.ped test.auto_dom.no_parents.db
wait
gemini load --skip-gene-tables --test-mode -v test.auto_dom.no_parents.2.vcf --skip-gerp-bp --skip-cadd -t snpEff -p test.auto_dom.no_parents.2.ped test.auto_dom.no_parents.2.db

ADD
test/inherited-dn.ped
+fam1 kid dad mom 2 2
+fam1 mom gpa gma 2 2
+fam1 dad -9 -9 1 1
+fam1 gma -9 -9 2 1
+fam1 gpa -9 -9 2 1

ADD
test/inherited-dn.vcf
+##fileformat=VCFv4.1
+##FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">
+##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth (reads with MQ=255 or with bad mates are filtered)">
+##FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##FORMAT=<ID=PL,Number=G,Type=Integer,Description="Normalized, Phred-scaled likelihoods for genotypes as defined in the VCF specification">
+##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
+##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
+##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
+##INFO=<ID=BaseQRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt Vs. Ref base qualities">
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth; some reads may have been filtered">
+##INFO=<ID=DS,Number=0,Type=Flag,Description="Were any of the samples downsampled?">
+##INFO=<ID=Dels,Number=1,Type=Float,Description="Fraction of Reads Containing Spanning Deletions">
+##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">
+##INFO=<ID=HRun,Number=1,Type=Integer,Description="Largest Contiguous Homopolymer Run of Variant Allele In Either Direction">
+##INFO=<ID=HaplotypeScore,Number=1,Type=Float,Description="Consistency of the site with at most two segregating haplotypes">
+##INFO=<ID=InbreedingCoeff,Number=1,Type=Float,Description="Inbreeding coefficient as estimated from the genotype likelihoods per-sample when compared against the Hardy-Weinberg expectation">
+##INFO=<ID=MQ,Number=1,Type=Float,Description="RMS Mapping Quality">
+##INFO=<ID=MQ0,Number=1,Type=Integer,Description="Total Mapping Quality Zero Reads">
+##INFO=<ID=MQRankSum,Number=1,Type=Float,Description="Z-score From Wilcoxon rank sum test of Alt vs. Ref read mapping qualities">
+##INFO=<ID=QD,Number=1,Type=Float,Description="Variant Confidence/Quality by Depth">
+##INFO=<ID=ReadPosRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt vs. Ref read position bias">
+##UnifiedGenotyper="analysis_type=UnifiedGenotyper input_file=[bam/all.conc.on.pos.dedup.realigned.bam] read_buffer_size=null phone_home=STANDARD read_filter=[] intervals=null excludeIntervals=null interval_set_rule=UNION interval_merging=ALL reference_sequence=/home/arq5x/cphg-home/shared/genomes/hg19/bwa/gatk/hg19_gatk.fa rodBind=[] nonDeterministicRandomSeed=false downsampling_type=BY_SAMPLE downsample_to_fraction=null downsample_to_coverage=250 baq=OFF baqGapOpenPenalty=40.0 performanceLog=null useOriginalQualities=false defaultBaseQualities=-1 validation_strictness=SILENT unsafe=null num_threads=10 num_cpu_threads=null num_io_threads=null num_bam_file_handles=null read_group_black_list=null pedigree=[] pedigreeString=[] pedigreeValidationType=STRICT allow_intervals_with_unindexed_bam=false logging_level=INFO log_to_file=null help=false genotype_likelihoods_model=BOTH p_nonref_model=EXACT heterozygosity=0.0010 pcr_error_rate=1.0E-4 genotyping_mode=DISCOVERY output_mode=EMIT_VARIANTS_ONLY standard_min_confidence_threshold_for_calling=30.0 standard_min_confidence_threshold_for_emitting=30.0 computeSLOD=false alleles=(RodBinding name= source=UNBOUND) min_base_quality_score=17 max_deletion_fraction=0.05 multiallelic=false max_alternate_alleles=5 min_indel_count_for_genotyping=5 indel_heterozygosity=1.25E-4 indelGapContinuationPenalty=10.0 indelGapOpenPenalty=45.0 indelHaplotypeSize=80 bandedIndel=false indelDebug=false ignoreSNPAlleles=false dbsnp=(RodBinding name= source=UNBOUND) out=org.broadinstitute.sting.gatk.io.stubs.VCFWriterStub NO_HEADER=org.broadinstitute.sting.gatk.io.stubs.VCFWriterStub sites_only=org.broadinstitute.sting.gatk.io.stubs.VCFWriterStub debug_file=null metrics_file=null annotation=[] excludeAnnotation=[] filter_mismatching_base_and_quals=false"
+##contig=<ID=chr1,length=249250621,assembly=hg19>
+##INFO=<ID=CSQ,Number=.,Type=String,Description="Consequence type as predicted by VEP. Format: Consequence|Codons|Amino_acids|Gene|SYMBOL|Feature|EXON|PolyPhen|SIFT|Protein_position|BIOTYPE|ALLELE_NUM">
+#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT kid mom dad gma gpa
+chr1 30548 . T G 50.09 . DP=7;CSQ=intron_variant&nc_transcript_variant|||ENSG00000243485|MIR1302-10|ENST00000473358|||||lincRNA|1,non_coding_exon_variant&nc_transcript_variant|||ENSG00000243485|MIR1302-10|ENST00000469289|1/2||||lincRNA|1,upstream_gene_variant|||ENSG00000227232|WASH7P|ENST00000488147|||||unprocessed_pseudogene|1,downstream_gene_variant|||ENSG00000237613|FAM138A|ENST00000417324|||||lincRNA|1,downstream_gene_variant|||ENSG00000243485|MIR1302-10|ENST00000607096|||||miRNA|1,downstream_gene_variant|||ENSG00000237613|FAM138A|ENST00000461467|||||lincRNA|1,upstream_gene_variant|||ENSG00000227232|WASH7P|ENST00000538476|||||unprocessed_pseudogene|1,upstream_gene_variant|||ENSG00000227232|WASH7P|ENST00000438504|||||unprocessed_pseudogene|1,upstream_gene_variant|||ENSG00000227232|WASH7P|ENST00000423562|||||unprocessed_pseudogene|1 GT:AD:DP:GQ:PL 0/1:20,0:20:20.01:10,0,33 0/1:20,0:20:20.01:10,0,33 0/0:10,10:20:20.01:0,10,33 0/0:10,10:20:20.01:0,10,33 0/0:10,10:20:20.01:0,10,33

MODIFY
test/test-de-novo.sh
test/test-de-novo.sh
check()
{
- if diff <(sort $1) <(sort $2); then
+ if diff <(sort "$1") <(sort "$2"); then
echo ok
else
echo fail
@@ -12,7 +12,7 @@ export -f check
###################################################################
# 1. Test basic de_novo functionality
###################################################################
-echo " de_novo.t1...\c"
+printf " de_novo.t1...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
WDR37 T C stop_lost HIGH 1 1 1_dad(1_dad;unaffected),1_mom(1_mom;unaffected),1_kid(1_kid;affected) T/T,T/T,T/C 1_kid 1
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
@@ -32,7 +32,7 @@ rm obs exp
###################################################################
# 2. Test de_novo with filter
###################################################################
-echo " de_novo.t2...\c"
+printf " de_novo.t2...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
WDR37 T C stop_lost HIGH 1 1 1_dad(1_dad;unaffected),1_mom(1_mom;unaffected),1_kid(1_kid;affected) T/T,T/T,T/C 1_kid 1" > exp
gemini de_novo \
@@ -46,7 +46,7 @@ rm obs exp
###################################################################
# 3. Test de_novo with filter and minimum depth requirement
###################################################################
-echo " de_novo.t3...\c"
+printf " de_novo.t3...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
SYCE1 T C missense_variant MED 5 3 3_dad(3_dad;unaffected),3_mom(3_mom;unaffected),3_kid(3_kid;affected) T/T,T/T,T/C 3_kid 1" > exp
gemini de_novo \
@@ -61,7 +61,7 @@ rm obs exp
###################################################################
# 4. Test de_novo with filter with min-kindreds
###################################################################
-echo " de_novo.t4...\c"
+printf " de_novo.t4...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
ASAH2C C T missense_variant MED 3 3 3_dad(3_dad;unaffected),3_mom(3_mom;unaffected),3_kid(3_kid;affected) C/C,C/C,C/T 3_kid 2
@@ -81,7 +81,7 @@ rm obs exp
###################################################################
# 5. Test de_novo with filter with min-kindreds 2 and filter
###################################################################
-echo " de_novo.t5...\c"
+printf " de_novo.t5...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
ASAH2C C T missense_variant MED 3 3 3_dad(3_dad;unaffected),3_mom(3_mom;unaffected),3_kid(3_kid;affected) C/C,C/C,C/T 3_kid 2
@@ -100,7 +100,7 @@ rm obs exp
###################################################################
# 6. Test de_novo with filter with min-kindreds 3 and filter
###################################################################
-echo " de_novo.t6...\c"
+printf " de_novo.t6...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
SYCE1 T C missense_variant MED 5 1 1_dad(1_dad;unaffected),1_mom(1_mom;unaffected),1_kid(1_kid;affected) T/T,T/T,T/C 1_kid 3
SYCE1 T C missense_variant MED 5 3 3_dad(3_dad;unaffected),3_mom(3_mom;unaffected),3_kid(3_kid;affected) T/T,T/T,T/C 3_kid 3
@@ -117,7 +117,7 @@ rm obs exp
###################################################################
# 7. Test de_novo with filter with min-kindreds 1 and filter
###################################################################
-echo " de_novo.t7...\c"
+printf " de_novo.t7...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
WDR37 T C stop_lost HIGH 1 1 1_dad(1_dad;unaffected),1_mom(1_mom;unaffected),1_kid(1_kid;affected) T/T,T/T,T/C 1_kid 1
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
@@ -137,7 +137,7 @@ rm obs exp
###################################################################
# 8. Test de_novo without --only-affected
###################################################################
-echo " de_novo.t8...\c"
+printf " de_novo.t8...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
WDR37 T C stop_lost HIGH 1 1 1_dad(1_dad;unaffected),1_mom(1_mom;unaffected),1_kid1(1_kid1;unaffected),1_kid2(1_kid2;affected) T/T,T/T,T/C,T/C 1_kid2 1
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
@@ -156,7 +156,7 @@ rm obs exp
###################################################################
# 9. Test de_novo with --only-affected
###################################################################
-echo " de_novo.t9...\c"
+printf " de_novo.t9...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 2
ASAH2C C T missense_variant MED 3 3 3_dad(3_dad;unaffected),3_mom(3_mom;unaffected),3_kid(3_kid;affected) C/C,C/C,C/T 3_kid 2
@@ -174,7 +174,7 @@ rm obs exp
###################################################################
# 10. Test de_novo with --only-affected and --families
###################################################################
-echo " de_novo.t10...\c"
+printf " de_novo.t10...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 1
SPRN G A intron_variant LOW 4 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) G/G,G/G,G/A 2_kid 1
@@ -190,7 +190,7 @@ rm obs exp
###################################################################
# 11. Test de_novo with --only-affected and --families
###################################################################
-echo " de_novo.t11...\c"
+printf " de_novo.t11...\n"
echo "gene ref alt impact impact_severity variant_id family_id family_members family_genotypes samples family_count
ASAH2C C T missense_variant MED 2 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) C/C,C/C,C/T 2_kid 1
SPRN G A intron_variant LOW 4 2 2_dad(2_dad;unaffected),2_mom(2_mom;unaffected),2_kid(2_kid;affected) G/G,G/G,G/A 2_kid 1
@@ -201,3 +201,16 @@ gemini de_novo \
test.de_novo.affected.and.unaffected.db > obs
check obs exp
rm obs exp
+
+
+# inherited de novo
+echo "chrom start end variant_id gene family_id family_members family_genotypes samples family_count
+chr1 30547 30548 1 MIR1302-10 fam1 kid(kid;affected;female),mom(mom;affected;female),dad(dad;unaffected;male),gma(gma;unaffected;female),gpa(gpa;unaffected;female) T/G,T/G,T/T,T/T,T/T kid,mom 1" > exp
+
+printf " de_novo.t12...\n"
+gemini de_novo \
+ --columns "chrom,start,end" \
+ test.inherited_dn.db > obs
+
+check obs exp
+rm obs exp

add test for inherited de novo