d92a6079e9b8a9aed65ecde011a76b7e202aee8e max Thu Nov 20 14:22:48 2014 -0800 making the beacon help message a little bit better, refs #14393 diff --git src/beacon/query src/beacon/query index 036d9f4..00d90a1 100755 --- src/beacon/query +++ src/beacon/query @@ -32,61 +32,63 @@ accCounts[accKey]=str(newCount) accCounts.close() def getTrackFromScript(): " check which track name occurs in script name, to make the track captured by symlinks " name = sys.argv[0].lower() for trackName in trackFnames: if trackName in name: return trackName def errAbort(errMsg=None): print "
" if errMsg is not None: print "error: "+errMsg + host = os.environ.get("HTTP_HOST", "") + print """ A Genomics Alliance Beacon at UCSC. In collaboration with the Leiden Open Variation Database. Data provided by Leiden Open Variation (Ivo Fokkema), NCBI ClinVar, UniProt. parameters: - chrom: either a number or X/Y or UCSC format like "chr1" or INSDC accession like CM000663.1 - track: clinvar, uniprot or lovd - pos: 0-based position, like 10042537 - allele: A,C,T,G. Ignored for UniProt (UniProt stores only amino acid changes) If the allele was found in the track, returns the string "Yes", otherwise "No". For UniProt, an overlap with a amino acid change is enough to trigger "Yes". For LOVD, an overlap with a deletion or duplication returns "Maybe". Examples: - http://hgwdev-max.cse.ucsc.edu/cgi-bin/beacon/query?track=lovd&chrom=chr1&pos=808921&allele=T - http://hgwdev-max.cse.ucsc.edu/cgi-bin/beacon/query?track=clinvar&chrom=chr1&pos=10042537&allele=T - http://hgwdev-max.cse.ucsc.edu/cgi-bin/beacon/query?track=uniprot&chrom=CM000663.1&pos=977027&allele=T + http://%(host)s/cgi-bin/beacon/query?track=lovd&chrom=chr1&pos=808921&allele=T + http://%(host)s/cgi-bin/beacon/query?track=clinvar&chrom=chr1&pos=10042537&allele=T + http://%(host)s/cgi-bin/beacon/query?track=uniprot&chrom=CM000663.1&pos=977027&allele=T Alternative URLs are queryLovd, queryClinvar and queryUniprot, e.g. - http://hgwdev-max.cse.ucsc.edu/cgi-bin/beacon/queryLovd?chrom=1&pos=2160493&allele=T + http://%(host)s.cse.ucsc.edu/cgi-bin/beacon/queryLovd?chrom=1&pos=2160493&allele=T - returns "Maybe" Number of variants: - LOVD: 180k - ClinVar: 30k - HGMD: 90k - UniProt: 47k - """ + """ % locals() print "" sys.exit(0) # parse INSDC -> ucsc chrom name table insdcToUcsc = {} for line in open("insdcToUcsc.tab"): name, chrom = line.rstrip("\n").split("\t") insdcToUcsc[name] = chrom print "Content-Type: text/html\n" form = cgi.FieldStorage() track = form.getfirst("track") if track is None: track = getTrackFromScript()