1345e556ff3da44f7efcf83adc5b67868e536044 angie Tue Feb 22 11:08:53 2022 -0800 ncov-ingest file with accession mapping is now gzipped. diff --git src/hg/utils/otto/sarscov2phylo/updateIdMapping.sh src/hg/utils/otto/sarscov2phylo/updateIdMapping.sh index dec3504..88afe9f 100755 --- src/hg/utils/otto/sarscov2phylo/updateIdMapping.sh +++ src/hg/utils/otto/sarscov2phylo/updateIdMapping.sh @@ -48,31 +48,32 @@ gbToDate=$ncbiDir/gbToDate cogUkToDate=$cogUkDir/cogUkToDate cncbToDate=$cncbDir/cncbToDate join -t$'\t' -a 1 -1 2 -o 1.1,1.2,1.3,2.2 \ <(sort -k2,2 $mapScriptDir/epiToPublicIdName.$today.txt) \ <(sort $gbToDate $cncbToDate $cogUkToDate) \ | sort -u adders - \ > epiToPublicAndDate.$today # Look for duplicate ID swizzles relative to existing ncov-ingest mappings cut -f 1,2 epiToPublicAndDate.$today \ | egrep $'\t''[A-Z][A-Z][0-9]+\.[0-9]+' \ | sort > latestEpiToGb -tail -n+2 ~angie/github/ncov-ingest/source-data/accessions.tsv \ +zcat ~angie/github/ncov-ingest/source-data/accessions.tsv.gz \ +| tail -n+2 \ | tawk '{print $2, $1;}' \ | sort > ncovEpiToGb wc -l latestEpiToGb ncovEpiToGb # But allow version updates (e.g. .1 --> .2) join -t$'\t' ncovEpiToGb latestEpiToGb \ | tawk '{ ncovNoDot = substr($2, 0, index($2, ".")-1); latestNoDot = substr($3, 0, index($3, ".")-1); if (ncovNoDot != latestNoDot) {print $3, $2;} }' \ > latestToNcov.sub subColumn -miss=/dev/null 2 epiToPublicAndDate.$today latestToNcov.sub tmp mv tmp epiToPublicAndDate.$today ln -sf epiToPublicAndDate.$today epiToPublicAndDate.latest # Now that mapping is updated, add GenBank accessions to 4th column of metadata