changeset 35:162b687f8d73

Uploaded
author da-intersect
date Tue, 30 Apr 2013 21:55:54 -0400
parents 103c8249dbe6
children 2c43e7613b2f
files datatypes_conf.xml jars/protein_generator.jar jars/results_analyser.jar jars/samifier.jar jars/virtual_protein_merger.jar protein_generator.sh protein_generator.xml protein_merger.sh protein_merger.xml result_analyser.sh result_analyser.xml samifier.sh samifier.xml tar.py
diffstat 14 files changed, 0 insertions(+), 327 deletions(-) [+]
line wrap: on
line diff
--- a/datatypes_conf.xml	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<datatypes>
-  <datatype_files>
-    <datatype_file name="tar.py"/>
-  </datatype_files>
-  <registration>
-    <datatype extension="tar" type="galaxy.datatypes.tar:Tar" display_in_upload="true"/>
-  </registration>
-  <sniffers>
-    <sniffer type="galaxy.datatypes.tar:Tar"/>
-  </sniffers>
-</datatypes>
\ No newline at end of file
Binary file jars/protein_generator.jar has changed
Binary file jars/results_analyser.jar has changed
Binary file jars/samifier.jar has changed
Binary file jars/virtual_protein_merger.jar has changed
--- a/protein_generator.sh	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-if (type -p java >> /dev/null); then
-    _java=java
-elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
-    _java="$JAVA_HOME/bin/java"
-else
-    echo "You must install java before runing this tool" >&2
-    exit 1
-fi
-
-if [[ "$_java" ]]; then
-    version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
-    if ! [[ "$version" > "1.6" ]]; then
-        echo "Java version should be > 1.6" >&2
-	exit 1
-    fi
-fi
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-jar_path="${DIR}/jars/${1}"
-shift
-
-java -Xmx3072M -jar $jar_path $@
--- a/protein_generator.xml	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<tool id="protgenerator" name="Protein Generator" version="1.0.1">
-        <description>Protein Generator</description>
-        <command interpreter="bash">
-       	protein_generator.sh protein_generator.jar 
-        -d "$databasename" 
-        -f "$genomeFile" 
-        #if $GlimmerFile
-        	-g "$GlimmerFile"
-        #end if
-        #if $SplitInterval
-        	-i "$SplitInterval"
-        #end if
-        	-o "$output1"
-        #if $condition1.gffFile == "yes"
-		-p "$output2"
-	#end if
-	#if $condition2.accessionFile == "yes"
-		-q "$output3"
-	#end if
-	#if $trans_tab_file
-		-t "$trans_tab_file"
-	#end if
-        </command>
-        <inputs>
-        	<param name="databasename" type="text" label="Database name" />
-        	<param name="genomeFile" type="data" format="faa" label="Select genome file" help="Genome file in gff format" />
-
-        	<param name="GlimmerFile" type="data" format="txt" label="Select Glimmer File" help="Glimmer txt file. Can't be used with the Split Interval" optional="true" />
-		<param name="SplitInterval" type="integer" label="Size of the intervals" help="Size of the intervals (number of codons) into which the genome will be split. Can't be used with the Glimmer File" optional="true" />
-
-		<param name="trans_tab_file" type="data" format="txt" label="Select Translation Table File" help="File containing a mapping of codons to amino acids, in the format used by NCBI." optional="true" />
-		<conditional name="condition1">
-			<param name="gffFile" type="select" help="write the GFF file">
-				<option value="yes" selected="True">Yes</option>
-				<option value="no" selected="False">No</option>
-			</param>
-		</conditional>
-		<conditional name="condition2">
-			<param name="accessionFile" type="select" label="Accession File" help="Write the accession file">
-				<option value="yes" selected="True">Yes</option>
-				<option value="no" selected="False">No</option>
-			</param>
-		</conditional>
-	</inputs>
-        <outputs>
-                <data format="sam" name="output1" />
-		<data format="gff" name="output2" label="GFF file">
-			<filter>condition1['gffFile'] == "yes"</filter>
-		</data>
-                <data format="txt" name="output3" label="Accession File">
-                	<filter>condition2['accessionFile'] == "yes"</filter>
-                </data>
-        </outputs>
-        <help>
-        </help>
-</tool>
--- a/protein_merger.sh	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# Check java version
-if (type -p java >> /dev/null); then
-    _java=java
-elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
-    _java="$JAVA_HOME/bin/java"
-else
-    echo "You must install java before runing this tool"
-    exit 1
-fi
-if [[ "$_java" ]]; then
-    version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
-    if ! [[ "$version" > "1.6" ]]; then
-        echo "Java version should be > 1.6"
-	exit 1
-    fi
-fi
-
-# Locate the jar directory
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-jar_path="${DIR}/jars/${1}"
-shift
-
-# Untar the chromosome file into a temporary directory
-tar_file="$1"
-shift
-tmp_dir="/tmp/$(basename "$tar_file")"
-mkdir -p $tmp_dir
-tar -C $tmp_dir -xvf $tar_file
-
-# Run the jar and remove the temporary directory
-java -Xmx3072M -jar $jar_path $@ -c "$tmp_dir"
-rm -rf $tmp_dir
--- a/protein_merger.xml	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<tool id="protmerger" name="Protein Merger" version="1.0.2">
-        <description>Virtual Protein Merger</description>
-        <command interpreter="bash">
-        protein_merger.sh virtual_protein_merger.jar $chromosome_tar -g "$genomeFile" -o "$output1" 
-        -r "$searchResultsFile" 
-	#if $trans_tab_file
-	-t "$trans_tab_file"
-	#end if
-	#if $confidence_score
-	-s "$confidence_score"
-	#end if
-        </command>
-        <inputs>
-        	<param name="chromosome_tar" type="data" format="tar" label="Select chromosome tar file" help="A Tar file containing all the chromosome files" />
-        	<param name="genomeFile" type="data" format="gff" label="Select genome file" help="Genome file in gff format" />
-        	<param name="searchResultsFile" type="data" format="txt" label="Select Mascot search result" help="Mascot search results file in txt format" />
-		<param name="trans_tab_file" type="data" format="txt" label="Select Translation Table File" help="File containing a mapping of codons to amino acids, in the format used by NCBI." optional="True"/>
-		<param name="confidence_score" type="integer" label="Confidence score thresold" help="Minimum confidence score for peptides to be included" optional="True" />
-	</inputs>
-        <outputs>
-                <data format="sam" name="output1" />
-        </outputs>
-        <help>
-        </help>
-</tool>
--- a/result_analyser.sh	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# Check java version
-if (type -p java >> /dev/null); then
-    _java=java
-elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
-    _java="$JAVA_HOME/bin/java"
-else
-    echo "You must install java before runing this tool"
-    exit 1
-fi
-if [[ "$_java" ]]; then
-    version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
-    if ! [[ "$version" > "1.6" ]]; then
-        echo "Java version should be > 1.6"
-	exit 1
-    fi
-fi
-
-# Locate the jar directory
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-jar_path="${DIR}/jars/${1}"
-shift
-
-# Untar the chromosome file into a temporary directory
-tar_file="$1"
-shift
-tmp_dir="/tmp/$(basename "$tar_file")"
-mkdir -p $tmp_dir
-tar -C $tmp_dir -xvf $tar_file
-
-# Run the jar and remove the temporary directory
-java -Xmx3072M -jar $jar_path $@ -c "$tmp_dir"
-rm -rf $tmp_dir
--- a/result_analyser.xml	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-<tool id="resanalyser" name="Result Analyser" version="1.0.1">
-        <description>Result Analyser</description>
-        <command interpreter="bash">
-        result_analyser.sh results_analyser.jar $chromosome_tar -g "$genomeFile" -m "$mapping" -o "$output1" -r "$searchResultsFile" 
-        #if $reportId
-        -rep "$reportId"
-        #end if
-        #if $reportList
-        -replist "$reportList"
-        #end if
-        #if $sqlQuery
-        -sql "$sqlQuery"
-        #end if
-        </command>
-        <inputs>
-        	<param name="chromosome_tar" type="data" format="tar" label="Select chromosome tar file" help="A Tar file containing all the chromosome files" />
-        	<param name="genomeFile" type="data" format="gff" label="Select genome file" help="Genome file in gff format" />
-        	<param name="searchResultsFile" type="data" format="txt" label="Select Mascot search result" help="Mascot search results file in txt format" />
-        	<param name="mapping" type="data" format="txt" label="Select file mapping" help="File mapping protein identifier to ordered locus name" />
-
-		<param name="reportId" optional="true" type="data" format="txt" label="Select reportId" help="Access a built in report query" />
-		<param name="reportList" optional="true" type="data" format="txt" label="Select reportList" help="A file containing all the pre-built SQL queries" />
-		<param name="sqlQuery" optional="true" type="data" format="txt" label="Select SQL Query" help="Filters the result through the use of a SQL statement to the output file" />
-
-	</inputs>
-        <outputs>
-                <data format="sam" name="output1" />
-        </outputs>
-        <help>
-        </help>
-</tool>
--- a/samifier.sh	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# Check java version
-if (type -p java >> /dev/null); then
-    _java=java
-elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
-    _java="$JAVA_HOME/bin/java"
-else
-    echo "You must install java before runing this tool"
-    exit 1
-fi
-if [[ "$_java" ]]; then
-    version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
-    if ! [[ "$version" > "1.6" ]]; then
-        echo "Java version should be > 1.6"
-	exit 1
-    fi
-fi
-
-# Locate the jar directory
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-jar_path="${DIR}/jars/${1}"
-shift
-
-# Untar the chromosome file into a temporary directory
-tar_file="$1"
-shift
-tmp_dir="/tmp/$(basename "$tar_file")"
-mkdir -p $tmp_dir
-tar -C $tmp_dir -xvf $tar_file
-
-# Run the jar and remove the temporary directory
-java -Xmx3072M -jar $jar_path $@ -c "$tmp_dir"
-rm -rf $tmp_dir
--- a/samifier.xml	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-<tool id="samifier" name="Samifier" version="1.0.2">
-        <description>Samifier</description>
-        <command interpreter="bash">
-        samifier.sh samifier.jar $chromosome_tar -g "$genome" -m "$mapping" -o "$output1" -r "$mascot"
-	#if $score_thresold
-	-s "$score_thresold"
-	#end if
-	#if $condition2.tool_option2 == "yes"
-	-l "$output2"
-	#end if
-	#if $condition3.tool_option3 == "yes"
-	-b "$output3"
-	#end if
-        </command>
-        <inputs>
-        	<param name="chromosome_tar" type="data" format="tar" label="Select chromosome zip files" help="A zip file containing all the chromosome files" />
-        	<param name="genome" type="data" format="gff" label="Select genome file" help="Genome file in gff format" />
-        	<param name="mascot" type="data" format="txt" label="Select Mascot search result" help="Mascot search results file in txt format" />
-        	<param name="mapping" type="data" format="txt" label="Select file mapping" help="File mapping protein identifier to ordered locus name" />
-		<param name="score_thresold"  type="integer" label="Confidence Score thresold" help="Minimum confidence score for peptides to" optional="true"/>
-
-		<conditional name="condition2">
-			<param name="tool_option2" type="select" label="Write log file" help="Create an output containing the logs">
-				<option value="yes" selected="No">Yes</option>
-				<option value="no" selected="Yes">No</option>
-			</param>
-		</conditional>
-		<conditional name="condition3">
-			<param name="tool_option3" type="select" label="Write output in bed format" help="Output to write IGV regions of interest">
-				<option value="yes" selected="No">Yes</option>
-				<option value="no" selected="Yes">No</option>
-        		</param>
-        	</conditional>
-        </inputs>
-        <outputs>
-                <data format="sam" name="output1" />
-                <data format="txt" name="output2" label="Samifier log file">
-                	<filter>condition2['tool_option2'] == "yes"</filter>
-                </data>
-                <data format="bed" name="output3" label="Samifier Bed">
-                	<filter>condition3['tool_option3'] == "yes"</filter>
-                </data>
-        </outputs>
-        <help>
-        </help>
-</tool>
--- a/tar.py	Tue Apr 30 00:28:02 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-from galaxy.datatypes import data
-from galaxy.datatypes.metadata import MetadataElement
-from galaxy.datatypes.binary import Binary
-from galaxy.datatypes import metadata
-from galaxy.datatypes.sniff import *
-import tarfile
-
-class Tar( Binary ):
-	"""Class describing a BAM binary file"""
-	file_ext = "tar"
-	def sniff( self, filename ):
-		try:
-			if tarfile.is_tarfile(filename):
-				return True
-		except:
-			return False
-
-	def set_peek( self, dataset, is_multi_byte=False ):
-		if not dataset.dataset.purged:
-			dataset.peek  = "Tar file"
-			dataset.blurb = data.nice_size( dataset.get_size() )
-		else:
-			dataset.peek = 'file does not exist'
-			dataset.blurb = 'file purged from disk'
-
-	def display_peek( self, dataset ):
-		try:
-			return dataset.peek
-		except:
-			return "Tar file" 
\ No newline at end of file