Repository 'snpeff'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/snpeff

Changeset 21:de67e5082c48 (2019-10-15)
Previous changeset 20:8f92c2b26e6d (2019-01-25) Next changeset 22:268d162b9c49 (2019-10-18)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpeff commit aeb660e92b9eb60dc5f90a2078f552018cca96e0"
modified:
snpEff_create_db.xml
added:
test-data/Saccharomyces_mito.fa.gz
test-data/Saccharomyces_mito.gtf
b
diff -r 8f92c2b26e6d -r de67e5082c48 snpEff_create_db.xml
--- a/snpEff_create_db.xml Fri Jan 25 12:29:48 2019 -0500
+++ b/snpEff_create_db.xml Tue Oct 15 14:12:54 2019 -0400
[
@@ -1,4 +1,4 @@
-<tool id="snpEff_build_gb" name="SnpEff build:" version="@WRAPPER_VERSION@.galaxy3">
+<tool id="snpEff_build_gb" name="SnpEff build:" version="@WRAPPER_VERSION@.galaxy4">
     <description> database from Genbank or GFF record</description>
     <macros>
         <import>snpEff_macros.xml</import>
@@ -32,12 +32,27 @@
                 ln -s '${input_type.input_gbk}' '${snpeff_output.files_path}'/'${genome_version}'/genes.gbk.gz &&
             #end if
         #elif str( $input_type.input_type_selector ) == "gff":
-            #if $input_type.input_fasta.is_of_type("fasta"):
-                ln -s '${input_type.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa &&
-            #elif $input_type.input_fasta.is_of_type("fasta.gz"):
-                ln -s '${input_type.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa.gz &&
-            #end if
+         #if $input_type.reference_source.reference_source_selector == "history":
+   #if $input_type.reference_source.input_fasta.is_of_type("fasta"):
+                ln -s '${input_type.reference_source.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa &&
+             #elif $input_type.reference_source.input_fasta.is_of_type("fasta.gz"):
+                 ln -s '${input_type.reference_source.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa.gz &&
+             #end if
+ #elif $input_type.reference_source.reference_source_selector == "cached":
+   ln -s '${input_type.reference_source.ref_file.fields.path}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa &&
+ #end if
             ln -s '${input_type.input_gff}' '${snpeff_output.files_path}'/'${genome_version}'/genes.gff &&
+        #elif str( $input_type.input_type_selector ) == "gtf":
+         #if $input_type.reference_source.reference_source_selector == "history":
+   #if $input_type.reference_source.input_fasta.is_of_type("fasta"):
+                ln -s '${input_type.reference_source.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa &&
+             #elif $input_type.reference_source.input_fasta.is_of_type("fasta.gz"):
+                 ln -s '${input_type.reference_source.input_fasta}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa.gz &&
+             #end if
+ #elif $input_type.reference_source.reference_source_selector == "cached":
+   ln -s '${input_type.reference_source.ref_file.fields.path}' '${snpeff_output.files_path}'/'${genome_version}'/sequences.fa &&
+ #end if
+            ln -s '${input_type.input_gtf}' '${snpeff_output.files_path}'/'${genome_version}'/genes.gtf &&
         #end if
 
         snpEff @JAVA_OPTIONS@ build -v
@@ -47,6 +62,8 @@
             -genbank
         #elif str( $input_type.input_type_selector ) == "gff":
             -gff3
+        #elif str( $input_type.input_type_selector ) == "gtf":
+            -gtf22
         #end if
         -dataDir '${snpeff_output.files_path}' '${genome_version}' &&
         echo "${genome_version}.genome : ${genome_version}" >> '${snpeff_output.files_path}'/snpEff.config &&
@@ -61,6 +78,7 @@
             <param name="input_type_selector" type="select" display="radio" label="Input annotations are in" help="Specify format for annotations you are using to create SnpEff database">
                 <option value="gb" selected="true">GenBank</option>
                 <option value="gff">GFF</option>
+                <option value="gtf">GTF</option>
             </param>
             <when value="gb">
                 <param name="input_gbk" type="data" format="genbank,genbank.gz" label="Genbank dataset to build database from" help="This Genbank file will be used to generate snpEff database"/>
@@ -72,7 +90,37 @@
             </when>
             <when value="gff">
                 <param name="input_gff" type="data" format="gff3" label="GFF dataset to build database from" help="This GFF file will be used to generate snpEff database"/>
-                <param name="input_fasta" type="data" format="fasta,fasta.gz" label="Genome in FASTA format" help="This dataset is required for generating SnpEff database. See help section below."/>
+                <conditional name="reference_source">
+             <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
+                 <option value="cached">Locally cached</option>
+                 <option value="history">History</option>
+             </param>
+             <when value="cached">
+                 <param name="ref_file" type="select" label="Select reference genome">
+                     <options from_data_table="fasta_indexes"/>
+                 </param>
+             </when>
+             <when value="history"> 
+                 <param name="input_fasta" type="data" format="fasta,fasta.gz" label="Genome in FASTA format" help="This dataset is required for generating SnpEff database. See help section below."/>
+             </when>
+         </conditional>
+            </when>
+            <when value="gtf">
+                <param name="input_gtf" type="data" format="gtf" label="GTF dataset to build database from" help="This GTF file will be used to generate snpEff database"/>
+                <conditional name="reference_source">
+             <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
+                 <option value="cached">Locally cached</option>
+                 <option value="history">History</option>
+             </param>
+             <when value="cached">
+                 <param name="ref_file" type="select" label="Select reference genome">
+                     <options from_data_table="fasta_indexes"/>
+                 </param>
+             </when>
+             <when value="history"> 
+                 <param name="input_fasta" type="data" format="fasta,fasta.gz" label="Genome in FASTA format" help="This dataset is required for generating SnpEff database. See help section below."/>
+             </when>
+         </conditional>
             </when>
         </conditional>
         <param name="codon_table" type="select" label="Select genetic code for this sequence" help="If this sequence uses non-standard genetic code, select one from these options">
@@ -136,6 +184,7 @@
         <test>
             <param name="genome_version" value="pBR322"/>
             <param name="input_type_selector" value="gff"/>
+            <param name="reference_source_selector" value="history"/>
             <param name="input_fasta" value="pBR322_test2.fna" />
             <param name="input_gff" value="pBR322.gff3" />
             <output name="snpeff_output">
@@ -147,6 +196,7 @@
         <test>
             <param name="genome_version" value="pBR322"/>
             <param name="input_type_selector" value="gff"/>
+            <param name="reference_source_selector" value="history"/>
             <param name="input_fasta" value="pBR322_test2.fna.gz" />
             <param name="input_gff" value="pBR322.gff3" />
             <output name="snpeff_output">
@@ -155,6 +205,18 @@
                 </assert_contents>
             </output>
         </test>
+        <test>
+            <param name="genome_version" value="Saccharomyces_mito"/>
+            <param name="input_type_selector" value="gtf"/>
+            <param name="reference_source_selector" value="history"/>
+            <param name="input_fasta" value="Saccharomyces_mito.fa.gz" />
+            <param name="input_gtf" value="Saccharomyces_mito.gtf" />
+            <output name="snpeff_output">
+                <assert_contents>
+                    <has_text text="Saccharomyces_mito" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[
 **What it does**
b
diff -r 8f92c2b26e6d -r de67e5082c48 test-data/Saccharomyces_mito.fa.gz
b
Binary file test-data/Saccharomyces_mito.fa.gz has changed
b
diff -r 8f92c2b26e6d -r de67e5082c48 test-data/Saccharomyces_mito.gtf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/Saccharomyces_mito.gtf Tue Oct 15 14:12:54 2019 -0400
b
b'@@ -0,0 +1,312 @@\n+Mito\tsgd\tgene\t731\t802\t.\t+\t.\tgene_id "tP(UGG)Q"; gene_source "sgd"; gene_biotype "tRNA";\n+Mito\tsgd\ttranscript\t731\t802\t.\t+\t.\tgene_id "tP(UGG)Q"; transcript_id "tP(UGG)Q_tRNA"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA";\n+Mito\tsgd\texon\t731\t802\t.\t+\t.\tgene_id "tP(UGG)Q"; transcript_id "tP(UGG)Q_tRNA"; exon_number "1"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA"; exon_id "tP(UGG)Q_tRNA-E1";\n+Mito\tsgd\tgene\t3952\t4338\t.\t+\t.\tgene_id "Q0010"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding";\n+Mito\tsgd\ttranscript\t3952\t4338\t.\t+\t.\tgene_id "Q0010"; transcript_id "Q0010_mRNA"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\texon\t3952\t4338\t.\t+\t.\tgene_id "Q0010"; transcript_id "Q0010_mRNA"; exon_number "1"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; exon_id "Q0010_mRNA-E1";\n+Mito\tsgd\tCDS\t3952\t4335\t.\t+\t0\tgene_id "Q0010"; transcript_id "Q0010_mRNA"; exon_number "1"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; protein_id "Q0010";\n+Mito\tsgd\tstart_codon\t3952\t3954\t.\t+\t0\tgene_id "Q0010"; transcript_id "Q0010_mRNA"; exon_number "1"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tstop_codon\t4336\t4338\t.\t+\t0\tgene_id "Q0010"; transcript_id "Q0010_mRNA"; exon_number "1"; gene_name "Q0010"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tgene\t4254\t4415\t.\t+\t.\tgene_id "Q0017"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding";\n+Mito\tsgd\ttranscript\t4254\t4415\t.\t+\t.\tgene_id "Q0017"; transcript_id "Q0017_mRNA"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\texon\t4254\t4415\t.\t+\t.\tgene_id "Q0017"; transcript_id "Q0017_mRNA"; exon_number "1"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; exon_id "Q0017_mRNA-E1";\n+Mito\tsgd\tCDS\t4254\t4412\t.\t+\t0\tgene_id "Q0017"; transcript_id "Q0017_mRNA"; exon_number "1"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; protein_id "Q0017";\n+Mito\tsgd\tstart_codon\t4254\t4256\t.\t+\t0\tgene_id "Q0017"; transcript_id "Q0017_mRNA"; exon_number "1"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tstop_codon\t4413\t4415\t.\t+\t0\tgene_id "Q0017"; transcript_id "Q0017_mRNA"; exon_number "1"; gene_name "Q0017"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tgene\t6546\t8194\t.\t+\t.\tgene_id "Q0020"; gene_name "15S_RRNA"; gene_source "sgd"; gene_biotype "rRNA";\n+Mito\tsgd\ttranscript\t6546\t8194\t.\t+\t.\tgene_id "Q0020"; transcript_id "Q0020_rRNA"; gene_name "15S_RRNA"; gene_source "sgd"; gene_biotype "rRNA"; transcript_source "sgd"; transcript_biotype "rRNA";\n+Mito\tsgd\texon\t6546\t8194\t.\t+\t.\tgene_id "Q0020"; transcript_id "Q0020_rRNA"; exon_number "1"; gene_name "15S_RRNA"; gene_source "sgd"; gene_biotype "rRNA"; transcript_source "sgd"; transcript_biotype "rRNA"; exon_id "Q0020_rRNA-E1";\n+Mito\tsgd\tgene\t9374\t9447\t.\t+\t.\tgene_id "tW(UCA)Q"; gene_source "sgd"; gene_biotype "tRNA";\n+Mito\tsgd\ttranscript\t9374\t9447\t.\t+\t.\tgene_id "tW(UCA)Q"; transcript_id "tW(UCA)Q_tRNA"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA";\n+Mito\tsgd\texon\t9374\t9447\t.\t+\t.\tgene_id "tW(UCA)Q"; transcript_id "tW(UCA)Q_tRNA"; exon_number "1"; gene_source "sgd"; gene'..b'"; gene_biotype "tRNA";\n+Mito\tsgd\ttranscript\t78533\t78608\t.\t+\t.\tgene_id "tV(UAC)Q"; transcript_id "tV(UAC)Q_tRNA"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA";\n+Mito\tsgd\texon\t78533\t78608\t.\t+\t.\tgene_id "tV(UAC)Q"; transcript_id "tV(UAC)Q_tRNA"; exon_number "1"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA"; exon_id "tV(UAC)Q_tRNA-E1";\n+Mito\tsgd\tgene\t79213\t80022\t.\t+\t.\tgene_id "Q0275"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding";\n+Mito\tsgd\ttranscript\t79213\t80022\t.\t+\t.\tgene_id "Q0275"; transcript_id "Q0275_mRNA"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\texon\t79213\t80022\t.\t+\t.\tgene_id "Q0275"; transcript_id "Q0275_mRNA"; exon_number "1"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; exon_id "Q0275_mRNA-E1";\n+Mito\tsgd\tCDS\t79213\t80019\t.\t+\t0\tgene_id "Q0275"; transcript_id "Q0275_mRNA"; exon_number "1"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; protein_id "Q0275";\n+Mito\tsgd\tstart_codon\t79213\t79215\t.\t+\t0\tgene_id "Q0275"; transcript_id "Q0275_mRNA"; exon_number "1"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tstop_codon\t80020\t80022\t.\t+\t0\tgene_id "Q0275"; transcript_id "Q0275_mRNA"; exon_number "1"; gene_name "COX3"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tgene\t85035\t85112\t.\t+\t.\tgene_id "tM(CAU)Q2"; gene_source "sgd"; gene_biotype "tRNA";\n+Mito\tsgd\ttranscript\t85035\t85112\t.\t+\t.\tgene_id "tM(CAU)Q2"; transcript_id "tM(CAU)Q2_tRNA"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA";\n+Mito\tsgd\texon\t85035\t85112\t.\t+\t.\tgene_id "tM(CAU)Q2"; transcript_id "tM(CAU)Q2_tRNA"; exon_number "1"; gene_source "sgd"; gene_biotype "tRNA"; transcript_source "sgd"; transcript_biotype "tRNA"; exon_id "tM(CAU)Q2_tRNA-E1";\n+Mito\tsgd\tgene\t85295\t85777\t.\t+\t.\tgene_id "Q0285"; gene_source "sgd"; gene_biotype "ncRNA";\n+Mito\tsgd\ttranscript\t85295\t85777\t.\t+\t.\tgene_id "Q0285"; transcript_id "Q0285_ncRNA"; gene_source "sgd"; gene_biotype "ncRNA"; transcript_source "sgd"; transcript_biotype "ncRNA";\n+Mito\tsgd\texon\t85295\t85777\t.\t+\t.\tgene_id "Q0285"; transcript_id "Q0285_ncRNA"; exon_number "1"; gene_source "sgd"; gene_biotype "ncRNA"; transcript_source "sgd"; transcript_biotype "ncRNA"; exon_id "Q0285_ncRNA-E1";\n+Mito\tsgd\tgene\t85554\t85709\t.\t+\t.\tgene_id "Q0297"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding";\n+Mito\tsgd\ttranscript\t85554\t85709\t.\t+\t.\tgene_id "Q0297"; transcript_id "Q0297_mRNA"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\texon\t85554\t85709\t.\t+\t.\tgene_id "Q0297"; transcript_id "Q0297_mRNA"; exon_number "1"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; exon_id "Q0297_mRNA-E1";\n+Mito\tsgd\tCDS\t85554\t85706\t.\t+\t0\tgene_id "Q0297"; transcript_id "Q0297_mRNA"; exon_number "1"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding"; protein_id "Q0297";\n+Mito\tsgd\tstart_codon\t85554\t85556\t.\t+\t0\tgene_id "Q0297"; transcript_id "Q0297_mRNA"; exon_number "1"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n+Mito\tsgd\tstop_codon\t85707\t85709\t.\t+\t0\tgene_id "Q0297"; transcript_id "Q0297_mRNA"; exon_number "1"; gene_name "Q0297"; gene_source "sgd"; gene_biotype "protein_coding"; transcript_source "sgd"; transcript_biotype "protein_coding";\n'