60ff056e1f85059922a4cb8532a9c8d1a7a7218d braney Wed Aug 31 11:47:17 2022 -0700 update OMiM otto process to use ncbiRefSeq diff --git src/hg/utils/otto/omim/doOmimGene2.sh src/hg/utils/otto/omim/doOmimGene2.sh new file mode 100755 index 0000000..cb85171 --- /dev/null +++ src/hg/utils/otto/omim/doOmimGene2.sh @@ -0,0 +1,16 @@ +#!/bin/sh -e +# doOmimGene2.sh $db omimGene2new + +set -eEu -o pipefail + +db=$1 +output=$2 + +hgsql $db -Ne "select geneId, omimId from omim2geneNew where geneId <>'-' and entryType='gene' " | sort > locusToOmim.txt +hgsql $db -Ne "select r.name,r.chrom,r.txStart,r.txEnd,locusLinkId from ncbiRefSeq r,ncbiRefSeqLink where r.name=id and r.name not like 'X%'" | awk '{print $5,$1,$2,$3,$4}' | sort > locusToId.txt + +join locusToId.txt locusToOmim.txt | awk '{print $0,$5-$4}' | sort -k 1,1 -k 3,3 -k 7,7nr | awk '{if (($1 != last1) || ($3 != last3)) print; last1=$1;last3=last$3}' | awk '{print $3,$4,$5,$6}' | sort -u -k 1,1 -k 2,2n > $output + +rm -rf locusToIdtxt locusToOmim.txt + +