author fabio Thu, 17 Apr 2008 22:28:15 +0000 (22:28 +0000) committer fabio Thu, 17 Apr 2008 22:28:15 +0000 (22:28 +0000)
git-svn-id: http://svn.tuebingen.mpg.de/ag-raetsch/projects/QPalma@8650 e1793c9e-67f9-0310-80fc-b846ff1f7b36

index 51b07b1..0d128c8 100644 (file)
@@ -79,7 +79,7 @@ class PipelineHeuristic:

# when we look for alternative alignments with introns this value is the
# mean of intron size
-      self.intron_size  = 150
+      self.intron_size  = 250

@@ -178,7 +178,7 @@ class PipelineHeuristic:
if strand == '-':
continue

-            if ctr == 100:
+            if ctr == 1000:
break

#if pos > 10000000:
@@ -284,13 +284,19 @@ class PipelineHeuristic:

return don,acc

-
def calcAlternativeAlignments(self,location):
"""
Given an alignment proposed by Vmatch this function calculates possible
alternative alignments taking into account for example matched
donor/acceptor positions.
"""
+      def signum(a):
+         if a>0:
+            return 1
+         elif a<0:
+            return -1
+         else:
+            return 0

run = self.run

@@ -317,7 +323,7 @@ class PipelineHeuristic:
alt_don,alt_acc = self.findHighestScoringSpliceSites(currentAcc,currentDon)

sort_acc=[ elem for elem in enumerate(currentAcc) ]
-      sort_acc.sort(lambda x,y: sign(x[1]-y[1]))
+      sort_acc.sort(lambda x,y: signum(x[1]-y[1]) )

(max_acc_pos,max_acc_score)=sort_acc[-1]

@@ -335,9 +341,10 @@ class PipelineHeuristic:
# inlined

# compute dummy scores
-      IntronScore = calculatePlif(h, [math.fabs(max_acc_pos-30)])[0]
-      #print IntronScore
-      dummyAcceptorScore = calculatePlif(a, [max_acc_score])[0]
+      #IntronScore = calculatePlif(h, [math.fabs(max_acc_pos-30)])[0]
+      #dummyAcceptorScore = calculatePlif(a, [max_acc_score])[0]
+      IntronScore = calculatePlif(h, [self.intron_size])[0] - 0.5
+      dummyAcceptorScore = calculatePlif(a, [0.25])[0]
dummyDonorScore = calculatePlif(d, [0.25])[0]

_start = cpu()
@@ -482,10 +489,10 @@ if __name__ == '__main__':
jp = os.path.join

run_fname   = jp(dir,'run_object.pickle')
-   #data_fname = '/fml/ag-raetsch/share/projects/qpalma/solexa/current_data/map.vm_unspliced_flag'
+   #data_fname = '/fml/ag-raetsch/share/projects/qpalma/solexa/current_data/map.vm_unspliced_1k'

-   #data_fname  = '/fml/ag-raetsch/share/projects/qpalma/solexa/pipeline_data/map.vm_2k'
-   data_fname  = '/fml/ag-raetsch/share/projects/qpalma/solexa/pipeline_data/map.vm_100'
+   data_fname  = '/fml/ag-raetsch/share/projects/qpalma/solexa/pipeline_data/map.vm_2k'
+   #data_fname  = '/fml/ag-raetsch/share/projects/qpalma/solexa/pipeline_data/map.vm_100'

param_fname = jp(dir,'param_500.pickle')