From 8fa72d499474ff078a11c6bc01207c1b25bd054d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 3 Feb 2021 16:33:22 +0000 Subject: [PATCH] JAL-3808 example exonerate cdna2genome and coding2genome test data and test --- .../testdata/test_cdna2genome_showquerygff.gff2 | 74 ++++++++++++++++++ .../testdata/test_cdna2genome_showtargetgff.gff2 | 81 +++++++++++++++++++ .../testdata/test_coding2genome_showquerygff.gff2 | 76 ++++++++++++++++++ .../testdata/test_coding2genome_showtargetgff.gff2 | 82 ++++++++++++++++++++ test/jalview/io/FeaturesFileTest.java | 42 ++++++++++ 5 files changed, 355 insertions(+) create mode 100644 examples/testdata/test_cdna2genome_showquerygff.gff2 create mode 100644 examples/testdata/test_cdna2genome_showtargetgff.gff2 create mode 100644 examples/testdata/test_coding2genome_showquerygff.gff2 create mode 100644 examples/testdata/test_coding2genome_showtargetgff.gff2 diff --git a/examples/testdata/test_cdna2genome_showquerygff.gff2 b/examples/testdata/test_cdna2genome_showquerygff.gff2 new file mode 100644 index 0000000..83983a7 --- /dev/null +++ b/examples/testdata/test_cdna2genome_showquerygff.gff2 @@ -0,0 +1,74 @@ +##gff-version 2 +##source-version exonerate:cdna2genome 2.4.0 +##date 2021-02-03 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +CDS|ENST00000398721/1-183 exonerate:cdna2genome similarity 1 183 885 + . alignment_id 0 ; Target ENSG00000214643/1-4245 ; Align 1 822 59 ; Align 60 4039 124 +##FASTA +>ENSG00000214643/1-4245 chromosome:GRCh38:6:49946021:49950265:-1 +CTCCTGCCTCAGCCTCTGGGAGTAGCTGGGACTACAGGGGCCCGCCACCACGCCCGGATAATTTTTTTCTAT +TTTTTAGTAGAGACGGGGTTTCACCGTGTTAGCCGGGACGGTCTTAATCTCCTGACCTAGTTATCCGCCAGC +CTCGGCCTCCCAAAGTGCTGGAATTACGGGTGTGAGTATATTGCTTTTTAAATTCACTAGTTTATTCATTAT +GTATAGCTATTTAAAAAAGAGAAAAACTGTCCTGGCTAACACGGTGAAACCCCGTTTCTACTAAAAATACAA +AAAATTAGCCGGCCTGGTGGCGGGTGCCTGTAGTACCACCTACTCTGGAGGCTGAGGCAGGAGAATGGCGTG +AACCCGGGAGGCAGAGCTTGCAGTGAGTCGCGATCGCGCCACTGAACTCCAGCCTGGGTGACAGAACGAGAC +TCCGTCTCAAAAAAAAAAAAAAAAAAAAAAAAAAGAGAGAGAGAGAGAGAGAGAGAGAAACTAAATCAAAAG +CAAAGATTAAATTCTCATGCTTCTACTTTTCAGACCTTCAATAGGAGATTCTCAGTGGCATGCACTTCCTAG +ACAACCAGTTATTAAAAAGATAATTATATACTATGGATATCATAACCCTTTATATCCCAAGATAAAAGAAAA +GTAATGTCCTGCATTTTTGCCCCAGGCACTGCTAAACAGGAGTGTTAACTTTTGATAAACCCCAGTTTCTAA +ATTCGTACAACTGCATGGAGAGAAGTATAAAAAGATGTGCTCTCCACCTTTCTCTTATTCAAACACTGCAGA +GCTGCTAATTCGGCTGACTGTCTTCAATCATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGG +TCCCCATTGCCACCAGGTAAAATGTAAATATTGAGAGGGTAAAATATCTTTCTGGAGAGTTGCATTTTGGTC +GATGTCAACTGGAGACACAAGAGTGACCAGATTGTTAAGAGAGTGGTTGGTTACGGTCCCAAGAGTAAATCA +CAAATAAAGGACTGTGGTCTTACTAAACAGTAAGGCTCCGGGTGAGTCATATTATTGTATGAGACAATTTAA +AGGCCTTGATTAAATGACTACAGGCTGGTTGTCCAGACTGACTACTTGGATAGAATATTAAAGTATAACCAT +CTGGATCCTTGAGACATTGATGGGCACTGTGTAGTAGAGTAACAGTTGGTTTTTCAGTAACCTCATGATAGG +TTTGGTTATATTATGTCACAAGGTTTACTTTGAGAAAAACACAAAATGGTGTTTTCAACTGATTAAGAATTG +AGAACTTCAGTGGCTGTATTACCTCAGGTCCAATTACATAGCAATTAATACTAACCAGATAATTAAATGAGT +ATAAACTTTGGAATAATTGATACCTGGGTTCAGATTTGGCTTTTGCCATGTATTGGCTATGCAAATCTATCA +GGTTATTTACACTCATTCAGCATCAATTTCCTCATTTGCGAATTAAATACAGTAATTAAGTCTATCTGTAGT +ATTATGACGATTAATGATATTTAAATATACAAAATGCCCAACATAAAGTATAATACACATCAGATTCATCTT +AAATAGTATTATAATTACTTTTACATTGTATTAAAACACCTTAAAAAGCAAGTAACATCTAGAAATCTCATC +GAGAAACTCTTTCTTGACAACTATTGCAGGAAACAGGGGAGGTAATATTTACCATGTTGGATTTCACATACT +TAAACTGTGTACCCTCATTTGTAAACTTTCATTGTACACACTACTATTAGATTAGATCAATAGCCAAAGGAA +GTATCTTGATGGAGATCATCGAAAGAGCTGTTTTAACACATTTCAGGGTACTTATGATAGGAAAAGTATTTT +TCTTATTTATGTAAAGACCCTGTAAACAATCATTTTACACACACCCAAGAAAATAATTCCACTCACCTTAAG +AAAATAAAACAAACAAAAAAATAATAACTATAGGGCATTCTGATTTAGGAGTGGTCTAGAACTGCAAGAGTT +TCCTCTTTGAAGTCCAACTTCATTCCTTAGCAGCACAGATGAGACCAAGGAAGTCTAGCTCTAACAATAAGT +CTGGCTGTGAGTAAACTCAAACATCTAAGTATTTTGGATAAAAGACTCAAATCATTTTAATTGTTTTATAAT +TCAAGTAAAATATGTCAGATGATAATTTTGAGGATTGTTATTTTATTACATCATTCTAAACTCAAGACTAAT +GGAATTACAATCAGGGTTTGTTTTTACTAAAACCATATGGGGGTGATCTTAAAATAAAGAAGACTTATTTAG +TGCAACCACATTTGGATAATAAAATTAGCTCCAGTTATGTTATCATGATTTACATGTGTGCCTCATGTCACT +TGCTTTGGGAAAAAAGGTGAAAATTTTCATGACATTTTCAGTTTCATTATAAACCCAAGAGACATTATGAAT +GTATGTGCATAGATTCATCTAAAAATTGAGAAATTTGTGATTCCTTCTTGTACATAAATAAATTTTTATGTT +ATACATAGCTGTTATCTAGAGAGAAGCTGTTTGTTGTTTTTGTTACTAGTGGAAAAATGCTAATTTACAATT +CCCACTTAAATAATGCTATTCTTTTTTTAATACTAGTGTTTGACAGCTGTCATCTTCTATTATTTGTAAATT +CCAATTAAGTCAACATACATGCTTCACACCCATCATGTAGGACAGTGTAATCTGAGGATGCATTTTTAAGCT +GGCAAGATAATGCTTTTTCCCTCTGGCATCAAAGGCAATAAATAGCATCTCTCTAGATAATACAAATAAAGA +GATATCTATCATTAATTTATACAGTGAAAAAGCATATCTCGTTGCCTAAAATATTTGGCAAAAAATTCAAAA +TAATATGTTCAATTTTTTCCTAAAATGTCTAGTTACTCCAAGTAACAGTAAGACTGTATGCTAACATAACTT +CACTGAAAGCAGATGACATGAATTGGGTTATCAGTACCTTTGACTCCATCTCAGTTGGATCCTATATGTTGA +GCACCTAGAGAAAGAGCACCTTTCACATACCTTTGTCACTGATATTTGATAATTTACCATTACATTTAATGC +TTTAACTTTGGGCGTCTTCCTCCTTATGTGACCTTTCTAAAAATTTAAACATTTTGTGAAGAGATGAAACAT +TAAGTCTTATGGCCAGATGTAGATGAGTTCATCAGCTGGTATATGCTATGATGATGCAATCCTGAGAACTTT +ATAAAGGAGAAGACTCTGAAACAAGGAAACATACGGAGATGCTGAGAGATACTACCTCTTTCTCTTTGAACT +TAAGGCTTGTCATTCATGACAACACTCATCCCCCCAGCAAACCAGGCTCCTGCCTAGGCTCAAATCTTTGTG +AATATTCAAAGAACCTCTCTTATCCCAGTATCTGCTAGGGTTTTTTTCACTCTTCTAATAAAAGAGATTTAT +AAAAAATATTCGAGCAAGATAGCAATTGAAGCAACATTAATGAATCTTCCCATTTTAAATCCTGAAACCAAA +AATGTTTAAATGTTTAATTTTTTTTTTGAAATTGGAGAAAAAAGCCTTTGGGAGGTGATGGGATCATAGATA +TTTGTATATGCCCAAATTCATCATTTGTACACATTAAATATGTGCAGTTCTTTTTATAGCAACTATACCTCA +ATAAAGTTGTTTTTTTAAAAAAATCATGTTAGGTGGGTAGTAGGTAAGTAGCCATAGAAATATGTGGTGTTC +ATTCCAGAACTACTTGAAATCTAACAATTTTTATTTAGAAATTCTCAGGGAAAACTAAGCTTTAACAACTAG +TGGATCAAGCCAGAAGTTGGAGAGGAAACTGAGAATGAAACAGAAAGTATCACAGAACAATCATCACCAGAA +AAATACAAAACAAATGACTTCCCAAATCCCTACCCCAGAATGCAAGGGCTATACTTATTTTCACATTGACAA +CTGATTTATCCCAAGGTGGGACCTTAAGACACTTATAGTGACTCAATGGTTTATGTGCTTTCTTTTTCCCCT +TTTAACAGTGAAATGTGCCGTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTG +TCATGATTTTGAAAAACCAATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATGTAGAAGTTTGAAAT +AAAAATCAGCATCCCTCAAAAGTAAAGCACAGTGAGTACAAGGATTAGTAATAAAAGAAACTGAATTAC +>CDS|ENST00000398721/1-183 DEFB133-201 +ATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGGTCCCCATTGCCACCAGGGTGAAATGTGCC +GTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTGTCATGATTTTGAAAAACCA +ATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATG diff --git a/examples/testdata/test_cdna2genome_showtargetgff.gff2 b/examples/testdata/test_cdna2genome_showtargetgff.gff2 new file mode 100644 index 0000000..0a5cb2d --- /dev/null +++ b/examples/testdata/test_cdna2genome_showtargetgff.gff2 @@ -0,0 +1,81 @@ +##gff-version 2 +##source-version exonerate:cdna2genome 2.4.0 +##date 2021-02-03 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +ENSG00000214643/1-4245 exonerate:cdna2genome gene 822 4162 885 + . gene_id 0 ; sequence CDS|ENST00000398721/1-183 ; gene_orientation + ; identity 99.45 ; similarity 99.45 +ENSG00000214643/1-4245 exonerate:cdna2genome utr5 822 880 . + . +ENSG00000214643/1-4245 exonerate:cdna2genome exon 822 880 . + . insertions 0 ; deletions 0 ; identity 98.33 ; similarity 98.33 +ENSG00000214643/1-4245 exonerate:cdna2genome splice5 881 882 . + . intron_id 1 ; splice_site "GT" +ENSG00000214643/1-4245 exonerate:cdna2genome intron 881 4038 . + . intron_id 1 +ENSG00000214643/1-4245 exonerate:cdna2genome splice3 4037 4038 . + . intron_id 0 ; splice_site "AC" +ENSG00000214643/1-4245 exonerate:cdna2genome exon 4039 4162 . + . insertions 0 ; deletions 0 ; identity 99.19 ; similarity 99.19 +ENSG00000214643/1-4245 exonerate:cdna2genome similarity 822 4162 885 + . alignment_id 0 ; Query CDS|ENST00000398721/1-183 ; Align 822 1 59 ; Align 4039 60 124 +##FASTA +>ENSG00000214643/1-4245 chromosome:GRCh38:6:49946021:49950265:-1 +CTCCTGCCTCAGCCTCTGGGAGTAGCTGGGACTACAGGGGCCCGCCACCACGCCCGGATAATTTTTTTCTAT +TTTTTAGTAGAGACGGGGTTTCACCGTGTTAGCCGGGACGGTCTTAATCTCCTGACCTAGTTATCCGCCAGC +CTCGGCCTCCCAAAGTGCTGGAATTACGGGTGTGAGTATATTGCTTTTTAAATTCACTAGTTTATTCATTAT +GTATAGCTATTTAAAAAAGAGAAAAACTGTCCTGGCTAACACGGTGAAACCCCGTTTCTACTAAAAATACAA +AAAATTAGCCGGCCTGGTGGCGGGTGCCTGTAGTACCACCTACTCTGGAGGCTGAGGCAGGAGAATGGCGTG +AACCCGGGAGGCAGAGCTTGCAGTGAGTCGCGATCGCGCCACTGAACTCCAGCCTGGGTGACAGAACGAGAC +TCCGTCTCAAAAAAAAAAAAAAAAAAAAAAAAAAGAGAGAGAGAGAGAGAGAGAGAGAAACTAAATCAAAAG +CAAAGATTAAATTCTCATGCTTCTACTTTTCAGACCTTCAATAGGAGATTCTCAGTGGCATGCACTTCCTAG +ACAACCAGTTATTAAAAAGATAATTATATACTATGGATATCATAACCCTTTATATCCCAAGATAAAAGAAAA +GTAATGTCCTGCATTTTTGCCCCAGGCACTGCTAAACAGGAGTGTTAACTTTTGATAAACCCCAGTTTCTAA +ATTCGTACAACTGCATGGAGAGAAGTATAAAAAGATGTGCTCTCCACCTTTCTCTTATTCAAACACTGCAGA +GCTGCTAATTCGGCTGACTGTCTTCAATCATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGG +TCCCCATTGCCACCAGGTAAAATGTAAATATTGAGAGGGTAAAATATCTTTCTGGAGAGTTGCATTTTGGTC +GATGTCAACTGGAGACACAAGAGTGACCAGATTGTTAAGAGAGTGGTTGGTTACGGTCCCAAGAGTAAATCA +CAAATAAAGGACTGTGGTCTTACTAAACAGTAAGGCTCCGGGTGAGTCATATTATTGTATGAGACAATTTAA +AGGCCTTGATTAAATGACTACAGGCTGGTTGTCCAGACTGACTACTTGGATAGAATATTAAAGTATAACCAT +CTGGATCCTTGAGACATTGATGGGCACTGTGTAGTAGAGTAACAGTTGGTTTTTCAGTAACCTCATGATAGG +TTTGGTTATATTATGTCACAAGGTTTACTTTGAGAAAAACACAAAATGGTGTTTTCAACTGATTAAGAATTG +AGAACTTCAGTGGCTGTATTACCTCAGGTCCAATTACATAGCAATTAATACTAACCAGATAATTAAATGAGT +ATAAACTTTGGAATAATTGATACCTGGGTTCAGATTTGGCTTTTGCCATGTATTGGCTATGCAAATCTATCA +GGTTATTTACACTCATTCAGCATCAATTTCCTCATTTGCGAATTAAATACAGTAATTAAGTCTATCTGTAGT +ATTATGACGATTAATGATATTTAAATATACAAAATGCCCAACATAAAGTATAATACACATCAGATTCATCTT +AAATAGTATTATAATTACTTTTACATTGTATTAAAACACCTTAAAAAGCAAGTAACATCTAGAAATCTCATC +GAGAAACTCTTTCTTGACAACTATTGCAGGAAACAGGGGAGGTAATATTTACCATGTTGGATTTCACATACT +TAAACTGTGTACCCTCATTTGTAAACTTTCATTGTACACACTACTATTAGATTAGATCAATAGCCAAAGGAA +GTATCTTGATGGAGATCATCGAAAGAGCTGTTTTAACACATTTCAGGGTACTTATGATAGGAAAAGTATTTT +TCTTATTTATGTAAAGACCCTGTAAACAATCATTTTACACACACCCAAGAAAATAATTCCACTCACCTTAAG +AAAATAAAACAAACAAAAAAATAATAACTATAGGGCATTCTGATTTAGGAGTGGTCTAGAACTGCAAGAGTT +TCCTCTTTGAAGTCCAACTTCATTCCTTAGCAGCACAGATGAGACCAAGGAAGTCTAGCTCTAACAATAAGT +CTGGCTGTGAGTAAACTCAAACATCTAAGTATTTTGGATAAAAGACTCAAATCATTTTAATTGTTTTATAAT +TCAAGTAAAATATGTCAGATGATAATTTTGAGGATTGTTATTTTATTACATCATTCTAAACTCAAGACTAAT +GGAATTACAATCAGGGTTTGTTTTTACTAAAACCATATGGGGGTGATCTTAAAATAAAGAAGACTTATTTAG +TGCAACCACATTTGGATAATAAAATTAGCTCCAGTTATGTTATCATGATTTACATGTGTGCCTCATGTCACT +TGCTTTGGGAAAAAAGGTGAAAATTTTCATGACATTTTCAGTTTCATTATAAACCCAAGAGACATTATGAAT +GTATGTGCATAGATTCATCTAAAAATTGAGAAATTTGTGATTCCTTCTTGTACATAAATAAATTTTTATGTT +ATACATAGCTGTTATCTAGAGAGAAGCTGTTTGTTGTTTTTGTTACTAGTGGAAAAATGCTAATTTACAATT +CCCACTTAAATAATGCTATTCTTTTTTTAATACTAGTGTTTGACAGCTGTCATCTTCTATTATTTGTAAATT +CCAATTAAGTCAACATACATGCTTCACACCCATCATGTAGGACAGTGTAATCTGAGGATGCATTTTTAAGCT +GGCAAGATAATGCTTTTTCCCTCTGGCATCAAAGGCAATAAATAGCATCTCTCTAGATAATACAAATAAAGA +GATATCTATCATTAATTTATACAGTGAAAAAGCATATCTCGTTGCCTAAAATATTTGGCAAAAAATTCAAAA +TAATATGTTCAATTTTTTCCTAAAATGTCTAGTTACTCCAAGTAACAGTAAGACTGTATGCTAACATAACTT +CACTGAAAGCAGATGACATGAATTGGGTTATCAGTACCTTTGACTCCATCTCAGTTGGATCCTATATGTTGA +GCACCTAGAGAAAGAGCACCTTTCACATACCTTTGTCACTGATATTTGATAATTTACCATTACATTTAATGC +TTTAACTTTGGGCGTCTTCCTCCTTATGTGACCTTTCTAAAAATTTAAACATTTTGTGAAGAGATGAAACAT +TAAGTCTTATGGCCAGATGTAGATGAGTTCATCAGCTGGTATATGCTATGATGATGCAATCCTGAGAACTTT +ATAAAGGAGAAGACTCTGAAACAAGGAAACATACGGAGATGCTGAGAGATACTACCTCTTTCTCTTTGAACT +TAAGGCTTGTCATTCATGACAACACTCATCCCCCCAGCAAACCAGGCTCCTGCCTAGGCTCAAATCTTTGTG +AATATTCAAAGAACCTCTCTTATCCCAGTATCTGCTAGGGTTTTTTTCACTCTTCTAATAAAAGAGATTTAT +AAAAAATATTCGAGCAAGATAGCAATTGAAGCAACATTAATGAATCTTCCCATTTTAAATCCTGAAACCAAA +AATGTTTAAATGTTTAATTTTTTTTTTGAAATTGGAGAAAAAAGCCTTTGGGAGGTGATGGGATCATAGATA +TTTGTATATGCCCAAATTCATCATTTGTACACATTAAATATGTGCAGTTCTTTTTATAGCAACTATACCTCA +ATAAAGTTGTTTTTTTAAAAAAATCATGTTAGGTGGGTAGTAGGTAAGTAGCCATAGAAATATGTGGTGTTC +ATTCCAGAACTACTTGAAATCTAACAATTTTTATTTAGAAATTCTCAGGGAAAACTAAGCTTTAACAACTAG +TGGATCAAGCCAGAAGTTGGAGAGGAAACTGAGAATGAAACAGAAAGTATCACAGAACAATCATCACCAGAA +AAATACAAAACAAATGACTTCCCAAATCCCTACCCCAGAATGCAAGGGCTATACTTATTTTCACATTGACAA +CTGATTTATCCCAAGGTGGGACCTTAAGACACTTATAGTGACTCAATGGTTTATGTGCTTTCTTTTTCCCCT +TTTAACAGTGAAATGTGCCGTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTG +TCATGATTTTGAAAAACCAATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATGTAGAAGTTTGAAAT +AAAAATCAGCATCCCTCAAAAGTAAAGCACAGTGAGTACAAGGATTAGTAATAAAAGAAACTGAATTAC +>CDS|ENST00000398721/1-183 DEFB133-201 +ATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGGTCCCCATTGCCACCAGGGTGAAATGTGCC +GTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTGTCATGATTTTGAAAAACCA +ATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATG diff --git a/examples/testdata/test_coding2genome_showquerygff.gff2 b/examples/testdata/test_coding2genome_showquerygff.gff2 new file mode 100644 index 0000000..0466da8 --- /dev/null +++ b/examples/testdata/test_coding2genome_showquerygff.gff2 @@ -0,0 +1,76 @@ +##gff-version 2 +##source-version exonerate:coding2genome 2.4.0 +##date 2021-02-03 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +CDS|ENST00000398721/1-183 exonerate:coding2genome similarity 1 183 322 + . alignment_id 0 ; Target ENSG00000214643/1-4245 ; Align 1 822 57 ; Align 61 4040 123 +# --- END OF GFF DUMP --- +# +##FASTA +>ENSG00000214643/1-4245 chromosome:GRCh38:6:49946021:49950265:-1 +CTCCTGCCTCAGCCTCTGGGAGTAGCTGGGACTACAGGGGCCCGCCACCACGCCCGGATAATTTTTTTCTAT +TTTTTAGTAGAGACGGGGTTTCACCGTGTTAGCCGGGACGGTCTTAATCTCCTGACCTAGTTATCCGCCAGC +CTCGGCCTCCCAAAGTGCTGGAATTACGGGTGTGAGTATATTGCTTTTTAAATTCACTAGTTTATTCATTAT +GTATAGCTATTTAAAAAAGAGAAAAACTGTCCTGGCTAACACGGTGAAACCCCGTTTCTACTAAAAATACAA +AAAATTAGCCGGCCTGGTGGCGGGTGCCTGTAGTACCACCTACTCTGGAGGCTGAGGCAGGAGAATGGCGTG +AACCCGGGAGGCAGAGCTTGCAGTGAGTCGCGATCGCGCCACTGAACTCCAGCCTGGGTGACAGAACGAGAC +TCCGTCTCAAAAAAAAAAAAAAAAAAAAAAAAAAGAGAGAGAGAGAGAGAGAGAGAGAAACTAAATCAAAAG +CAAAGATTAAATTCTCATGCTTCTACTTTTCAGACCTTCAATAGGAGATTCTCAGTGGCATGCACTTCCTAG +ACAACCAGTTATTAAAAAGATAATTATATACTATGGATATCATAACCCTTTATATCCCAAGATAAAAGAAAA +GTAATGTCCTGCATTTTTGCCCCAGGCACTGCTAAACAGGAGTGTTAACTTTTGATAAACCCCAGTTTCTAA +ATTCGTACAACTGCATGGAGAGAAGTATAAAAAGATGTGCTCTCCACCTTTCTCTTATTCAAACACTGCAGA +GCTGCTAATTCGGCTGACTGTCTTCAATCATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGG +TCCCCATTGCCACCAGGTAAAATGTAAATATTGAGAGGGTAAAATATCTTTCTGGAGAGTTGCATTTTGGTC +GATGTCAACTGGAGACACAAGAGTGACCAGATTGTTAAGAGAGTGGTTGGTTACGGTCCCAAGAGTAAATCA +CAAATAAAGGACTGTGGTCTTACTAAACAGTAAGGCTCCGGGTGAGTCATATTATTGTATGAGACAATTTAA +AGGCCTTGATTAAATGACTACAGGCTGGTTGTCCAGACTGACTACTTGGATAGAATATTAAAGTATAACCAT +CTGGATCCTTGAGACATTGATGGGCACTGTGTAGTAGAGTAACAGTTGGTTTTTCAGTAACCTCATGATAGG +TTTGGTTATATTATGTCACAAGGTTTACTTTGAGAAAAACACAAAATGGTGTTTTCAACTGATTAAGAATTG +AGAACTTCAGTGGCTGTATTACCTCAGGTCCAATTACATAGCAATTAATACTAACCAGATAATTAAATGAGT +ATAAACTTTGGAATAATTGATACCTGGGTTCAGATTTGGCTTTTGCCATGTATTGGCTATGCAAATCTATCA +GGTTATTTACACTCATTCAGCATCAATTTCCTCATTTGCGAATTAAATACAGTAATTAAGTCTATCTGTAGT +ATTATGACGATTAATGATATTTAAATATACAAAATGCCCAACATAAAGTATAATACACATCAGATTCATCTT +AAATAGTATTATAATTACTTTTACATTGTATTAAAACACCTTAAAAAGCAAGTAACATCTAGAAATCTCATC +GAGAAACTCTTTCTTGACAACTATTGCAGGAAACAGGGGAGGTAATATTTACCATGTTGGATTTCACATACT +TAAACTGTGTACCCTCATTTGTAAACTTTCATTGTACACACTACTATTAGATTAGATCAATAGCCAAAGGAA +GTATCTTGATGGAGATCATCGAAAGAGCTGTTTTAACACATTTCAGGGTACTTATGATAGGAAAAGTATTTT +TCTTATTTATGTAAAGACCCTGTAAACAATCATTTTACACACACCCAAGAAAATAATTCCACTCACCTTAAG +AAAATAAAACAAACAAAAAAATAATAACTATAGGGCATTCTGATTTAGGAGTGGTCTAGAACTGCAAGAGTT +TCCTCTTTGAAGTCCAACTTCATTCCTTAGCAGCACAGATGAGACCAAGGAAGTCTAGCTCTAACAATAAGT +CTGGCTGTGAGTAAACTCAAACATCTAAGTATTTTGGATAAAAGACTCAAATCATTTTAATTGTTTTATAAT +TCAAGTAAAATATGTCAGATGATAATTTTGAGGATTGTTATTTTATTACATCATTCTAAACTCAAGACTAAT +GGAATTACAATCAGGGTTTGTTTTTACTAAAACCATATGGGGGTGATCTTAAAATAAAGAAGACTTATTTAG +TGCAACCACATTTGGATAATAAAATTAGCTCCAGTTATGTTATCATGATTTACATGTGTGCCTCATGTCACT +TGCTTTGGGAAAAAAGGTGAAAATTTTCATGACATTTTCAGTTTCATTATAAACCCAAGAGACATTATGAAT +GTATGTGCATAGATTCATCTAAAAATTGAGAAATTTGTGATTCCTTCTTGTACATAAATAAATTTTTATGTT +ATACATAGCTGTTATCTAGAGAGAAGCTGTTTGTTGTTTTTGTTACTAGTGGAAAAATGCTAATTTACAATT +CCCACTTAAATAATGCTATTCTTTTTTTAATACTAGTGTTTGACAGCTGTCATCTTCTATTATTTGTAAATT +CCAATTAAGTCAACATACATGCTTCACACCCATCATGTAGGACAGTGTAATCTGAGGATGCATTTTTAAGCT +GGCAAGATAATGCTTTTTCCCTCTGGCATCAAAGGCAATAAATAGCATCTCTCTAGATAATACAAATAAAGA +GATATCTATCATTAATTTATACAGTGAAAAAGCATATCTCGTTGCCTAAAATATTTGGCAAAAAATTCAAAA +TAATATGTTCAATTTTTTCCTAAAATGTCTAGTTACTCCAAGTAACAGTAAGACTGTATGCTAACATAACTT +CACTGAAAGCAGATGACATGAATTGGGTTATCAGTACCTTTGACTCCATCTCAGTTGGATCCTATATGTTGA +GCACCTAGAGAAAGAGCACCTTTCACATACCTTTGTCACTGATATTTGATAATTTACCATTACATTTAATGC +TTTAACTTTGGGCGTCTTCCTCCTTATGTGACCTTTCTAAAAATTTAAACATTTTGTGAAGAGATGAAACAT +TAAGTCTTATGGCCAGATGTAGATGAGTTCATCAGCTGGTATATGCTATGATGATGCAATCCTGAGAACTTT +ATAAAGGAGAAGACTCTGAAACAAGGAAACATACGGAGATGCTGAGAGATACTACCTCTTTCTCTTTGAACT +TAAGGCTTGTCATTCATGACAACACTCATCCCCCCAGCAAACCAGGCTCCTGCCTAGGCTCAAATCTTTGTG +AATATTCAAAGAACCTCTCTTATCCCAGTATCTGCTAGGGTTTTTTTCACTCTTCTAATAAAAGAGATTTAT +AAAAAATATTCGAGCAAGATAGCAATTGAAGCAACATTAATGAATCTTCCCATTTTAAATCCTGAAACCAAA +AATGTTTAAATGTTTAATTTTTTTTTTGAAATTGGAGAAAAAAGCCTTTGGGAGGTGATGGGATCATAGATA +TTTGTATATGCCCAAATTCATCATTTGTACACATTAAATATGTGCAGTTCTTTTTATAGCAACTATACCTCA +ATAAAGTTGTTTTTTTAAAAAAATCATGTTAGGTGGGTAGTAGGTAAGTAGCCATAGAAATATGTGGTGTTC +ATTCCAGAACTACTTGAAATCTAACAATTTTTATTTAGAAATTCTCAGGGAAAACTAAGCTTTAACAACTAG +TGGATCAAGCCAGAAGTTGGAGAGGAAACTGAGAATGAAACAGAAAGTATCACAGAACAATCATCACCAGAA +AAATACAAAACAAATGACTTCCCAAATCCCTACCCCAGAATGCAAGGGCTATACTTATTTTCACATTGACAA +CTGATTTATCCCAAGGTGGGACCTTAAGACACTTATAGTGACTCAATGGTTTATGTGCTTTCTTTTTCCCCT +TTTAACAGTGAAATGTGCCGTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTG +TCATGATTTTGAAAAACCAATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATGTAGAAGTTTGAAAT +AAAAATCAGCATCCCTCAAAAGTAAAGCACAGTGAGTACAAGGATTAGTAATAAAAGAAACTGAATTAC +>CDS|ENST00000398721/1-183 DEFB133-201 +ATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGGTCCCCATTGCCACCAGGGTGAAATGTGCC +GTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTGTCATGATTTTGAAAAACCA +ATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATG diff --git a/examples/testdata/test_coding2genome_showtargetgff.gff2 b/examples/testdata/test_coding2genome_showtargetgff.gff2 new file mode 100644 index 0000000..ebb3422 --- /dev/null +++ b/examples/testdata/test_coding2genome_showtargetgff.gff2 @@ -0,0 +1,82 @@ +##gff-version 2 +##source-version exonerate:coding2genome 2.4.0 +##date 2021-02-03 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +ENSG00000214643/1-4245 exonerate:coding2genome gene 822 4162 322 + . gene_id 0 ; sequence CDS|ENST00000398721/1-183 ; gene_orientation + ; identity 100.00 ; similarity 100.00 +ENSG00000214643/1-4245 exonerate:coding2genome cds 822 880 . + . +ENSG00000214643/1-4245 exonerate:coding2genome exon 822 880 . + . insertions 0 ; deletions 0 ; identity 100.00 ; similarity 100.00 +ENSG00000214643/1-4245 exonerate:coding2genome splice5 881 882 . + . intron_id 1 ; splice_site "GT" +ENSG00000214643/1-4245 exonerate:coding2genome intron 881 4038 . + . intron_id 1 +ENSG00000214643/1-4245 exonerate:coding2genome splice3 4037 4038 . + . intron_id 0 ; splice_site "AC" +ENSG00000214643/1-4245 exonerate:coding2genome cds 4039 4162 . + . +ENSG00000214643/1-4245 exonerate:coding2genome exon 4039 4162 . + . insertions 0 ; deletions 0 ; identity 100.00 ; similarity 100.00 +ENSG00000214643/1-4245 exonerate:coding2genome similarity 822 4162 322 + . alignment_id 0 ; Query CDS|ENST00000398721/1-183 ; Align 822 1 57 ; Align 4040 61 123 +##FASTA +>ENSG00000214643/1-4245 chromosome:GRCh38:6:49946021:49950265:-1 +CTCCTGCCTCAGCCTCTGGGAGTAGCTGGGACTACAGGGGCCCGCCACCACGCCCGGATAATTTTTTTCTAT +TTTTTAGTAGAGACGGGGTTTCACCGTGTTAGCCGGGACGGTCTTAATCTCCTGACCTAGTTATCCGCCAGC +CTCGGCCTCCCAAAGTGCTGGAATTACGGGTGTGAGTATATTGCTTTTTAAATTCACTAGTTTATTCATTAT +GTATAGCTATTTAAAAAAGAGAAAAACTGTCCTGGCTAACACGGTGAAACCCCGTTTCTACTAAAAATACAA +AAAATTAGCCGGCCTGGTGGCGGGTGCCTGTAGTACCACCTACTCTGGAGGCTGAGGCAGGAGAATGGCGTG +AACCCGGGAGGCAGAGCTTGCAGTGAGTCGCGATCGCGCCACTGAACTCCAGCCTGGGTGACAGAACGAGAC +TCCGTCTCAAAAAAAAAAAAAAAAAAAAAAAAAAGAGAGAGAGAGAGAGAGAGAGAGAAACTAAATCAAAAG +CAAAGATTAAATTCTCATGCTTCTACTTTTCAGACCTTCAATAGGAGATTCTCAGTGGCATGCACTTCCTAG +ACAACCAGTTATTAAAAAGATAATTATATACTATGGATATCATAACCCTTTATATCCCAAGATAAAAGAAAA +GTAATGTCCTGCATTTTTGCCCCAGGCACTGCTAAACAGGAGTGTTAACTTTTGATAAACCCCAGTTTCTAA +ATTCGTACAACTGCATGGAGAGAAGTATAAAAAGATGTGCTCTCCACCTTTCTCTTATTCAAACACTGCAGA +GCTGCTAATTCGGCTGACTGTCTTCAATCATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGG +TCCCCATTGCCACCAGGTAAAATGTAAATATTGAGAGGGTAAAATATCTTTCTGGAGAGTTGCATTTTGGTC +GATGTCAACTGGAGACACAAGAGTGACCAGATTGTTAAGAGAGTGGTTGGTTACGGTCCCAAGAGTAAATCA +CAAATAAAGGACTGTGGTCTTACTAAACAGTAAGGCTCCGGGTGAGTCATATTATTGTATGAGACAATTTAA +AGGCCTTGATTAAATGACTACAGGCTGGTTGTCCAGACTGACTACTTGGATAGAATATTAAAGTATAACCAT +CTGGATCCTTGAGACATTGATGGGCACTGTGTAGTAGAGTAACAGTTGGTTTTTCAGTAACCTCATGATAGG +TTTGGTTATATTATGTCACAAGGTTTACTTTGAGAAAAACACAAAATGGTGTTTTCAACTGATTAAGAATTG +AGAACTTCAGTGGCTGTATTACCTCAGGTCCAATTACATAGCAATTAATACTAACCAGATAATTAAATGAGT +ATAAACTTTGGAATAATTGATACCTGGGTTCAGATTTGGCTTTTGCCATGTATTGGCTATGCAAATCTATCA +GGTTATTTACACTCATTCAGCATCAATTTCCTCATTTGCGAATTAAATACAGTAATTAAGTCTATCTGTAGT +ATTATGACGATTAATGATATTTAAATATACAAAATGCCCAACATAAAGTATAATACACATCAGATTCATCTT +AAATAGTATTATAATTACTTTTACATTGTATTAAAACACCTTAAAAAGCAAGTAACATCTAGAAATCTCATC +GAGAAACTCTTTCTTGACAACTATTGCAGGAAACAGGGGAGGTAATATTTACCATGTTGGATTTCACATACT +TAAACTGTGTACCCTCATTTGTAAACTTTCATTGTACACACTACTATTAGATTAGATCAATAGCCAAAGGAA +GTATCTTGATGGAGATCATCGAAAGAGCTGTTTTAACACATTTCAGGGTACTTATGATAGGAAAAGTATTTT +TCTTATTTATGTAAAGACCCTGTAAACAATCATTTTACACACACCCAAGAAAATAATTCCACTCACCTTAAG +AAAATAAAACAAACAAAAAAATAATAACTATAGGGCATTCTGATTTAGGAGTGGTCTAGAACTGCAAGAGTT +TCCTCTTTGAAGTCCAACTTCATTCCTTAGCAGCACAGATGAGACCAAGGAAGTCTAGCTCTAACAATAAGT +CTGGCTGTGAGTAAACTCAAACATCTAAGTATTTTGGATAAAAGACTCAAATCATTTTAATTGTTTTATAAT +TCAAGTAAAATATGTCAGATGATAATTTTGAGGATTGTTATTTTATTACATCATTCTAAACTCAAGACTAAT +GGAATTACAATCAGGGTTTGTTTTTACTAAAACCATATGGGGGTGATCTTAAAATAAAGAAGACTTATTTAG +TGCAACCACATTTGGATAATAAAATTAGCTCCAGTTATGTTATCATGATTTACATGTGTGCCTCATGTCACT +TGCTTTGGGAAAAAAGGTGAAAATTTTCATGACATTTTCAGTTTCATTATAAACCCAAGAGACATTATGAAT +GTATGTGCATAGATTCATCTAAAAATTGAGAAATTTGTGATTCCTTCTTGTACATAAATAAATTTTTATGTT +ATACATAGCTGTTATCTAGAGAGAAGCTGTTTGTTGTTTTTGTTACTAGTGGAAAAATGCTAATTTACAATT +CCCACTTAAATAATGCTATTCTTTTTTTAATACTAGTGTTTGACAGCTGTCATCTTCTATTATTTGTAAATT +CCAATTAAGTCAACATACATGCTTCACACCCATCATGTAGGACAGTGTAATCTGAGGATGCATTTTTAAGCT +GGCAAGATAATGCTTTTTCCCTCTGGCATCAAAGGCAATAAATAGCATCTCTCTAGATAATACAAATAAAGA +GATATCTATCATTAATTTATACAGTGAAAAAGCATATCTCGTTGCCTAAAATATTTGGCAAAAAATTCAAAA +TAATATGTTCAATTTTTTCCTAAAATGTCTAGTTACTCCAAGTAACAGTAAGACTGTATGCTAACATAACTT +CACTGAAAGCAGATGACATGAATTGGGTTATCAGTACCTTTGACTCCATCTCAGTTGGATCCTATATGTTGA +GCACCTAGAGAAAGAGCACCTTTCACATACCTTTGTCACTGATATTTGATAATTTACCATTACATTTAATGC +TTTAACTTTGGGCGTCTTCCTCCTTATGTGACCTTTCTAAAAATTTAAACATTTTGTGAAGAGATGAAACAT +TAAGTCTTATGGCCAGATGTAGATGAGTTCATCAGCTGGTATATGCTATGATGATGCAATCCTGAGAACTTT +ATAAAGGAGAAGACTCTGAAACAAGGAAACATACGGAGATGCTGAGAGATACTACCTCTTTCTCTTTGAACT +TAAGGCTTGTCATTCATGACAACACTCATCCCCCCAGCAAACCAGGCTCCTGCCTAGGCTCAAATCTTTGTG +AATATTCAAAGAACCTCTCTTATCCCAGTATCTGCTAGGGTTTTTTTCACTCTTCTAATAAAAGAGATTTAT +AAAAAATATTCGAGCAAGATAGCAATTGAAGCAACATTAATGAATCTTCCCATTTTAAATCCTGAAACCAAA +AATGTTTAAATGTTTAATTTTTTTTTTGAAATTGGAGAAAAAAGCCTTTGGGAGGTGATGGGATCATAGATA +TTTGTATATGCCCAAATTCATCATTTGTACACATTAAATATGTGCAGTTCTTTTTATAGCAACTATACCTCA +ATAAAGTTGTTTTTTTAAAAAAATCATGTTAGGTGGGTAGTAGGTAAGTAGCCATAGAAATATGTGGTGTTC +ATTCCAGAACTACTTGAAATCTAACAATTTTTATTTAGAAATTCTCAGGGAAAACTAAGCTTTAACAACTAG +TGGATCAAGCCAGAAGTTGGAGAGGAAACTGAGAATGAAACAGAAAGTATCACAGAACAATCATCACCAGAA +AAATACAAAACAAATGACTTCCCAAATCCCTACCCCAGAATGCAAGGGCTATACTTATTTTCACATTGACAA +CTGATTTATCCCAAGGTGGGACCTTAAGACACTTATAGTGACTCAATGGTTTATGTGCTTTCTTTTTCCCCT +TTTAACAGTGAAATGTGCCGTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTG +TCATGATTTTGAAAAACCAATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATGTAGAAGTTTGAAAT +AAAAATCAGCATCCCTCAAAAGTAAAGCACAGTGAGTACAAGGATTAGTAATAAAAGAAACTGAATTAC +>CDS|ENST00000398721/1-183 DEFB133-201 +ATGAAGATTCACGTCTTTCTCTTTGTTTTATTTTTCTTTCTGGTCCCCATTGCCACCAGGGTGAAATGTGCC +GTGAAAGACACCTATAGTTGCTTTATCATGAGAGGCAAATGTCGACATGAGTGTCATGATTTTGAAAAACCA +ATTGGTTTCTGCACAAAACTAAATGCCAACTGTTATATG diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java index b753e94..0975750 100644 --- a/test/jalview/io/FeaturesFileTest.java +++ b/test/jalview/io/FeaturesFileTest.java @@ -242,6 +242,48 @@ public class FeaturesFileTest assertEquals(2f, sf.getScore(), 0.001f); } + @Test(groups = { "Functional" }) + public void testImportGFF2ExonerateCDSAndCoding2Genome() + throws IOException + { + /* + * test assumes sequence 1 in imported alignment is a + * transcript shorter and aligned to exons on locus (sequence 0) + * + * exonerate script was - where mode was query or target + * exonerate --showvulgar false --showalignment false --show${mode}gff ... > test_${mode}.gff2 + * echo '##FASTA' >> test_${mode}.gff2 + * cat example_Locus.fa example_CDS.fa >> test_${mode}.gff2 + * [ then edit out stuff before gff-version-2 header and the end of exonerate lines after the gff dump ] + */ + String[][] testFiles = new String[][] { + { "test_cdna2genome_showquerygff.gff2", + "test_cdna2genome_showtargetgff.gff2" }, + { "test_coding2genome_showquerygff.gff2", + "test_coding2genome_showtargetgff.gff2" } }; + + for (String[] testfilepair : testFiles) + { + FormatAdapter fa = new FormatAdapter(); + AlignmentI al = fa.readFile("examples/testdata/" + testfilepair[0], + DataSourceType.FILE, FileFormat.Features); + + assertEquals(2, al.getHeight()); + // check there are gaps in sequence 1 + assertTrue(al.getSequenceAt(1).getSequenceAsString().contains(""+al.getGapCharacter())); + assertTrue(al.isAligned()); + + AlignmentI al2 = fa.readFile("examples/testdata/" + testfilepair[1], + DataSourceType.FILE, FileFormat.Features); + + assertEquals(2, al2.getHeight()); + assertTrue(al2.isAligned()); + // check sequence 1 is identical for alignment imported from both query and target gff + assertEquals(al.getSequenceAt(1).getSequenceAsString(), + al2.getSequenceAt(1).getSequenceAsString()); + } + } + public static AlignmentI readAlignmentFile(File f) throws IOException { System.out.println("Reading file: " + f); -- 1.7.10.2