9160ba77561829b8e213058680623b63d35262dc braney Fri Sep 3 10:40:47 2021 -0700 get synBlast to work with bigBed diff --git src/hg/utils/automation/synBlastp.csh src/hg/utils/automation/synBlastp.csh index 7a04062..d7627e4 100755 --- src/hg/utils/automation/synBlastp.csh +++ src/hg/utils/automation/synBlastp.csh @@ -122,31 +122,31 @@ # --- filter $db.xxBlastTab based on pslMapped $db.kg hgMapToGene'd over to $otherDb.kg --- echo "genePredToFakePsl:" genePredToFakePsl $db $geneTable $db.kg.psl $db.kg.cds echo "pslMap via $lift :" zcat $lift | pslMap -chainMapFile -swapMap $db.kg.psl stdin stdout \ | sort -k 14,14 -k 16,16n > $db.$otherDb.kg.psl echo "hgLoadPsl:" hgLoadPsl -clientLoad $otherDb $db.$otherDb.kg.psl -table=temp${db}KgPslMapped echo "hgMapToGene:" -hgMapToGene -all $otherDb -type=psl -verbose=0 temp${db}KgPslMapped $otherGeneTable temp${otherDb}kgTo${db}kg +hgMapToGene -geneTableType=genePred -all $otherDb -type=psl -verbose=0 temp${db}KgPslMapped $otherGeneTable temp${otherDb}kgTo${db}kg echo "$db.${xxBlastTab}:" # original for comparison: set sql = "select count(distinct query) from ${xxBlastTab}"; echo "old number of unique query values:"; hgsql $db -BN -e "$sql" set sql = "select count(distinct target) from ${xxBlastTab}"; echo "old number of unique target values"; hgsql $db -BN -e "$sql" # drop rows that do not have a match in the psl-mapped otherDb table. hgsql $db -BN -e "delete a from ${xxBlastTab} a left join ${otherDb}.temp${otherDb}kgTo${db}kg b on (a.query = b.value and a.target = b.name) where b.value is NULL" set sql = "select count(distinct query) from ${xxBlastTab}"; echo "new number of unique query values:"; hgsql $db -BN -e "$sql" set sql = "select count(distinct target) from ${xxBlastTab}"; echo "new number of unique target values"; hgsql $db -BN -e "$sql" #cleanup: