Mercurial > repos > charles_s_test > test_dependencies
changeset 0:500ceb70e4bd draft
planemo upload commit d4d558b27a09f684be8311f3cfb659b16545e167-dirty
| author | charles_s_test |
|---|---|
| date | Sun, 12 Nov 2017 09:12:36 -0500 |
| parents | |
| children | 09e4f955e00a |
| files | aln-pe.sam fastq_dump_paired.xml runfastq_dump.py test.bam test.txt testdep.py testdep.xml tool_dependencies.xml |
| diffstat | 7 files changed, 226 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fastq_dump_paired.xml Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,54 @@ +<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> + <!-- Should just use the samtools that's installed in the path --> + <requirement type="binary">fastq-dump</requirement> + </requirements> + <command interpreter="python2.7"> + + testdep.py ${input1} + + </command> + <inputs> + <param format="fastq,fastqsanger" name="input1" multiple="true" type="data" label="Source file"/> + </inputs> + <outputs> + <data name="text_file" format="txt" from_work_dir="dep_result.txt"/> + + </outputs> + <tests> + <!-- Empty --> + </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> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runfastq_dump.py Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,38 @@ +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') + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.txt Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,1 @@ +Hello World \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdep.py Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,54 @@ + +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')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdep.xml Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,72 @@ +<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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Sun Nov 12 09:12:36 2017 -0500 @@ -0,0 +1,7 @@ +<?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> +
