Skip to content

Commit

Permalink
0.0.10 release stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Feb 16, 2016
1 parent 430105b commit 4e6fd8e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion example/custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ join = table.concat

function check_clinvar_aaf(clinvar_sig, max_aaf_all, aaf_cutoff)
-- didn't find an aaf for this so can't be common
if max_aaf_all == nil then
if max_aaf_all == nil or clinvar_sig == nil then
return false
end
if type(clinvar_sig) ~= "string" then
Expand Down
36 changes: 19 additions & 17 deletions example/gem.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@ names = ["in_exac_flag", "ac_exac_all", "an_exac_all", "ac_exac_afr", "an_exac_a

ops=["flag", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self"]

[[annotation]]
file="ESP6500SI.all.snps_indels.tidy.v2.vcf.gz"
fields=["TAC", "EA_AC", "AA_AC", "TAC", "EXOME_CHIP"]
names=["in_esp_flag", "aaf_esp_ea_float", "aaf_esp_aa_float", "aaf_esp_all_float", "EXOME_CHIP_flag"]
ops=["flag", "lua:ratio(vals)", "lua:ratio(vals)", "lua:ratio(vals)", "flag"]

[[annotation]]
file="dbsnp.b141.20140813.hg19.tidy.vcf.gz"
fields=["ID"]
names=["rs_ids"]
ops=["concat"]

[[annotation]]
file="ALL.wgs.phase3_shapeit2_mvncall_integrated_v5a.20130502.sites.tidy.vcf.gz"
fields=["AF", "AMR_AF", "EAS_AF", "SAS_AF", "AFR_AF", "EUR_AF", "AF"]
names=["in_1kg_flag", "aaf_1kg_amr_float", "aaf_1kg_eas_float", "aaf_1kg_sas_float", "aaf_1kg_afr_float", "aaf_1kg_eur_float", "aaf_1kg_all_float"]
ops=["flag", "max", "max", "max", "max", "max", "max"]
ops=["flag", "self", "self", "self", "self", "self", "self"]

[[annotation]]
file="clinvar_20150305.tidy.vcf.gz"
Expand All @@ -33,13 +45,8 @@ type="Flag"
file="cosmic-v68-GRCh37.tidy.vcf.gz"
fields=["ID"]
names=["cosmic_ids"]
ops=["concat"]
ops=["uniq"]

[[annotation]]
file="dbsnp.b141.20140813.hg19.tidy.vcf.gz"
fields=["ID"]
names=["rs_ids"]
ops=["concat"]

[[annotation]]
file="hg19_fitcons_fc-i6-0_V1-01.bed.gz"
Expand All @@ -48,11 +55,6 @@ names=["fitcons_float"]
ops=["mean"]


[[annotation]]
file="ESP6500SI.all.snps_indels.tidy.v2.vcf.gz"
fields=["TAC", "EA_AC", "AA_AC", "TAC", "EXOME_CHIP"]
names=["in_esp_flag", "aaf_esp_ea_float", "aaf_esp_aa_float", "aaf_esp_all_float", "EXOME_CHIP_flag"]
ops=["flag", "lua:ratio(vals)", "lua:ratio(vals)", "lua:ratio(vals)", "flag"]

#[[annotation]]
#file="LCR-hs37d5.bed.gz"
Expand Down Expand Up @@ -83,13 +85,13 @@ names=[ "encode_consensus_gm12878", "encode_consensus_h1hesc", "encode_consensus
file="hg19.gwas.bed.gz"
columns=[4]
names=["gwas_pubmed_trait"]
ops=["concat"]
ops=["uniq"]

[[annotation]]
file="hg19.rmsk.bed.gz"
columns=[4]
names=["rmsk"]
ops=["concat"]
ops=["uniq"]

[[annotation]]
file="hg19.gerp.elements.bed.gz"
Expand All @@ -107,13 +109,13 @@ ops=["flag"]
file="hg19.dgv.bed.gz"
columns=[4]
names=["dgv"]
ops=["concat"]
ops=["uniq"]

[[annotation]]
file="wgEncodeRegTfbsClusteredV2.cell_count.20130213.bed.gz"
columns=[4]
names=["tfbs"]
ops=["concat"]
ops=["uniq"]

[[annotation]]
file="genetic_map_HapMapII_GRCh37.gz"
Expand All @@ -125,7 +127,7 @@ names=["hapmap1", "hapmap2"]
[[annotation]]
file="stam.125cells.dnaseI.hg19.bed.gz"
columns=[5, 6]
ops=["mean", "concat"]
ops=["mean", "uniq"]
names=["stam_mean", "stam_names"]

[[annotation]]
Expand Down
11 changes: 8 additions & 3 deletions tests/release-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ BASE=/usr/local/src/gemini_install//data/gemini_data/

V=vcfanno

IRELATE_VERBOSE=TRUE IRELATE_MAX_CHUNK=1 run clinvar_common_pathogenic $V -lua docs/examples/clinvar_exac.lua -p 4 -base-path $BASE docs/examples/clinvar_exac.conf $BASE/clinvar_20150305.tidy.vcf.gz
IRELATE_VERBOSE=TRUE IRELATE_MAX_GAP=500 run clinvar_common_pathogenic $V -lua docs/examples/clinvar_exac.lua -p 4 -base-path $BASE docs/examples/clinvar_exac.conf $BASE/clinvar_20150305.tidy.vcf.gz
assert_equal 567 $(zgrep -wc common_pathogenic $STDOUT_FILE)
assert_equal $(zgrep -cv ^# $STDOUT_FILE) $(zgrep -cv ^# $BASE/clinvar_20150305.tidy.vcf.gz)
tail -1 $STDERR_FILE
#run exac_combine vcfanno -base-path $BASE $BASE/ExAC.r0.3.sites.vep.tidy.vcf.gz docs/examples/exac_combine/exac_combine.conf
run exac_combine vcfanno -base-path $BASE $BASE/ExAC.r0.3.sites.vep.tidy.vcf.gz docs/examples/exac_combine/exac_combine.conf
IRELATE_MAX_CHUNK=2 IRELATE_MAX_GAP=10 run filehandletest $V -lua example/custom.lua -p 4 -base-path $BASE example/gem.conf $BASE/ALL.wgs.phase3_shapeit2_mvncall_integrated_v5a.20130502.sites.tidy.vcf.gz | head -1000 | python tests/find-out-of-order.py
orun() {
$V -lua example/custom.lua -p 4 -base-path $BASE example/gem.conf $BASE/ALL.wgs.phase3_shapeit2_mvncall_integrated_v5a.20130502.sites.tidy.vcf.gz | head -1000 | python tests/find-out-of-order.py
}
IRELATE_MAX_CHUNK=2 IRELATE_MAX_GAP=10 run filehandletest orun
assert_exit_code 0
assert_equal $(grep -c "too many open files" $STDERR_FILE) "0"
6 changes: 3 additions & 3 deletions vcfanno.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/brentp/xopen"
)

var VERSION = "0.0.10-rc2"
var VERSION = "0.0.10"

func envGet(name string, vdefault int) int {
sval := os.Getenv(name)
Expand Down Expand Up @@ -154,8 +154,8 @@ see: https://github.com/brentp/vcfanno
lastMsg.RLock()
em := e.Error()
if em != lastMsg.s[0] && em != lastMsg.s[1] && em != lastMsg.s[2] {
lastMsg.RUnlock()
log.Println(e, ">> this error may occur many times. reporting once here...")
lastMsg.RUnlock()
lastMsg.Lock()
lastMsg.s[lastMsg.i] = em
if lastMsg.i == len(lastMsg.s)-1 {
Expand All @@ -170,7 +170,7 @@ see: https://github.com/brentp/vcfanno
}
}

maxGap := envGet("IRELATE_MAX_GAP", 5000)
maxGap := envGet("IRELATE_MAX_GAP", 20000)
maxChunk := envGet("IRELATE_MAX_CHUNK", 8000)

stream := irelate.PIRelate(maxChunk, maxGap, qstream, *ends, fn, queryables...)
Expand Down

0 comments on commit 4e6fd8e

Please sign in to comment.