Entering edit mode
6.3 years ago
FGV
▴
170
Dear all,
I'm trying to query the UCSC database directly from the command line (or R) to get the conservation (e.g. phastCons46wayPrimates) score for a single position. I tried using the Table Browser, and it worked fine:
track type=wiggle_0 name="Primate Cons" description="Primate Conservation by PhastCons"
# output date: 2018-08-07 09:39:08 UTC
# chrom specified: chr21
# position specified: 33036558-33036607
# This data has been compressed with a minor loss in resolution.
# (Worst case: 0.00497656) The original source data
# (before querying and compression) is available at
# http://hgdownload.cse.ucsc.edu/downloads.html
variableStep chrom=chr21 span=1
33036558 0.0501575
33036559 0.0451417
33036560 0.0451417
33036561 0.0351102
33036562 0.0451417
33036563 0.0501575
33036564 0.0652047
33036565 0.0702205
33036566 0.0952992
33036567 0.115362
33036568 0.125394
33036569 0.130409
[...]
I then tried several approaches from the command line, but none worked.
Heng Li's script:
echo "chr21 33036558 33036607" | perl batchUCSC.pl -d hg19 -p 'phastCons46wayPrimates:chromStart:chromEnd:*'
Direct mySQL query:
mysql hg19 --user=genome --host=genome-mysql.cse.ucsc.edu -A -NBe 'select * from phastCons46wayPrimates where chrom = "chr21"'
It seems that only some positions are present. Can it be? Is it possible to get per-positions conservation? thanks,