81ef31c5abe6dba3c4dfa96725f2912c2183fc8b braney Mon Oct 23 16:38:46 2023 -0700 fix doOmimGene2.sh to not throw away items with the same start coordinate. diff --git src/hg/utils/otto/omim/doOmimGene2.sh src/hg/utils/otto/omim/doOmimGene2.sh index cb85171..6b6ed82 100755 --- src/hg/utils/otto/omim/doOmimGene2.sh +++ src/hg/utils/otto/omim/doOmimGene2.sh @@ -1,16 +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 +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 -k 1,1 -k 2,2n | uniq > $output -rm -rf locusToIdtxt locusToOmim.txt +rm -rf locusToId.txt locusToOmim.txt