# HG changeset patch # User iuc # Date 1583056114 18000 # Node ID a03dead1bedee831db80eeee1de34e4c383ff9c2 # Parent b03ae2ba8688026ebb5b3c67c460cb923a2d1933 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/exonerate commit a141c63903d1a598569985e400125d4e7de42801" diff -r b03ae2ba8688 -r a03dead1bede exonerate.xml --- a/exonerate.xml Fri Jun 28 11:21:08 2019 -0400 +++ b/exonerate.xml Sun Mar 01 04:48:34 2020 -0500 @@ -1,4 +1,4 @@ - + pairwise sequence comparison macros.xml @@ -32,6 +32,16 @@ --querytype dna --targettype dna #end if + #if $minintron + --minintron ${minintron} + #end if + + #if $maxintron + --maxintron ${maxintron} + #end if + + --cores \${GALAXY_SLOTS:-1} + #if str($outformat) == "alignment" --showalignment yes --showvulgar no > '${output_ali}' #elif str($outformat) == "targetgff" @@ -40,7 +50,10 @@ --showalignment no --showvulgar no --showtargetgff no --showquerygff yes > '${output_gff}' #end if - --cores \${GALAXY_SLOTS:-1} + ## Produce a more standard GFF3 + #if str($outformat) in ["targetgff", "querygff"] + && python '$__tool_directory__/exonerategff_to_gff3.py' '${output_gff}' > '${output_gff3}' + #end if ]]> @@ -83,9 +96,14 @@ + + - + + outformat != 'alignment' + + outformat != 'alignment' @@ -101,6 +119,7 @@ + @@ -110,6 +129,7 @@ + @@ -119,6 +139,7 @@ + @@ -138,6 +159,7 @@ + @@ -148,6 +170,7 @@ + @@ -158,6 +181,20 @@ + + + + + + + + + + + + + + last_utr['start']: + cds_feature = SeqFeature(FeatureLocation(feature.location.start, last_utr['start']), type="CDS", strand=feature.location.strand) + cds_feature.sub_features = [] + cds_feature.qualifiers['source'] = feature.qualifiers['source'] + cds_feature.qualifiers['ID'] = mrna_id + "_CDS" + mrna_feature.sub_features.append(cds_feature) + if feature.location.end < last_utr['end']: + cds_feature = SeqFeature(FeatureLocation(feature.location.end, last_utr['end']), type="CDS", strand=feature.location.strand) + cds_feature.sub_features = [] + cds_feature.qualifiers['source'] = feature.qualifiers['source'] + cds_feature.qualifiers['ID'] = mrna_id + "_CDS" + mrna_feature.sub_features.append(cds_feature) + + last_utr = None + + elif feature.type == 'similarity': + if current_gene is None: + # We haven't seen any gene, just convert similarity to match + feature.type = 'match' + kept_features.append(feature) + + last_utr = None + + elif feature.type not in ['splice3', 'splice5', 'similarity', 'intron']: + mrna_feature.sub_features.append(feature) + last_utr = None + + # For the last one + if current_gene: + kept_features.append(current_gene) + + scaff.features = kept_features + + if len(kept_features): + GFF.write([scaff], args.outfile) diff -r b03ae2ba8688 -r a03dead1bede macros.xml --- a/macros.xml Fri Jun 28 11:21:08 2019 -0400 +++ b/macros.xml Sun Mar 01 04:48:34 2020 -0500 @@ -3,6 +3,8 @@ exonerate + python + bcbiogff diff -r b03ae2ba8688 -r a03dead1bede test-data/coding2coding.gff --- a/test-data/coding2coding.gff Fri Jun 28 11:21:08 2019 -0400 +++ b/test-data/coding2coding.gff Sun Mar 01 04:48:34 2020 -0500 @@ -3,7 +3,7 @@ # ##gff-version 2 ##source-version exonerate:coding2coding 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -17,7 +17,7 @@ # ##gff-version 2 ##source-version exonerate:coding2coding 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # diff -r b03ae2ba8688 -r a03dead1bede test-data/coding2coding.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/coding2coding.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,3 @@ +##gff-version 3 +sample exonerate:coding2coding match 1 3536 6207 + . Align=1 1 2463,2466 2464 3,2469 2469 1068;Query=sample;alignment_id=1 +sample exonerate:coding2coding match 2 3535 6151 - . Align=3536 3536 3534;Query=sample;alignment_id=1 diff -r b03ae2ba8688 -r a03dead1bede test-data/est2genome.gff --- a/test-data/est2genome.gff Fri Jun 28 11:21:08 2019 -0400 +++ b/test-data/est2genome.gff Sun Mar 01 04:48:34 2020 -0500 @@ -3,7 +3,7 @@ # ##gff-version 2 ##source-version exonerate:est2genome 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -19,7 +19,7 @@ # ##gff-version 2 ##source-version exonerate:est2genome 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # diff -r b03ae2ba8688 -r a03dead1bede test-data/est2genome.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/est2genome.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,11 @@ +##gff-version 3 +sample exonerate:est2genome gene 2742 2819 102 - . ID=gene_1;gene_id=1;identity=58.97;sequence=sample;similarity=58.97 +sample exonerate:est2genome mRNA 2742 2819 . - . ID=mRNA_1;Parent=gene_1 +sample exonerate:est2genome exon 2742 2819 . - . ID=mRNA_1_exon_1;Parent=mRNA_1;deletions=0;identity=58.97;insertions=0;similarity=58.97 +sample exonerate:est2genome CDS 2742 2819 . - 0 ID=mRNA_1_CDS;Parent=mRNA_1 +sample exonerate:est2genome gene 758 3050 7309 + . ID=gene_2;gene_id=1;identity=99.93;sequence=sample;similarity=99.93 +sample exonerate:est2genome mRNA 758 3050 . + . ID=mRNA_2;Parent=gene_2 +sample exonerate:est2genome five_prime_UTR 758 1332 . + . ID=mRNA_2_five_prime_UTR;Parent=mRNA_2 +sample exonerate:est2genome exon 758 1332 . + . ID=mRNA_2_exon_1;Parent=mRNA_2;deletions=2;identity=99.83;insertions=0;similarity=99.83 +sample exonerate:est2genome exon 2152 3050 . + . ID=mRNA_2_exon_2;Parent=mRNA_2;deletions=0;identity=100.00;insertions=0;similarity=100.00 +sample exonerate:est2genome CDS 2152 3050 . + 0 ID=mRNA_2_CDS;Parent=mRNA_2 diff -r b03ae2ba8688 -r a03dead1bede test-data/est2genome_introns.gff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/est2genome_introns.gff Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,48 @@ +# --- START OF GFF DUMP --- +# +# +##gff-version 2 +##source-version exonerate:est2genome 2.4.0 +##date 2020-02-26 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +sample exonerate:est2genome gene 2742 2819 102 - . gene_id 1 ; sequence sample ; gene_orientation . ; identity 58.97 ; similarity 58.97 +sample exonerate:est2genome exon 2742 2819 . - . insertions 0 ; deletions 0 ; identity 58.97 ; similarity 58.97 +sample exonerate:est2genome similarity 2742 2819 102 - . alignment_id 1 ; Query sample ; Align 2820 1168 78 +# --- END OF GFF DUMP --- +# +# --- START OF GFF DUMP --- +# +# +##gff-version 2 +##source-version exonerate:est2genome 2.4.0 +##date 2020-02-26 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +sample exonerate:est2genome gene 2146 3050 4525 + . gene_id 1 ; sequence sample ; gene_orientation . ; identity 100.00 ; similarity 100.00 +sample exonerate:est2genome exon 2146 3050 . + . insertions 0 ; deletions 0 ; identity 100.00 ; similarity 100.00 +sample exonerate:est2genome similarity 2146 3050 4525 + . alignment_id 1 ; Query sample ; Align 2146 572 905 +# --- END OF GFF DUMP --- +# +# --- START OF GFF DUMP --- +# +# +##gff-version 2 +##source-version exonerate:est2genome 2.4.0 +##date 2020-02-26 +##type DNA +# +# +# seqname source feature start end score strand frame attributes +# +sample exonerate:est2genome gene 758 1357 2861 + . gene_id 2 ; sequence sample ; gene_orientation . ; identity 98.33 ; similarity 98.33 +sample exonerate:est2genome exon 758 1357 . + . insertions 1 ; deletions 4 ; identity 98.33 ; similarity 98.33 +sample exonerate:est2genome similarity 758 1357 2861 + . alignment_id 2 ; Query sample ; Align 758 1 572 ; Align 1330 575 14 ; Align 1345 589 8 ; Align 1353 599 5 +# --- END OF GFF DUMP --- +# diff -r b03ae2ba8688 -r a03dead1bede test-data/est2genome_introns.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/est2genome_introns.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,13 @@ +##gff-version 3 +sample exonerate:est2genome gene 2742 2819 102 - . ID=gene_1;gene_id=1;identity=58.97;sequence=sample;similarity=58.97 +sample exonerate:est2genome mRNA 2742 2819 . - . ID=mRNA_1;Parent=gene_1 +sample exonerate:est2genome exon 2742 2819 . - . ID=mRNA_1_exon_1;Parent=mRNA_1;deletions=0;identity=58.97;insertions=0;similarity=58.97 +sample exonerate:est2genome CDS 2742 2819 . - 0 ID=mRNA_1_CDS;Parent=mRNA_1 +sample exonerate:est2genome gene 2146 3050 4525 + . ID=gene_2;gene_id=1;identity=100.00;sequence=sample;similarity=100.00 +sample exonerate:est2genome mRNA 2146 3050 . + . ID=mRNA_2;Parent=gene_2 +sample exonerate:est2genome exon 2146 3050 . + . ID=mRNA_2_exon_1;Parent=mRNA_2;deletions=0;identity=100.00;insertions=0;similarity=100.00 +sample exonerate:est2genome CDS 2146 3050 . + 0 ID=mRNA_2_CDS;Parent=mRNA_2 +sample exonerate:est2genome gene 758 1357 2861 + . ID=gene_3;gene_id=2;identity=98.33;sequence=sample;similarity=98.33 +sample exonerate:est2genome mRNA 758 1357 . + . ID=mRNA_3;Parent=gene_3 +sample exonerate:est2genome exon 758 1357 . + . ID=mRNA_3_exon_1;Parent=mRNA_3;deletions=4;identity=98.33;insertions=1;similarity=98.33 +sample exonerate:est2genome CDS 758 1357 . + 0 ID=mRNA_3_CDS;Parent=mRNA_3 diff -r b03ae2ba8688 -r a03dead1bede test-data/out_query.gff --- a/test-data/out_query.gff Fri Jun 28 11:21:08 2019 -0400 +++ b/test-data/out_query.gff Sun Mar 01 04:48:34 2020 -0500 @@ -3,7 +3,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -17,7 +17,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -31,7 +31,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -45,7 +45,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # diff -r b03ae2ba8688 -r a03dead1bede test-data/out_query.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out_query.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,5 @@ +##gff-version 3 +sample exonerate:ungapped:dna2dna match 1 3536 17680 + . Align=1 1 3536;Target=sample;alignment_id=1 +sample exonerate:ungapped:dna2dna match 608 634 108 + . Align=608 596 27;Target=sample;alignment_id=2 +sample exonerate:ungapped:dna2dna match 596 622 108 + . Align=596 608 27;Target=sample;alignment_id=3 +sample exonerate:ungapped:dna2dna match 2742 2819 102 + . Align=2742 2820 78;Target=sample;alignment_id=1 diff -r b03ae2ba8688 -r a03dead1bede test-data/out_target.gff --- a/test-data/out_target.gff Fri Jun 28 11:21:08 2019 -0400 +++ b/test-data/out_target.gff Sun Mar 01 04:48:34 2020 -0500 @@ -3,7 +3,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -17,7 +17,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -31,7 +31,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # @@ -45,7 +45,7 @@ # ##gff-version 2 ##source-version exonerate:ungapped:dna2dna 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # diff -r b03ae2ba8688 -r a03dead1bede test-data/out_target.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out_target.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,5 @@ +##gff-version 3 +sample exonerate:ungapped:dna2dna match 1 3536 17680 + . Align=1 1 3536;Query=sample;alignment_id=1 +sample exonerate:ungapped:dna2dna match 596 622 108 + . Align=596 608 27;Query=sample;alignment_id=2 +sample exonerate:ungapped:dna2dna match 608 634 108 + . Align=608 596 27;Query=sample;alignment_id=3 +sample exonerate:ungapped:dna2dna match 2742 2819 102 - . Align=2820 2742 78;Query=sample;alignment_id=1 diff -r b03ae2ba8688 -r a03dead1bede test-data/protein2genome.gff --- a/test-data/protein2genome.gff Fri Jun 28 11:21:08 2019 -0400 +++ b/test-data/protein2genome.gff Sun Mar 01 04:48:34 2020 -0500 @@ -3,7 +3,7 @@ # ##gff-version 2 ##source-version exonerate:protein2genome:local 2.4.0 -##date 2018-08-02 +##date 2020-02-26 ##type DNA # # diff -r b03ae2ba8688 -r a03dead1bede test-data/protein2genome.gff3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/protein2genome.gff3 Sun Mar 01 04:48:34 2020 -0500 @@ -0,0 +1,9 @@ +##gff-version 3 +sample exonerate:protein2genome:local gene 1181 2291 456 + . ID=gene_1;gene_id=1;identity=98.97;sequence=sample;similarity=100.00 +sample exonerate:protein2genome:local mRNA 1181 2291 . + . ID=mRNA_1;Parent=gene_1 +sample exonerate:protein2genome:local cds 1181 1326 . + . Parent=mRNA_1 +sample exonerate:protein2genome:local exon 1181 1326 . + . ID=mRNA_1_exon_1;Parent=mRNA_1;deletions=0;identity=100.00;insertions=0;similarity=100.00 +sample exonerate:protein2genome:local CDS 1181 1326 . + 0 ID=mRNA_1_CDS;Parent=mRNA_1 +sample exonerate:protein2genome:local cds 2144 2291 . + . Parent=mRNA_1 +sample exonerate:protein2genome:local exon 2144 2291 . + . ID=mRNA_1_exon_2;Parent=mRNA_1;deletions=0;identity=97.96;insertions=0;similarity=100.00 +sample exonerate:protein2genome:local CDS 2144 2291 . + 0 ID=mRNA_1_CDS;Parent=mRNA_1