<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Will,</div><div class=""><br class=""></div><div class="">Thanks for the response.</div><div class=""><br class=""></div><div class="">Extra information:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>*There is no marker that reliably recreates the problem, but rs887204533 is one which has previously shown the issue.  My current work-around is to have a master script run a sub-script job which collects allele frequencies for a small chunk of the region of interest .. upon the completion of the sub-script, the master script scans the sub-script's stderr for the bgzf message .. if found, the sub-script runs its job over again.  This repeats until no bgzf message is found.  Rerunning the sub-script a small number of times on the same region/chunk always seems to create a run with no bgzf message, fortunately.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>*These vcfs are being accessed remotely (I had no idea the vcfs carried frequency information (vrs. just genotypes)).</div><div class=""><br class=""></div><div class="">Below shows the recovered allele frequencies for rs887204533 without/with the bgzf message.</div><div class="">Below that is a simplified version of the sub-script.</div><div class=""><br class=""></div><div class="">Please let me know if anything else would be helpful.</div><div class=""><br class=""></div><div class="">Thanks for the assistance.</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">Andrew</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When no bgzf message found:</div><div class=""><br class=""></div><div class=""><div class="">        rs887204533</div><div class="">        G/A</div><div class="">        Chromosome: 16</div><div class="">        Start-End: 5985270-5985270</div><div class="">        Consequences: non_coding_transcript_variant,intron_variant</div><div class="">        Allele Frequencies:</div><div class="">                Allele A has frequency: 3.4343e-005 in population TOPMed.</div><div class="">                Allele G has frequency: 0.999965657 in population TOPMed.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:AMR.</div><div class="">                Allele G has frequency: 1 in population gnomADg:AMR.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:NFE.</div><div class="">                Allele G has frequency: 1 in population gnomADg:NFE.</div><div class="">                Allele A has frequency: 1.14837e-04 in population gnomADg:AFR.</div><div class="">                Allele G has frequency: 0.999885163 in population gnomADg:AFR.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:FIN.</div><div class="">                Allele G has frequency: 1 in population gnomADg:FIN.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:EAS.</div><div class="">                Allele G has frequency: 1 in population gnomADg:EAS.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:OTH.</div><div class="">                Allele G has frequency: 1 in population gnomADg:OTH.</div><div class="">                Allele A has frequency: 3.24570e-05 in population gnomADg:ALL.</div><div class="">                Allele G has frequency: 0.999967543 in population gnomADg:ALL.</div><div class="">                Allele A has frequency: 0.00000e+00 in population gnomADg:ASJ.</div><div class="">                Allele G has frequency: 1 in population gnomADg:ASJ.</div></div><div class=""><br class=""></div><div class="">When bgzf message found:</div><div class=""><br class=""></div><div class=""><div class="">        rs887204533</div><div class="">        G/A</div><div class="">        Chromosome: 16</div><div class="">        Start-End: 5985270-5985270</div><div class="">        Consequences: non_coding_transcript_variant,intron_variant</div><div class="">        Allele Frequencies:</div><div class="">                Allele A has frequency: 3.4343e-005 in population TOPMed.</div><div class="">                Allele G has frequency: 0.999965657 in population TOPMed.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">use strict;</div><div class="">$|=1;</div><div class="">use Bio::EnsEMBL::Registry;</div><div class="">use Bio::EnsEMBL::ApiVersion;</div><div class=""><br class=""></div><div class="">my $registry = 'Bio::EnsEMBL::Registry';</div><div class="">$registry->load_all();</div><div class="">$registry->load_registry_from_db(</div><div class="">    -host => 'erismysql01.eisai.local', # alternatively '<a href="http://useastdb.ensembl.org" class="">useastdb.ensembl.org</a>'</div><div class="">    -user => 'ensembl_ro',</div><div class="">    -pass => 'ensembl_ro'</div><div class="">    );</div><div class=""><br class=""></div><div class="">$registry->set_reconnect_when_lost(1);</div><div class=""><br class=""></div><div class="">my $chr = $ARGV[0];</div><div class="">my $lw = $ARGV[1];</div><div class="">my $hg = $ARGV[2];</div><div class=""><br class=""></div></div><div class=""><div class="">my $gene_adaptor = $registry->get_adaptor('homo_sapiens','core','gene');</div><div class="">my $slice_adaptor = $registry->get_adaptor('homo_sapiens','core','slice');</div><div class="">my $vf_adaptor = $registry->get_adaptor( 'human', 'variation', 'variationfeature' );</div><div class="">$vf_adaptor->db->use_vcf(1);</div><div class=""><br class=""></div><div class="">my $slice2 = $slice_adaptor->fetch_by_region( 'chromosome', "$chr", $lw, $hg);</div><div class="">my $varfs = $vf_adaptor->fetch_all_by_Slice($slice2); #return ALL variationfeatures defined in $slice</div><div class="">foreach my $vf (@{$varfs}){</div><div class="">    print "\t".$vf->variation_name(),"\n"; # print rsID</div><div class="">    print "\t".$vf->allele_string(),"\n"; # print alleles</div><div class="">    print "\tChromosome: ".$slice2->seq_region_name."\n";</div><div class="">    print "\tStart-End: ".$vf->seq_region_start."-".$vf->seq_region_end."\n";</div><div class="">    print "\tConsequences: ".join(",",@{$vf->consequence_type()}),"\n"; # print consequenceType</div><div class="">    my $akc = 1;</div><div class="">    print "\tAllele Frequencies:\n";</div><div class="">    my $alleles = $vf->variation->get_all_Alleles();</div><div class="">    foreach my $allele (@{$alleles}) {</div><div class="">        next unless (defined $allele->population);</div><div class="">        my $allele_string   = $allele->allele;</div><div class="">        my $frequency       = $allele->frequency || 'NA';</div><div class="">        my $population_name = $allele->population->name;</div><div class="">        printf("\t\tAllele %s has frequency: %s in population %s.\n", $allele_string, $frequency, $population_name);</div><div class="">    }</div><div class="">    print "\n";</div><div class="">}</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 5, 2017, at 1:41 AM, William McLaren <<a href="mailto:wm2@ebi.ac.uk" class="">wm2@ebi.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Hi Andrew,</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">A few of pieces of information would be useful:</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">- a particular variant or location you’re querying that recreates the issue</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">- the code and context from which you’re making the call</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">- whether you’re using remotely accessed VCFs or locally downloaded (if you don’t know then it’s likely the VCFs are being accessed remotely)</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Regards</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Will McLaren</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Ensembl Variation</div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div id="bloop_sign_1512466770463314944" class="bloop_sign" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><p class="airmail_on" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On 4 December 2017 at 5:31:07 pm,<span class="Apple-converted-space"> </span><a href="mailto:andrew126@mac.com" class="">andrew126@mac.com</a><span class="Apple-converted-space"> </span>(<a href="mailto:andrew126@mac.com" class="">andrew126@mac.com</a>) wrote:</p><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class=""><div class=""><div class=""></div><div class="">Hi,<span class="Apple-converted-space"> </span><br class=""><br class="">In using API 90, when recovering all available allele frequencies for a particular variation feature, occassionally this message is shown in stderr:<span class="Apple-converted-space"> </span><br class=""><br class="">[W::bgzf_read_block] EOF marker is absent. The input is probably truncated<span class="Apple-converted-space"> </span><br class=""><br class="">That message seems to correlate with some allele frequencies not being found/reported by my script (in my case, the gnomAD frequencies).<span class="Apple-converted-space"> </span><br class=""><br class="">That is, when that message is not seen in stderr, I recover gnomAD frequencies for a particular variation feature; but when the message is seen, then it can look like that same variation feature doesn't have any gnomAD frequencies (even though it does).<span class="Apple-converted-space"> </span><br class=""><br class="">Is there any way to make such an event fatal to any API script? I'd much rather have my script fail/exit under such errors, than to not have it fail and risk believing such allele frequencies don't exist.<span class="Apple-converted-space"> </span><br class=""><br class="">Thanks.<span class="Apple-converted-space"> </span><br class=""><br class="">Please let me know if any other information would be useful.<span class="Apple-converted-space"> </span><br class=""><br class="">Best,<span class="Apple-converted-space"> </span><br class=""><br class="">Andrew<span class="Apple-converted-space"> </span><br class=""><br class=""><br class="">_______________________________________________<span class="Apple-converted-space"> </span><br class="">Dev mailing list<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span><a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><span class="Apple-converted-space"> </span><br class="">Posting guidelines and subscribe/unsubscribe info:<span class="Apple-converted-space"> </span><a href="http://lists.ensembl.org/mailman/listinfo/dev" class="">http://lists.ensembl.org/mailman/listinfo/dev</a><span class="Apple-converted-space"> </span><br class="">Ensembl Blog:<span class="Apple-converted-space"> </span><a href="http://www.ensembl.info/" class="">http://www.ensembl.info/</a><span class="Apple-converted-space"> </span><br class=""></div></div></span></blockquote><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Dev mailing list    </span><a href="mailto:Dev@ensembl.org" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Dev@ensembl.org</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Posting guidelines and subscribe/unsubscribe info:<span class="Apple-converted-space"> </span></span><a href="http://lists.ensembl.org/mailman/listinfo/dev" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.ensembl.org/mailman/listinfo/dev</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Ensembl Blog:<span class="Apple-converted-space"> </span></span><a href="http://www.ensembl.info/" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://www.ensembl.info/</a></div></blockquote></div><br class=""></body></html>