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

Changeset 48:809ed01c8014 (2013-12-09)
Previous changeset 47:b6481845eb0d (2013-09-30) Next changeset 49:80a080dc3ee8 (2013-12-13)
Commit message:
Deleted selected files
removed:
SMART/Java/Python/compareOverlapping.py
b
diff -r b6481845eb0d -r 809ed01c8014 SMART/Java/Python/compareOverlapping.py
--- a/SMART/Java/Python/compareOverlapping.py Mon Sep 30 05:51:28 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,126 +0,0 @@\n-#! /usr/bin/env python\n-#\n-# Copyright INRA-URGI 2009-2010\n-# \n-# This software is governed by the CeCILL license under French law and\n-# abiding by the rules of distribution of free software. You can use,\n-# modify and/ or redistribute the software under the terms of the CeCILL\n-# license as circulated by CEA, CNRS and INRIA at the following URL\n-# "http://www.cecill.info".\n-# \n-# As a counterpart to the access to the source code and rights to copy,\n-# modify and redistribute granted by the license, users are provided only\n-# with a limited warranty and the software\'s author, the holder of the\n-# economic rights, and the successive licensors have only limited\n-# liability.\n-# \n-# In this respect, the user\'s attention is drawn to the risks associated\n-# with loading, using, modifying and/or developing or reproducing the\n-# software by the user in light of its specific status of free software,\n-# that may mean that it is complicated to manipulate, and that also\n-# therefore means that it is reserved for developers and experienced\n-# professionals having in-depth computer knowledge. Users are therefore\n-# encouraged to load and test the software\'s suitability as regards their\n-# requirements in conditions enabling the security of their systems and/or\n-# data to be ensured and, more generally, to use and operate it in the\n-# same conditions as regards security.\n-# \n-# The fact that you are presently reading this means that you have had\n-# knowledge of the CeCILL license and that you accept its terms.\n-#\n-"""Compare overlap of two transcript lists"""\n-import sys\n-import os\n-from optparse import OptionParser\n-from SMART.Java.Python.misc import Utils\n-from SMART.Java.Python.structure.TranscriptContainer import TranscriptContainer\n-from commons.core.writer.TranscriptWriter import TranscriptWriter\n-from SMART.Java.Python.structure.TranscriptListsComparator import TranscriptListsComparator\n-from SMART.Java.Python.misc.RPlotter import RPlotter\n-from commons.core.writer.Gff3Writer import Gff3Writer\n-\n-class CompareOverlapping(object):\n-\n-    def __init__(self):\n-        self._options = None\n-\n-\n-    def setAttributesFromCmdLine(self):\n-        description = "Compare Overlapping v1.0.3: Get the data which overlap with a reference set. [Category: Data Comparison]"\n-\n-        parser = OptionParser(description = description)\n-        parser.add_option("-i", "--input1",           dest="inputFileName1", action="store",                     type="string", help="input file 1 [compulsory] [format: file in transcript format given by -f]")\n-        parser.add_option("-f", "--format1",          dest="format1",        action="store",                     type="string", help="format of file 1 [compulsory] [format: transcript file format]")\n-        parser.add_option("-j", "--input2",           dest="inputFileName2", action="store",                     type="string", help="input file 2 [compulsory] [format: file in transcript format given by -g]")\n-        parser.add_option("-g", "--format2",          dest="format2",        action="store",                     type="string", help="format of file 2 [compulsory] [format: transcript file format]")\n-        parser.add_option("-o", "--output",           dest="output",         action="store",      default=None,  type="string", help="output file [compulsory] [format: output file in GFF3 format]")\n-        parser.add_option("-S", "--start1",           dest="start1",         action="store",      default=None,  type="int",    help="only consider the n first nucleotides of the transcripts in file 1 (do not use it with -U) [format: int]")\n-        parser.add_option("-s", "--start2",           dest="start2",         action="store",      default=None,  type="int",    help="only consider the n first nucleotides of the transcripts in file 2 (do not use it with -u) [format: int]")\n-        parser.add_option("-U", "--end1",             dest="end1",           action="store",      default=None,  type="int'..b'pping",   dest="notOverlapping", action="store_true", default=False,                help="also output not overlapping data [format: bool] [default: false]")\n-        parser.add_option("-x", "--exclude",          dest="exclude",        action="store_true", default=False,                help="invert the match [format: bool] [default: false]")\n-        parser.add_option("-v", "--verbosity",        dest="verbosity",      action="store",      default=1,     type="int",    help="trace level [format: int]")\n-        parser.add_option("-l", "--log",              dest="log",            action="store_true", default=False,                help="write a log file [format: bool] [default: false]")\n-        (self._options, args) = parser.parse_args()\n-\n-\n-    def run(self):             \n-        logHandle = None\n-        if self._options.log:\n-            logHandle = open(self._options.output, "w")\n-\n-        transcriptContainer1 = TranscriptContainer(self._options.inputFileName1, self._options.format1, self._options.verbosity)\n-        transcriptContainer2 = TranscriptContainer(self._options.inputFileName2, self._options.format2, self._options.verbosity)\n-        writer               = TranscriptWriter(self._options.output, "gff3", self._options.verbosity)\n-\n-        transcriptListComparator = TranscriptListsComparator(logHandle, self._options.verbosity)\n-        transcriptListComparator.restrictToStart(transcriptListComparator.QUERY, self._options.start1)\n-        transcriptListComparator.restrictToStart(transcriptListComparator.REFERENCE, self._options.start2)\n-        transcriptListComparator.restrictToEnd(transcriptListComparator.QUERY, self._options.end1)\n-        transcriptListComparator.restrictToEnd(transcriptListComparator.REFERENCE, self._options.end2)\n-        transcriptListComparator.extendFivePrime(transcriptListComparator.QUERY, self._options.fivePrime1)\n-        transcriptListComparator.extendFivePrime(transcriptListComparator.REFERENCE, self._options.fivePrime2)\n-        transcriptListComparator.extendThreePrime(transcriptListComparator.QUERY, self._options.threePrime1)\n-        transcriptListComparator.extendThreePrime(transcriptListComparator.REFERENCE, self._options.threePrime2)\n-        transcriptListComparator.acceptIntrons(transcriptListComparator.QUERY, self._options.introns)\n-        transcriptListComparator.acceptIntrons(transcriptListComparator.REFERENCE, self._options.introns)\n-        transcriptListComparator.getAntisenseOnly(self._options.antisense)\n-        transcriptListComparator.getColinearOnly(self._options.colinear)\n-        transcriptListComparator.getInvert(self._options.exclude)\n-        transcriptListComparator.setMaxDistance(self._options.distance)\n-        transcriptListComparator.setMinOverlap(self._options.minOverlap)\n-        transcriptListComparator.setPcOverlap(self._options.pcOverlap)\n-        transcriptListComparator.setIncludedOnly(self._options.included)\n-        transcriptListComparator.setIncludingOnly(self._options.including)\n-        transcriptListComparator.includeNotOverlapping(self._options.notOverlapping)\n-        transcriptListComparator.computeOdds(True)\n-        transcriptListComparator.setInputTranscriptContainer(transcriptListComparator.QUERY, transcriptContainer1)\n-        transcriptListComparator.setInputTranscriptContainer(transcriptListComparator.REFERENCE, transcriptContainer2)\n-        transcriptListComparator.setOutputWriter(writer)\n-        transcriptListComparator.compareTranscriptList()\n-\n-        if self._options.log:\n-            logHandle.close()\n-\n-        if not self._options.exclude:\n-            odds = transcriptListComparator.getOdds()\n-            if self._options.verbosity > 0 and odds:\n-                print "min/avg/med/max transcripts: %d/%.2f/%.1f/%d" % Utils.getMinAvgMedMax(odds)\n-                \n-if __name__ == "__main__":\n-    icompareOverlapping = CompareOverlapping()\n-    icompareOverlapping.setAttributesFromCmdLine()\n-    icompareOverlapping.run()\n'