Repository 's_mart'
hg clone https://toolshed.g2.bx.psu.edu/repos/yufei-luo/s_mart

Changeset 60:90f4b29d884f (2014-02-21)
Previous changeset 59:2a4884ba3e5c (2014-02-10) Next changeset 61:3a52eb875640 (2014-02-21)
Commit message:
Uploaded
modified:
SMART/Java/Python/CompareOverlappingSmallRef.py
SMART/Java/Python/clusterize.py
SMART/galaxy/Clusterize.xml
SMART/galaxy/CompareOverlappingAdapt.xml
SMART/galaxy/CompareOverlappingSmallQuery.xml
SMART/galaxy/CompareOverlappingSmallRef.xml
added:
SMART/Java/Python/misc/RPlotter.pyc
SMART/Java/Python/structure/TranscriptContainer.pyc
SMART/galaxy/.CompareOverlappingSmallRef.xml.swp
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/Java/Python/CompareOverlappingSmallRef.py
--- a/SMART/Java/Python/CompareOverlappingSmallRef.py Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/Java/Python/CompareOverlappingSmallRef.py Fri Feb 21 08:32:36 2014 -0500
b
@@ -235,6 +235,7 @@
  cosr.includeNotOverlapping(options.notOverlapping)
  cosr.setDistance(options.distance)
  cosr.setAntisense(options.antisense)
+ cosr.setCollinear(options.collinear)
  cosr.setInvert(options.exclude)
  cosr.setMinPercentOverlap(options.pcOverlapQuery, options.pcOverlapRef)
  cosr.setMinOverlap(options.minOverlap)
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/Java/Python/clusterize.py
--- a/SMART/Java/Python/clusterize.py Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/Java/Python/clusterize.py Fri Feb 21 08:32:36 2014 -0500
[
b'@@ -33,6 +33,7 @@\n \n import os, os.path, random\n from optparse import OptionParser\n+from heapq import heappush, heappop\n from commons.core.parsing.ParserChooser import ParserChooser\n from commons.core.writer.Gff3Writer import Gff3Writer\n from SMART.Java.Python.structure.Transcript import Transcript\n@@ -44,26 +45,31 @@\n class Clusterize(object):\n \n \tdef __init__(self, verbosity):\n-\t\tself.normalize\t\t = False\n-\t\tself.presorted\t\t = False\n-\t\tself.distance\t\t  = 1\n-\t\tself.colinear\t\t  = False\n-\t\tself.nbWritten\t\t = 0\n-\t\tself.nbMerges\t\t  = 0\n-\t\tself.verbosity\t\t = verbosity\n+\t\tself.parsers           = {}\n+\t\tself.sortedFileNames   = {}\n+\t\tself.normalize         = False\n+\t\tself.presorted         = False\n+\t\tself.distance          = 1\n+\t\tself.collinear         = False\n+\t\tself.nbWritten         = 0\n+\t\tself.nbMerges          = 0\n+\t\tself.verbosity         = verbosity\n \t\tself.splittedFileNames = {}\n+\t\tself.chromosomes       = set()\n \n \tdef __del__(self):\n-\t\tfor fileName in self.splittedFileNames.values():\n-\t\t\tos.remove(fileName)\n+\t\tfor fileName1 in self.splittedFileNames:\n+\t\t\tfor fileName2 in self.splittedFileNames[fileName1].values():\n+\t\t\t\tos.remove(fileName2)\n \n-\tdef setInputFile(self, fileName, format):\n+\tdef setInputFiles(self, fileNames, format):\n \t\tparserChooser = ParserChooser(self.verbosity)\n \t\tparserChooser.findFormat(format)\n-\t\tself.parser = parserChooser.getParser(fileName)\n-\t\tself.sortedFileName = "%s_sorted_%d.pkl" % (os.path.splitext(fileName)[0], random.randint(1, 100000))\n-\t\tif "SMARTTMPPATH" in os.environ:\n-\t\t\tself.sortedFileName = os.path.join(os.environ["SMARTTMPPATH"], os.path.basename(self.sortedFileName))\n+\t\tfor fileName in fileNames:\n+\t\t\tself.parsers[fileName] = parserChooser.getParser(fileName)\n+\t\t\tself.sortedFileNames[fileName] = "%s_sorted_%d.pkl" % (os.path.splitext(fileName)[0], random.randint(1, 100000))\n+\t\t\tif "SMARTTMPPATH" in os.environ:\n+\t\t\t\tself.sortedFileNames[fileName] = os.path.join(os.environ["SMARTTMPPATH"], os.path.basename(self.sortedFileNames[fileName]))\n \n \tdef setOutputFileName(self, fileName, format="gff3", title="S-MART", feature="transcript", featurePart="exon"):\n \t\twriterChooser = WriterChooser()\n@@ -76,8 +82,8 @@\n \tdef setDistance(self, distance):\n \t\tself.distance = distance\n \n-\tdef setColinear(self, colinear):\n-\t\tself.colinear = colinear\n+\tdef setColinear(self, collinear):\n+\t\tself.collinear = collinear\n \n \tdef setNormalize(self, normalize):\n \t\tself.normalize = normalize\n@@ -85,42 +91,60 @@\n \tdef setPresorted(self, presorted):\n \t\tself.presorted = presorted\n \n-\tdef _sortFile(self):\n+\tdef _sortFiles(self):\n \t\tif self.presorted:\n \t\t\treturn\n-\t\tfs = FileSorter(self.parser, self.verbosity-4)\n-\t\tfs.perChromosome(True)\n-\t\tfs.setPresorted(self.presorted)\n-\t\tfs.setOutputFileName(self.sortedFileName)\n-\t\tfs.sort()\n-\t\tself.splittedFileNames       = fs.getOutputFileNames()\n-\t\tself.nbElementsPerChromosome = fs.getNbElementsPerChromosome()\n-\t\tself.nbElements              = fs.getNbElements()\n+\t\tfor fileName, parser in self.parsers.iteritems():\n+\t\t\tfs = FileSorter(parser, self.verbosity-4)\n+\t\t\tfs.perChromosome(True)\n+\t\t\tfs.setPresorted(self.presorted)\n+\t\t\tfs.setOutputFileName(self.sortedFileNames[fileName])\n+\t\t\tfs.sort()\n+\t\t\tself.splittedFileNames[fileName] = fs.getOutputFileNames()\n+\t\t\tself.nbElementsPerChromosome     = fs.getNbElementsPerChromosome()\n+\t\t\tself.nbElements                  = fs.getNbElements()\n+\t\t\tself.chromosomes.update(self.splittedFileNames[fileName].keys())\n \t\t\n-\tdef _iterate(self, chromosome):\n-\t\tif chromosome == None:\n-\t\t\tprogress = UnlimitedProgress(10000, "Reading input file", self.verbosity)\n-\t\t\tparser   = self.parser\n-\t\telse:\n-\t\t\tprogress = Progress(self.nbElementsPerChromosome[chromosome], "Checking chromosome %s" % (chromosome), self.verbosity)\n-\t\t\tparser   = NCListFileUnpickle(self.splittedFileNames[chromosome], self.verbosity)\n+\tdef _iterate(self):\n+\t\tprogress = UnlimitedProgress(10000, "Reading input file", self.verbosity)\n \t\ttranscripts = []\n-\t\tfor newTranscript in parser.getIterat'..b'+\t\tself._iterate()\n \t\tself.writer.close()\n \t\tif self.verbosity > 0:\n \t\t\tprint "# input:   %d" % (self.nbElements)\n@@ -162,21 +182,21 @@\n \tdescription = "Clusterize v1.0.3: clusterize the data which overlap. [Category: Merge]"\n \n \tparser = OptionParser(description = description)\n-\tparser.add_option("-i", "--input",     dest="inputFileName",  action="store",\t\t\t\t     type="string", help="input file [compulsory] [format: file in transcript format given by -f]")\n-\tparser.add_option("-f", "--format",    dest="format",\t\t action="store",\t\t\t\t     type="string", help="format of file [format: transcript file format]")\n-\tparser.add_option("-o", "--output",    dest="outputFileName", action="store",\t\t\t\t     type="string", help="output file [compulsory] [format: output file in transcript format given by -u]")\n-\tparser.add_option("-u", "--outputFormat", dest="outputFormat", action="store",     default="gff",\t\t     type="string", help="output file format [format: transcript file format]")\n-\tparser.add_option("-c", "--colinear",  dest="colinear",       action="store_true", default=False,\t\t\t\thelp="merge colinear transcripts only [format: bool] [default: false]")\n-\tparser.add_option("-d", "--distance",  dest="distance",       action="store",      default=0,     type="int",    help="max. distance between two transcripts to be merged [format: int] [default: 0]")\n-\tparser.add_option("-n", "--normalize", dest="normalize",      action="store_true", default=False,\t\t\t\thelp="normalize the number of reads per cluster by the number of mappings per read [format: bool] [default: false]")\n-\tparser.add_option("-s", "--sorted",    dest="sorted",\t\t action="store_true", default=False,\t\t\t\thelp="input is already sorted [format: bool] [default: false]")\n-\tparser.add_option("-v", "--verbosity", dest="verbosity",      action="store",      default=1,     type="int",    help="trace level [format: int] [default: 1]")\n+\tparser.add_option("-i", "--inputs",       dest="inputFileNames", action="store",\t\t\t\t     type="string", help="input files (separated by commas) [compulsory] [format: string]")\n+\tparser.add_option("-f", "--format",       dest="format",\t\t action="store",\t\t\t\t     type="string", help="format of file [format: transcript file format]")\n+\tparser.add_option("-o", "--output",       dest="outputFileName", action="store",\t\t\t\t     type="string", help="output file [compulsory] [format: output file in transcript format given by -u]")\n+\tparser.add_option("-u", "--outputFormat", dest="outputFormat",   action="store",      default="gff",\t\t        type="string", help="output file format [format: transcript file format]")\n+\tparser.add_option("-c", "--collinear",    dest="collinear",      action="store_true", default=False,\t\t\t\thelp="merge collinear transcripts only [format: bool] [default: false]")\n+\tparser.add_option("-d", "--distance",     dest="distance",       action="store",      default=0,     type="int",    help="max. distance between two transcripts to be merged [format: int] [default: 0]")\n+\tparser.add_option("-n", "--normalize",    dest="normalize",      action="store_true", default=False,\t\t\t\thelp="normalize the number of reads per cluster by the number of mappings per read [format: bool] [default: false]")\n+\tparser.add_option("-s", "--sorted",       dest="sorted",\t\t action="store_true", default=False,\t\t\t\thelp="input is already sorted [format: bool] [default: false]")\n+\tparser.add_option("-v", "--verbosity",    dest="verbosity",      action="store",      default=1,     type="int",    help="trace level [format: int] [default: 1]")\n \t(options, args) = parser.parse_args()\n \n \tc = Clusterize(options.verbosity)\n-\tc.setInputFile(options.inputFileName, options.format)\n+\tc.setInputFiles(options.inputFileNames.split(","), options.format)\n \tc.setOutputFileName(options.outputFileName, options.outputFormat)\n-\tc.setColinear(options.colinear)\n+\tc.setColinear(options.collinear)\n \tc.setDistance(options.distance)\n \tc.setNormalize(options.normalize)\n \tc.setPresorted(options.sorted)\n'
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/Java/Python/misc/RPlotter.pyc
b
Binary file SMART/Java/Python/misc/RPlotter.pyc has changed
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/Java/Python/structure/TranscriptContainer.pyc
b
Binary file SMART/Java/Python/structure/TranscriptContainer.pyc has changed
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/galaxy/.CompareOverlappingSmallRef.xml.swp
b
Binary file SMART/galaxy/.CompareOverlappingSmallRef.xml.swp has changed
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/galaxy/Clusterize.xml
--- a/SMART/galaxy/Clusterize.xml Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/galaxy/Clusterize.xml Fri Feb 21 08:32:36 2014 -0500
[
@@ -4,26 +4,8 @@
  <requirement type="set_environment">PYTHONPATH</requirement>
  </requirements>
  <command interpreter="python">
- ../Java/Python/clusterize.py -i $formatType.inputFileName
- #if $formatType.FormatInputFileName == 'bed':
- -f bed
- #elif $formatType.FormatInputFileName == 'gff':
- -f gff
- #elif $formatType.FormatInputFileName == 'gff2':
- -f gff2
- #elif $formatType.FormatInputFileName == 'gff3':
- -f gff3
- #elif $formatType.FormatInputFileName == 'sam':
- -f sam
- #elif $formatType.FormatInputFileName == 'bam':
- -f bam
- #elif $formatType.FormatInputFileName == 'gtf':
- -f gtf
- #end if
- -o $outputFileGff 
- $colinear
- $normalize
- -d $distance
+ #set $inputFiles = ",".join(["%s" % (s) for s in $formatType.inputFileName])
+ ../Java/Python/clusterize.py -i $inputFiles -f $formatType.FormatInputFileName -o $outputFileGff $colinear $normalize -d $distance
  </command>
 
  <inputs>
@@ -34,29 +16,29 @@
  <option value="gff2">gff2</option>
  <option value="gff3">gff3</option>
  <option value="sam">sam</option>
+ <option value="gtf">gtf</option>
  <option value="bam">bam</option>
- <option value="gtf">gtf</option>
  </param>
  <when value="bed">
- <param name="inputFileName" format="bed" type="data" label="Input File"/>
+ <param name="inputFileName" format="bed" type="data" multiple="true" label="Input File"/>
  </when>
  <when value="gff">
- <param name="inputFileName" format="gff" type="data" label="Input File"/>
+ <param name="inputFileName" format="gff" type="data" multiple="true" label="Input File"/>
  </when>
  <when value="gff2">
- <param name="inputFileName" format="gff2" type="data" label="Input File"/>
+ <param name="inputFileName" format="gff2" type="data" multiple="true" label="Input File"/>
  </when>
  <when value="gff3">
- <param name="inputFileName" format="gff3" type="data" label="Input File"/>
+ <param name="inputFileName" format="gff3" type="data" multiple="true" label="Input File"/>
  </when>
  <when value="sam">
- <param name="inputFileName" format="sam" type="data" label="Input File"/>
+ <param name="inputFileName" format="sam" type="data" multiple="true" label="Input File"/>
+ </when>
+ <when value="gtf">
+ <param name="inputFileName" format="gtf" type="data" multiple="true" label="Input File"/>
  </when>
  <when value="bam">
- <param name="inputFileName" format="bam" type="data" label="Input File"/>
- </when>
- <when value="gtf">
- <param name="inputFileName" format="gtf" type="data" label="Input File"/>
+ <param name="inputFileName" format="bam" type="data" multiple="true" label="Input File"/>
  </when>
  </conditional>
 
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/galaxy/CompareOverlappingAdapt.xml
--- a/SMART/galaxy/CompareOverlappingAdapt.xml Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/galaxy/CompareOverlappingAdapt.xml Fri Feb 21 08:32:36 2014 -0500
b
@@ -4,45 +4,15 @@
  <requirement type="set_environment">PYTHONPATH</requirement>
  </requirements>
  <command interpreter="python">
- ../Java/Python/CompareOverlappingAdapt.py -i $formatType.inputFileName1 
- #if $formatType.FormatInputFileName1 == 'bed':  
- -f bed
- #elif $formatType.FormatInputFileName1 == 'gff':
- -f gff
- #elif $formatType.FormatInputFileName1 == 'gff2':
- -f gff2
- #elif $formatType.FormatInputFileName1 == 'gff3':
- -f gff3
- #elif $formatType.FormatInputFileName1 == 'sam':
- -f sam
- #elif $formatType.FormatInputFileName1 == 'gtf':
- -f gtf
- #end if
- -j $formatType2.inputFileName2
- #if $formatType2.FormatInputFileName2 == 'bed':
- -g bed
- #elif $formatType2.FormatInputFileName2 == 'gff':
- -g gff
- #elif $formatType2.FormatInputFileName2 == 'gff2':
- -g gff2
- #elif $formatType2.FormatInputFileName2 == 'gff3':
- -g gff3
- #elif $formatType2.FormatInputFileName2 == 'sam':
- -g sam
- #elif $formatType2.FormatInputFileName2 == 'gtf':
-     -g gtf
- #end if
- -o $outputFileGff 
+ ../Java/Python/CompareOverlappingAdapt.py -i $formatType.inputFileName1 -f $formatType.FormatInputFileName1 -j $formatType2.inputFileName2 -g $formatType2.FormatInputFileName2 -o $outputFileGff $InvertMatch $NotOverlapping -m $NbOverlap
  #if $OptionDistance.Dist == 'Yes':
  -d $OptionDistance.distance
  #end if
- #if $OptionCollinearOrAntiSens.OptionCA == 'Collinear':
+ #if $OptionCA == 'Collinear':
  -c 
- #elif $OptionCollinearOrAntiSens.OptionCA == 'AntiSens':
+ #elif $OptionCA == 'AntiSense':
  -a
  #end if
- $InvertMatch
- $NotOverlapping
  </command>
 
  <inputs>
@@ -114,21 +84,14 @@
  <when value="No">
  </when>
  </conditional>
- <conditional name="OptionCollinearOrAntiSens">
- <param name="OptionCA" type="select" label="Collinear or anti-sens">
- <option value="Collinear">Collinear</option>
- <option value="AntiSens">AntiSens</option>
- <option value="NONE" selected="true">NONE</option>
- </param>
- <when value="Collinear">
- </when>
- <when value="AntiSens">
- </when>
- <when value="NONE">
- </when>
- </conditional>
+ <param name="OptionCA" type="select" label="Collinear or anti-sense features only">
+ <option value="Collinear">Collinear</option>
+ <option value="AntiSense">AntiSense</option>
+ <option value="All" selected="true">All</option>
+ </param>
  <param name="InvertMatch" type="boolean" truevalue="-x" falsevalue="" checked="false" label="Invert match: the output file will contain all query elements which do NOT overlap"/>
  <param name="NotOverlapping" type="boolean" truevalue="-O" falsevalue="" checked="false" label="Also report the query data which do not overlap, with the nbOverlaps tag set to 0."/>
+ <param name="NbOverlap" type="integer" value="1" label="Min. # of overlapping nt. to declare an overlap."/>
  </inputs>
 
  <outputs>
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/galaxy/CompareOverlappingSmallQuery.xml
--- a/SMART/galaxy/CompareOverlappingSmallQuery.xml Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/galaxy/CompareOverlappingSmallQuery.xml Fri Feb 21 08:32:36 2014 -0500
b
@@ -4,60 +4,21 @@
  <requirement type="set_environment">PYTHONPATH</requirement>
  </requirements>
  <command interpreter="python">
- ../Java/Python/CompareOverlappingSmallQuery.py -i $formatType.inputFileName1 
- #if $formatType.FormatInputFileName1 == 'bed':  
- -f bed
- #elif $formatType.FormatInputFileName1 == 'gff':
- -f gff
- #elif $formatType.FormatInputFileName1 == 'gff2':
- -f gff2
- #elif $formatType.FormatInputFileName1 == 'gff3':
- -f gff3
- #elif $formatType.FormatInputFileName1 == 'sam':
- -f sam
- #elif $formatType.FormatInputFileName1 == 'bam':
- -f bam
- #elif $formatType.FormatInputFileName1 == 'gtf':
- -f gtf
- #end if
- -j $formatType2.inputFileName2
- #if $formatType2.FormatInputFileName2 == 'bed':
- -g bed
- #elif $formatType2.FormatInputFileName2 == 'gff':
- -g gff
- #elif $formatType2.FormatInputFileName2 == 'gff2':
- -g gff2
- #elif $formatType2.FormatInputFileName2 == 'gff3':
- -g gff3
- #elif $formatType2.FormatInputFileName2 == 'sam':
- -g sam
- #elif $formatType2.FormatInputFileName2 == 'bam':
- -g bam
- #elif $formatType2.FormatInputFileName2 == 'gtf':
-     -g gtf
- #end if
- -o $outputFileGff 
+ ../Java/Python/CompareOverlappingSmallQuery.py -i $formatType.inputFileName1 -f $formatType.FormatInputFileName1 -j $formatType2.inputFileName2 -g $formatType2.FormatInputFileName2 -o $outputFileGff $InvertMatch $NotOverlapping $OptionInclusionQuery $OptionInclusionRef -m $OptionMinOverlap
  #if $OptionDistance.Dist == 'Yes':
  -d $OptionDistance.distance
  #end if
- #if $OptionMinOverlap.present == 'Yes':
- -m $OptionMinOverlap.minOverlap
- #end if
  #if $OptionPcOverlapQuery.present == 'Yes':
  -p $OptionPcOverlapQuery.minOverlap
  #end if
  #if $OptionPcOverlapRef.present == 'Yes':
  -P $OptionPcOverlapRef.minOverlap
  #end if
- #if $OptionCollinearOrAntiSens.OptionCA == 'Collinear':
+ #if $OptionCA == 'Collinear':
  -c 
- #elif $OptionCollinearOrAntiSens.OptionCA == 'AntiSens':
+ #elif $OptionCA == 'AntiSense':
  -a
  #end if
- $InvertMatch
- $NotOverlapping
- $OptionInclusionQuery
- $OptionInclusionRef
  </command>
 
  <inputs>
@@ -91,7 +52,7 @@
  </when>
  <when value="gtf">
  <param name="inputFileName1" format="gtf" type="data" label="Input File 1"/>
-                         </when>
+ </when>
  </conditional>
 
  <conditional name="formatType2">
@@ -137,24 +98,14 @@
  <when value="No">
  </when>
  </conditional>
- <conditional name="OptionMinOverlap">
- <param name="present" type="select" label="Minimum number of common nucleotides to declare an overlap">
- <option value="Yes">Yes</option>
- <option value="No" selected="true">No</option>
- </param>
- <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
- </when>
- <when value="No">
- </when>
- </conditional>
+ <param name="OptionMinOverlap" type="integer" value="1" label="Min. # of overlapping nt. to declare an overlap."/>
  <conditional name="OptionPcOverlapQuery">
  <param name="present" type="select" label="N% of the query must overlap">
  <option value="Yes">Yes</option>
  <option value="No" selected="true">No</option>
  </param>
  <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
+ <param name="minOverlap" type="integer" value="100"/>
  </when>
  <when value="No">
  </when>
@@ -165,26 +116,18 @@
  <option value="No" selected="true">No</option>
  </param>
  <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
+ <param name="minOverlap" type="integer" value="100"/>
  </when>
  <when value="No">
  </when>
  </conditional>
- <param name="OptionInclusionQuery" type="boolean" truevalue="-k" falsevalue="" checked="false" label="The query must be nested in a query"/>
+ <param name="OptionInclusionQuery" type="boolean" truevalue="-k" falsevalue="" checked="false" label="The query must be nested in a reference"/>
  <param name="OptionInclusionRef" type="boolean" truevalue="-K" falsevalue="" checked="false" label="The reference must be nested in a query"/>
- <conditional name="OptionCollinearOrAntiSens">
- <param name="OptionCA" type="select" label="Collinear or anti-sens">
- <option value="Collinear">Collinear</option>
- <option value="AntiSens">AntiSens</option>
- <option value="NONE" selected="true">NONE</option>
- </param>
- <when value="Collinear">
- </when>
- <when value="AntiSens">
- </when>
- <when value="NONE">
- </when>
- </conditional>
+ <param name="OptionCA" type="select" label="Collinear or anti-sense only">
+ <option value="Collinear">Collinear</option>
+ <option value="AntiSense">AntiSense</option>
+ <option value="All" selected="true">All</option>
+ </param>
  <param name="InvertMatch" type="boolean" truevalue="-x" falsevalue="" checked="false" label="Invert match: the output file will contain all query elements which do NOT overlap"/>
  <param name="NotOverlapping" type="boolean" truevalue="-O" falsevalue="" checked="false" label="Also report the query data which do not overlap, with the nbOverlaps tag set to 0."/>
  </inputs>
b
diff -r 2a4884ba3e5c -r 90f4b29d884f SMART/galaxy/CompareOverlappingSmallRef.xml
--- a/SMART/galaxy/CompareOverlappingSmallRef.xml Mon Feb 10 03:39:09 2014 -0500
+++ b/SMART/galaxy/CompareOverlappingSmallRef.xml Fri Feb 21 08:32:36 2014 -0500
b
@@ -1,63 +1,24 @@
 <tool id="CompareOverlappingSmallRef" name="compare overlapping small reference">
- <description>Provide the queries that overlap with a reference, when the reference dataset is small.</description>  
+ <description>Provide the queries that overlap with a reference, when the query data set is small.</description>  
  <requirements>
  <requirement type="set_environment">PYTHONPATH</requirement>
  </requirements>
  <command interpreter="python">
- ../Java/Python/CompareOverlappingSmallQuery.py -i $formatType.inputFileName1 
- #if $formatType.FormatInputFileName1 == 'bed':  
- -f bed
- #elif $formatType.FormatInputFileName1 == 'gff':
- -f gff
- #elif $formatType.FormatInputFileName1 == 'gff2':
- -f gff2
- #elif $formatType.FormatInputFileName1 == 'gff3':
- -f gff3
- #elif $formatType.FormatInputFileName1 == 'sam':
- -f sam
- #elif $formatType.FormatInputFileName1 == 'bam':
- -f bam
- #elif $formatType.FormatInputFileName1 == 'gtf':
- -f gtf
- #end if
- -j $formatType2.inputFileName2
- #if $formatType2.FormatInputFileName2 == 'bed':
- -g bed
- #elif $formatType2.FormatInputFileName2 == 'gff':
- -g gff
- #elif $formatType2.FormatInputFileName2 == 'gff2':
- -g gff2
- #elif $formatType2.FormatInputFileName2 == 'gff3':
- -g gff3
- #elif $formatType2.FormatInputFileName2 == 'sam':
- -g sam
- #elif $formatType2.FormatInputFileName2 == 'bam':
- -g bam
- #elif $formatType2.FormatInputFileName2 == 'gtf':
-     -g gtf
- #end if
- -o $outputFileGff 
+ ../Java/Python/CompareOverlappingSmallRef.py -i $formatType.inputFileName1 -f $formatType.FormatInputFileName1 -j $formatType2.inputFileName2 -g $formatType2.FormatInputFileName2 -o $outputFileGff $InvertMatch $NotOverlapping $OptionInclusionQuery $OptionInclusionRef -m $OptionMinOverlap
  #if $OptionDistance.Dist == 'Yes':
  -d $OptionDistance.distance
  #end if
- #if $OptionMinOverlap.present == 'Yes':
- -m $OptionMinOverlap.minOverlap
- #end if
  #if $OptionPcOverlapQuery.present == 'Yes':
  -p $OptionPcOverlapQuery.minOverlap
  #end if
  #if $OptionPcOverlapRef.present == 'Yes':
  -P $OptionPcOverlapRef.minOverlap
  #end if
- #if $OptionCollinearOrAntiSens.OptionCA == 'Collinear':
+ #if $OptionCA == 'Collinear':
  -c 
- #elif $OptionCollinearOrAntiSens.OptionCA == 'AntiSens':
+ #elif $OptionCA == 'AntiSense':
  -a
  #end if
- $InvertMatch
- $NotOverlapping
- $OptionInclusionQuery
- $OptionInclusionRef
  </command>
 
  <inputs>
@@ -91,7 +52,7 @@
  </when>
  <when value="gtf">
  <param name="inputFileName1" format="gtf" type="data" label="Input File 1"/>
-                         </when>
+ </when>
  </conditional>
 
  <conditional name="formatType2">
@@ -137,24 +98,14 @@
  <when value="No">
  </when>
  </conditional>
- <conditional name="OptionMinOverlap">
- <param name="present" type="select" label="Minimum number of common nucleotides to declare an overlap">
- <option value="Yes">Yes</option>
- <option value="No" selected="true">No</option>
- </param>
- <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
- </when>
- <when value="No">
- </when>
- </conditional>
+ <param name="OptionMinOverlap" type="integer" value="1" label="Min. # of overlapping nt. to declare an overlap."/>
  <conditional name="OptionPcOverlapQuery">
  <param name="present" type="select" label="N% of the query must overlap">
  <option value="Yes">Yes</option>
  <option value="No" selected="true">No</option>
  </param>
  <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
+ <param name="minOverlap" type="integer" value="100"/>
  </when>
  <when value="No">
  </when>
@@ -165,26 +116,18 @@
  <option value="No" selected="true">No</option>
  </param>
  <when value="Yes">
- <param name="minOverlap" type="integer" value="0"/>
+ <param name="minOverlap" type="integer" value="100"/>
  </when>
  <when value="No">
  </when>
  </conditional>
- <param name="OptionInclusionQuery" type="boolean" truevalue="-k" falsevalue="" checked="false" label="The query must be nested in a query"/>
+ <param name="OptionInclusionQuery" type="boolean" truevalue="-k" falsevalue="" checked="false" label="The query must be nested in a reference"/>
  <param name="OptionInclusionRef" type="boolean" truevalue="-K" falsevalue="" checked="false" label="The reference must be nested in a query"/>
- <conditional name="OptionCollinearOrAntiSens">
- <param name="OptionCA" type="select" label="Collinear or anti-sens">
- <option value="Collinear">Collinear</option>
- <option value="AntiSens">AntiSens</option>
- <option value="NONE" selected="true">NONE</option>
- </param>
- <when value="Collinear">
- </when>
- <when value="AntiSens">
- </when>
- <when value="NONE">
- </when>
- </conditional>
+ <param name="OptionCA" type="select" label="Collinear or anti-sense only">
+ <option value="Collinear">Collinear</option>
+ <option value="AntiSense">AntiSense</option>
+ <option value="All" selected="true">All</option>
+ </param>
  <param name="InvertMatch" type="boolean" truevalue="-x" falsevalue="" checked="false" label="Invert match: the output file will contain all query elements which do NOT overlap"/>
  <param name="NotOverlapping" type="boolean" truevalue="-O" falsevalue="" checked="false" label="Also report the query data which do not overlap, with the nbOverlaps tag set to 0."/>
  </inputs>