Mercurial > repos > charles_s_test > test_dependencies
changeset 2:aca83a94fd55 draft default tip
planemo upload commit cd1454c40a43ad9da3d59e6ba8359318fc772c43-dirty
| author | charles_s_test |
|---|---|
| date | Thu, 25 Jan 2018 17:26:32 -0500 |
| parents | 09e4f955e00a |
| children | |
| files | aln-pe.sam ectyper ectyper.xml runfastq_dump.py test.bam test.txt testdep.py testdep.xml tool_dependencies.xml |
| diffstat | 8 files changed, 88 insertions(+), 172 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ectyper Thu Jan 25 17:26:32 2018 -0500 @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +""" + Shell program for ectyper +""" +import sys +import os +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + +from ectyper import ectyper + +if __name__=='__main__': + ectyper.run_program()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ectyper.xml Thu Jan 25 17:26:32 2018 -0500 @@ -0,0 +1,75 @@ +<tool id="ectyper" name="ectyper" version="0.1"> + <requirements> + <requirement type="package" version="0.1">ectyper</requirement> + <requirement type="package" version="3.5">python</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + #if $jobtype.select == "asm" + ln -s $jobtype.draft sample.fasta; + #else if $jobtype.select == "se" + ln -s $jobtype.fastq1 sample_1.fastq; + #else if $jobtype.select == "pe" + ln -s $jobtype.fastq1 sample_1.fastq; + ln -s $jobtype.fastq2 sample_2.fastq; + #end if + + $__tool_directory__/ectyper + #if $jobtype.select == "asm" + -i sample.fasta + #else if $jobtype.select == "se" + -i sample_1.fastq + #else if $jobtype.select == "pe" + -i sample_1.fastq sample_2.fastq + #end if + -d $percent_identity + -l $percent_length + -o "./"; cat ./output/output.csv > results.csv; + + ]]></command> + <inputs> + <conditional name="jobtype"> + <param name="select" type="select" label="Assembly or FASTQ Reads?"> + <option value="asm">Genome Assembly</option> + <option value="se">Single-End Reads</option> + <option value="pe">Paired-End Reads</option> + </param> + <when value="asm"> + <param name="draft" type="data" format="fasta" label="FASTA" /> + </when> + <when value="se"> + <param name="fastq1" type="data" format="fastq" label="FASTQ" /> + </when> + <when value="pe"> + <param name="fastq1" type="data" format="fastq" label="FASTQ" /> + <param name="fastq2" type="data" format="fastq" label="FASTQ" /> + </when> + </conditional> + + <param name="percent_identity" type="integer" label="Percent identity required for an allele match [default 90]" value="90" /> + <param name="percent_length" type="integer" label="Percent length required for an allele match [default 50]" value="50" /> + + </inputs> + <outputs> + <data format="csv" label="ectyper Results" name="${input.name}.ectperResults" from_work_dir="*.csv"/> + </outputs> + + <help><![CDATA[ + +**Usage: ectyper** + +**INPUT** + +A fasta assembly or single or paired end reads + +**PERCENTIDENTITY** + +Percentage of identity wanted to use against the database. From 0 to 100, default is 90%. + +**PERCENTLENGTH** + +Percentage of length wanted to use against the database. From 0 to 100, default is 50%. + +https://github.com/phac-nml/ecoli_serotyping + + ]]></help> +</tool>
--- a/runfastq_dump.py Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -import sys, os - -input = sys.argv[1] - -print(input) - -import re, os - -def fix_seq_ids(filename): - ''' - make sequence ids the same for paired reads. - ''' - file = list(open(filename, 'r')) - new_file = open(filename, 'w') - for line in file: - if re.search('^@', line) or re.search('^\+', line) and re.search(' ', line): - linel = re.split(' ', line) - linel[0] = re.sub('.\d$', '', linel[0]) - line = ' '.join(linel) - new_file.write(line) -# fastq-dump --log-level fatal --split-3 --accession accession_number --ncbi_error_report never - -os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump --log-level fatal --split-3 --accession ' + input + ' --ncbi_error_report never') - -os.system('ls -lh | grep ' + input) - -#os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump -I --split-files ' + input) -#mv_cmd = 'mv -v ' + input + '_1.fastq R1.fastq' -#print(mv_cmd) - -#fix_seq_ids(input + '_1.fastq') -#fix_seq_ids(input + '_2.fastq') - -os.system('mv -v ' + input + '_1.fastq R1.fastq') -os.system('mv -v ' + input + '_2.fastq R2.fastq') - - -
--- a/test.txt Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -Hello World \ No newline at end of file
--- a/testdep.py Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ - -import sys, os, io - -#input = sys.argv[1] - -print(input) - -import re, os - -def fix_seq_ids(filename): - ''' - make sequence ids the same for paired reads. - ''' - file = list(open(filename, 'r')) - new_file = open(filename, 'w') - for line in file: - if re.search('^@', line) or re.search('^\+', line) and re.search(' ', line): - linel = re.split(' ', line) - linel[0] = re.sub('.\d$', '', linel[0]) - line = ' '.join(linel) - new_file.write(line) -# fastq-dump --log-level fatal --split-3 --accession accession_number --ncbi_error_report never - -#os.system('bwa index -a bwtsw /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_454.dat') -os.system('samtools view -bS /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_472.dat > test.bam') - -os.system('blastx -query /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_454.dat -out output.blast.txt') - - -file = open("test.txt","w") - -file.write("Hello World") - -file.close() - -#os.system('/nfs/sw/apps/bwa/bwa-0.7.15/bwa index -a bwtsw /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_454.dat') - - - -#os.system('bwa mem /nfs/sw/apps/galaxy-dev/galaxy/tools/seqsero/database/fliC_b_whole.fasta /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_445.dat /nfs/sw/apps/galaxy-dev/galaxy/database/files/000/dataset_446.dat > aln-pe.sam') - -#os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump --log-level fatal --split-3 --accession ' + input + ' --ncbi_error_report never') - -#os.system('ls -lh | grep ' + input) - -#os.system('/nfs/sw/apps/sratoolkit/sratoolkit.2.8.0-centos_linux64/bin/fastq-dump -I --split-files ' + input) -#mv_cmd = 'mv -v ' + input + '_1.fastq R1.fastq' -#print(mv_cmd) - -#fix_seq_ids(input + '_1.fastq') -#fix_seq_ids(input + '_2.fastq') - -#os.system('mv -v ' + input + '_1.fastq R1.fastq') -#os.system('mv -v ' + input + '_2.fastq R2.fastq')
--- a/testdep.xml Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -<tool id="testdep" name="Test Dep" version="1.1.4"> - <description>Downloads a set of paired reads by their accession number using fastq-dump tool from sra-toolkit.</description> - <requirements> - <requirement type="package" version="0.5.9">bwa</requirement> - <requirement type="package" version="1.3.1">samtools</requirement> - <requirement type="package" version="2.7.1">blast</requirement> - <requirement type="package" version="2.6.2">sra_toolkit</requirement> - </requirements> - <command interpreter="python2.7"> - - testdep.py - - </command> - <inputs> - <param format="fastq,fastqsanger" name="input1" multiple="true" type="data" label="Source file"/> - </inputs> - <outputs> - <data name="text_txt" format="txt" from_work_dir="test.txt"/> - - </outputs> - <tests> - <test> - <output name="text_txt" file="test.txt"/> - </test> - </tests> -<help> - -.. class:: infomark - -**What it does** - -Performs a fastq-dump with the split-3 option. - -:: - - fastq-dump —log-level fatal --split-3 --accession accession_number --ncbi_error_report never - - -Data is stored in format fastqsanger. - -The metadata is now named to make it easier for collection lists to -fetch when you search for reads in your history. - ------- - -.. class:: infomark - -Modifed By -Charles Strittmatter - - -**Original Tool Author** - -Mando Rodriguez - - </help> -<citations> - <citation type="bibtex"> - @Article{pmid25762776, - Author="Zhang, S. and Yin, Y. and Jones, M. B. and Zhang, Z. and Deatherage Kaiser, B. L. and Dinsmore, B. A. and Fitzgerald, C. and Fields, P. I. and Deng, X. ", - Title="{{S}almonella serotype determination utilizing high-throughput genome sequencing data}", - Journal="J. Clin. Microbiol.", - Year="2015", - Volume="53", - Number="5", - Pages="1685--1692", - Month="May" - } - </citation> - </citations> - -</tool>
--- a/tool_dependencies.xml Sun Nov 12 09:14:07 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="bwa" version="0.5.9"> - <repository changeset_revision="0eb3d3c40344" name="package_bwa_0_5_9" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency> -
