Skip to content

Commit

Permalink
add test for snippy --ctgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jianzuoyi committed Jan 15, 2025
1 parent 8ceb7d2 commit 1cd8c49
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tools/snippy/snippy.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<tool id="snippy" name="snippy" version="@WRAPPER_VERSION@+galaxy@VERSION_SUFFIX@">
<description>
<description>
Snippy finds SNPs between a haploid reference genome and your NGS sequence reads.
</description>
<expand macro="bio_tools"/>
<macros>
<import>macros.xml</import>
</macros>
Expand Down Expand Up @@ -69,8 +68,8 @@
<conditional name="fastq_input">
<param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
<option value="paired">Paired</option>
<option value="single">Single</option>
<option value="paired_collection">Paired Collection</option>
<option value="single">Single</option>
<option value="paired_iv">Paired Interleaved</option>
<option value="contigs">Assembled Contigs</option>
</param>
Expand All @@ -88,7 +87,7 @@
<param name="fastq_input_interleaved" type="data" format="fastqsanger,fastqsanger.gz" label="Select fastq dataset" help="Specify dataset with interleaved reads"/>
</when>
<when value="contigs">
<param name="fasta_input" type="data" format="fasta,fa,fna" label="Select fasta dataset" help="Specify dataset with assembled contigs"/>
<param name="fasta_input" type="data" format="fasta" label="Select fasta dataset" help="Specify dataset with assembled contigs"/>
</when>

</conditional>
Expand Down Expand Up @@ -228,6 +227,20 @@
<output name="snpsum" ftype="tabular" file="b_fna_ref_mincov_2_minqual_60.snps.txt" lines_diff="8" />
<output name="snpgff" ftype="gff3" file="b_2_fna_ref_mincov_2_minqual_60.snps.gff" lines_diff="2"/>
</test>

<test> <!-- test 5 - fasta ref one snp single -->
<conditional name="reference_source">
<param name="reference_source_selector" value="history"/>
<param name="ref_file" value="reference.fasta" ftype="fasta"/>
</conditional>
<param name="fastq_input_selector" value="contigs" />
<param name="fasta_input" value="contigs.fasta" ftype="fasta" />
<param name="mincov" value="2" />
<param name="minqual" value="60" />
<param name="outputs" value="outgff,outsum" />
<output name="snpsum" ftype="tabular" file="d_fna_ref_mincov_1_minqual_60.snps.txt" lines_diff="6" />
<output name="snpgff" ftype="gff3" file="d_fna_ref_mincov_1_minqual_60.snps.gff" lines_diff="2"/>
</test>
</tests>


Expand Down
11 changes: 11 additions & 0 deletions tools/snippy/test-data/contigs.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
>reference
TCCACAAGCCATTGTGTGTAATTAACCACTAATTGTGTATAAGTTTAAACTAATTGAAAAGGTTATCCAC
AATAAAAAGGCGTTATTCAGGAGTTATCCACACTTTCTAGGAAAGGATTTCATTGCGCCAATGTGTTAAA
TTATTTACCGAATACGAAAAAAAGACAAATAAATGAGGTTGTGAAAAATGATATTTCAACGGCTTTTGAA
GACTAGAGATACAGAGTTTTATCGAGTTATACAAAACAGGAATATTGACGACGTATTTGGATACTTATTA
ATTCACGATAAACGGGAACCAGCAGAAATTGACGATTTTAAGGTATTTGCAAAAAGTAATATAAATAAAG
AAGCTTTTTCAGTGAATATCAAAAAAAATCATATTTACACGATGTTTTTCCACTTTACTGATTTAGAGGA
AGAACAGGAAATTCCAAAATTTACTAAAGTTATTCGTTTTATAGAAGGACTTTTATCTTTTCAGCCAGAA
ACAAGCCATTACGTTGATAACTATTTAATAAAGGAAAAACTAATTTTTGAATATCCTGCTGAATTTGAGA
AAATCGGGGAGTTTGCTAAATATTTAGTAAAGCTTTCGGGTCGTAAAATTACTATTCCAGACACAACGAG
AGAAAAATATATCTATTTAACGCAATAATTTTCGAAAAATGGTTTTTCTCTCTATAAAAATATGATATGA
3 changes: 3 additions & 0 deletions tools/snippy/test-data/d_fna_ref_mincov_1_minqual_60.snps.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
##gff-version 3
reference snippy:4.6.0 variation 141 141 . . 0 note=snp C=>T T:4 C:0
reference snippy:4.6.0 variation 211 211 . . 0 note=snp A=>G G:5 A:0
7 changes: 7 additions & 0 deletions tools/snippy/test-data/d_fna_ref_mincov_1_minqual_60.snps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DateTime 2025-01-15T12:20:46
ReadFiles fake_reads.fq
Reference reference.fasta
ReferenceSize 700
Software snippy 4.6.0
Variant-SNP 2
VariantTotal 2

0 comments on commit 1cd8c49

Please sign in to comment.