21441c54b2c684a56954b0a2b9d7f352b6d99432
markd
  Wed Jul 5 21:54:37 2023 -0700
added checking for GFF3 incorrectly duplicated ids mascrading as the horrible discontinuous features GFF3 mess

diff --git src/hg/utils/gff3ToGenePred/tests/makefile src/hg/utils/gff3ToGenePred/tests/makefile
index c31607c..97f2bb8 100644
--- src/hg/utils/gff3ToGenePred/tests/makefile
+++ src/hg/utils/gff3ToGenePred/tests/makefile
@@ -1,30 +1,30 @@
 kentSrc = ../../../..
 include ../../../../inc/common.mk
 
 gff3ToGenePred = ${DESTBINDIR}/gff3ToGenePred
 
 # sh commands to deal with gff3ToGenePred shouldhave failed and didn't 
 cmdShouldFail = echo "Error: command should have failed" >&2; false
 
 all::
 
 test:: geneMRnaTest noGeneMRnaTest geneMRnaHonorTest discontinuousTest multCdsOutOfExonTest \
 	noIdTest errCases1Test bogusQuotesTest noExonsTest geneTranscriptTest transcriptCdsParentTest \
 	minimalGenesTest geneDefaultStatusUnknownTest useNameTest nameAttrIdTest nameAttrNameTest \
 	frameShiftTest mm10GencodeTest ncbiSegmentsTest ncbiProblemsTest makeBadTest \
-	transcriptOnlyTest hprcTest
+	transcriptOnlyTest hprcTest errDupIdDiffParentsTest
 
 geneMRnaTest: mkout
 	${gff3ToGenePred} input/geneMRna.gff3 output/$@.gp
 	diff expected/$@.gp output/$@.gp
 
 noGeneMRnaTest: mkout
 	${gff3ToGenePred} input/noGeneMRna.gff3 output/$@.gp
 	diff expected/$@.gp output/$@.gp
 
 geneMRnaHonorTest: mkout
 	${gff3ToGenePred} -honorStartStopCodons input/geneMRna.gff3 output/$@.gp
 	diff expected/$@.gp output/$@.gp
 
 geneDefaultStatusUnknownTest: mkout
 	${gff3ToGenePred} -defaultCdsStatusToUnknown input/geneMRna.gff3 output/$@.gp
@@ -119,20 +119,25 @@
 	${gff3ToGenePred} -warnAndContinue -attrsOut=output/$@.attrs input/makerBad.gff3 output/$@.gp > output/$@.out 2>&1
 	diff expected/$@.gp output/$@.gp
 	diff expected/$@.attrs output/$@.attrs
 	diff expected/$@.out output/$@.out
 
 # pseudogene annotations as transcripts-only.  Yet another non-standard variation
 transcriptOnlyTest: mkout
 	${gff3ToGenePred} -allowMinimalGenes input/transcriptOnly.gff3 output/$@.gp
 	diff expected/$@.gp output/$@.gp
 
 # check features used by Ensembl HPRC annotations
 hprcTest: mkout
 	${gff3ToGenePred} -geneNameAttr=Name -rnaNameAttr=transcript_id input/hprc.gff3 output/$@.gp
 	diff expected/$@.gp output/$@.gp
 
+# error duplicated id
+errDupIdDiffParentsTest: mkout
+	if ! ${gff3ToGenePred} input/dupIdDiffParents.gff3 /dev/null >output/$@.out 2>&1 ; then true ; else ${cmdShouldFail} ; fi
+	diff expected/$@.out output/$@.out
+
 mkout:
 	@mkdir -p output
 
 clean::
 	rm -rf output