Mercurial > repos > bgruening > glimmer
changeset 3:ce7228503d49
changes
author | Bjoern Gruening <bjoern.gruening@gmail.com> |
---|---|
date | Fri, 07 Jun 2013 14:40:53 +0200 |
parents | 2d0c26885604 |
children | 5a97ff1a7b12 |
files | glimmer3-build-icm-wrapper.xml glimmer_orf_to_seq.py glimmer_predict.py glimmer_predict.xml tool_dependencies.xml |
diffstat | 5 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/glimmer3-build-icm-wrapper.xml Fri Jun 07 07:51:49 2013 -0400 +++ b/glimmer3-build-icm-wrapper.xml Fri Jun 07 14:40:53 2013 +0200 @@ -18,7 +18,7 @@ --stop_codons "${stop_codon_opts.stop_codons}" #end if - $outfile < $infile + $outfile < $infile 2>&1; </command> <inputs> <param name="infile" type="data" format="fasta" label="Trainings Dataset" help="A set of known genes in FASTA format." />
--- a/glimmer_orf_to_seq.py Fri Jun 07 07:51:49 2013 -0400 +++ b/glimmer_orf_to_seq.py Fri Jun 07 14:40:53 2013 +0200 @@ -5,7 +5,7 @@ Author: Bjoern Gruening """ import sys, os -import Bio.SeqIO +from Bio import SeqIO from Bio.SeqRecord import SeqRecord def glimmer2seq( glimmer_prediction = sys.argv [1], genome_sequence = sys.argv[2], outfile = sys.argv[3] ): @@ -16,7 +16,7 @@ print "Missing input values." sys.exit() - fastafile = Bio.SeqIO.parse(sequence, "fasta") + fastafile = SeqIO.parse(sequence, "fasta") sequences = dict() seq_records = list() @@ -32,9 +32,9 @@ orf_name = line[0:8] if orf_start <= orf_end: - seq_records.add( SeqRecord( entry.seq[ orf_start-1 : orf_end ], id = orf_name, description = entry.description ) ) + seq_records.append( SeqRecord( entry.seq[ orf_start-1 : orf_end ], id = orf_name, description = entry.description ) ) else: - seq_records.add( SeqRecord( entry.seq[ orf_end-1 : orf_start ].reverse_complement(), id = orf_name, description = entry.description ) ) + seq_records.append( SeqRecord( entry.seq[ orf_end-1 : orf_start ].reverse_complement(), id = orf_name, description = entry.description ) ) SeqIO.write( seq_records, outfile, "fasta" ) glimmerfile.close()
--- a/glimmer_predict.py Fri Jun 07 07:51:49 2013 -0400 +++ b/glimmer_predict.py Fri Jun 07 14:40:53 2013 +0200 @@ -62,7 +62,8 @@ genome_seq_file, icm.name, os.path.join(tempdir, tag)], stdout = subprocess.PIPE, stderr=subprocess.PIPE).communicate() - shutil.copyfile( os.path.join( tempdir, tag + ".predict" ), outfile_classic_glimmer ) + if outfile_classic_glimmer.strip() != 'None': + shutil.copyfile( os.path.join( tempdir, tag + ".predict" ), outfile_classic_glimmer ) if outfile_ext_path.strip() != 'None': shutil.copyfile( os.path.join( tempdir, tag + ".detail" ), outfile_ext_path )
--- a/glimmer_predict.xml Fri Jun 07 07:51:49 2013 -0400 +++ b/glimmer_predict.xml Fri Jun 07 14:40:53 2013 +0200 @@ -7,9 +7,13 @@ <command interpreter="python"> glimmer_predict.py $input - $prediction + #if $report: + $prediction + #else: + "None" + #end if #if $detailed_report: - $output_ext + $detailed #else: "None" #end if
--- a/tool_dependencies.xml Fri Jun 07 07:51:49 2013 -0400 +++ b/tool_dependencies.xml Fri Jun 07 14:40:53 2013 +0200 @@ -1,7 +1,7 @@ -<?xml version="1.0"?> +<?xml version='1.0' encoding='utf-8'?> <tool_dependency> <package name="biopython" version="1.61"> - <repository changeset_revision="e87f0c6897a8" name="package_biopython_1_61" owner="bgruening" toolshed="http://testtoolshed.g2.bx.psu.edu" /> + <repository changeset_revision="e87f0c6897a8" name="package_biopython_1_61" owner="bgruening" toolshed="http://testtoolshed.g2.bx.psu.edu/" /> </package> <set_environment version="1.0"> <environment_variable action="set_to" name="GLIMMER_SCRIPT_PATH">$REPOSITORY_INSTALL_DIR</environment_variable> @@ -27,4 +27,4 @@ Glimmer (Gene Locator and Interpolated Markov ModelER) uses interpolated Markov models (IMMs) to identify the coding regions and distinguish them from noncoding DNA. http://www.cbcb.umd.edu/software/glimmer/</readme> </package> -</tool_dependency> +</tool_dependency> \ No newline at end of file