diff SMART/Java/Python/CompareOverlappingSmallQuery.py @ 46:169d364ddd91

Uploaded
author m-zytnicki
date Mon, 30 Sep 2013 03:19:26 -0400
parents 44d5973c188c
children 2ac71607aa60
line wrap: on
line diff
--- a/SMART/Java/Python/CompareOverlappingSmallQuery.py	Wed Sep 18 08:51:22 2013 -0400
+++ b/SMART/Java/Python/CompareOverlappingSmallQuery.py	Mon Sep 30 03:19:26 2013 -0400
@@ -74,9 +74,6 @@
 		self.collinear      = False
 		self.pcOverlapQuery = False
 		self.pcOverlapRef   = False
-		self.minOverlap     = False
-		self.included       = False
-		self.including      = False
 		self.bins	        = {}
 		self.overlaps       = {}
 		self.notOverlapping = False
@@ -110,13 +107,6 @@
 		self.pcOverlapQuery = pcOverlapQuery
 		self.pcOverlapRef   = pcOverlapRef
 
-	def setMinOverlap(self, minOverlap):
-		self.minOverlap = minOverlap
-
-	def setInclude(self, included, including):
-		self.included  = included
-		self.including = including
-
 	def includeNotOverlapping(self, boolean):
 		self.notOverlapping = boolean
 
@@ -145,18 +135,12 @@
 			return False
 		if self.antisense and queryTranscript.getDirection() == refTranscript.getDirection():
 			return False
-		if self.included and not refTranscript.include(queryTranscript):
-			return False
-		if self.including and not queryTranscript.include(refTranscript):
-			return False
 		querySize = queryTranscript.getSize()
 		if self.pcOverlapQuery and not queryTranscript.overlapWithExon(refTranscript, int(querySize * self.pcOverlapQuery / 100.0)):
 			return False
 		refSize = refTranscript.getSize()
 		if self.pcOverlapRef and not queryTranscript.overlapWithExon(refTranscript, int(refSize * self.pcOverlapRef / 100.0)):
 			return False
-		if self.minOverlap and not queryTranscript.overlapWithExon(refTranscript, self.minOverlap):
-			return False
 		return True
 
 	def _alterTranscript(self, transcript, type):
@@ -237,11 +221,8 @@
 	parser.add_option("-d", "--distance",		dest="distance",	   action="store",	    default=0,	   type="int",	 help="accept some distance between query and reference [format: int]")
 	parser.add_option("-c", "--collinear",		dest="collinear",	   action="store_true", default=False,			 	 help="provide collinear features [format: bool] [default: false]")
 	parser.add_option("-a", "--antisense",		dest="antisense",	   action="store_true", default=False,			 	 help="provide antisense features [format: bool] [default: false]")
-	parser.add_option("-m", "--minOverlap",	    dest="minOverlap",     action="store",      default=False, type="int",	 help="min. #nt overlap [format: bool] [default: false]")
 	parser.add_option("-p", "--pcOverlapQuery",	dest="pcOverlapQuery", action="store",      default=False, type="int",	 help="min. % overlap of the query [format: bool] [default: false]")
 	parser.add_option("-P", "--pcOverlapRef",	dest="pcOverlapRef",   action="store",      default=False, type="int",   help="min. % overlap of the reference [format: bool] [default: false]")
-	parser.add_option("-k", "--included",		dest="included",	   action="store_true", default=False,			 	 help="provide query elements which are nested in reference elements [format: bool] [default: false]")
-	parser.add_option("-K", "--including",		dest="including",	   action="store_true", default=False,			 	 help="provide query elements in which reference elements are nested [format: bool] [default: false]")
 	parser.add_option("-x", "--exclude",		dest="exclude",		   action="store_true", default=False,			 	 help="invert the match [format: bool] [default: false]")
 	parser.add_option("-v", "--verbosity",      dest="verbosity",	   action="store",      default=1,     type="int",	 help="trace level [format: int]")
 	(options, args) = parser.parse_args()
@@ -255,7 +236,5 @@
 	cosq.setCollinear(options.collinear)
 	cosq.setAntisense(options.antisense)
 	cosq.setMinPercentOverlap(options.pcOverlapQuery, options.pcOverlapRef)
-	cosq.setMinOverlap(options.minOverlap)
-	cosq.setInclude(options.included, options.including)
 	cosq.setInvert(options.exclude)
 	cosq.run()