+ made original reads file location a parameter for the command line
authorfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 14 May 2008 16:06:10 +0000 (16:06 +0000)
committerfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 14 May 2008 16:06:10 +0000 (16:06 +0000)
git-svn-id: http://svn.tuebingen.mpg.de/ag-raetsch/projects/QPalma@9011 e1793c9e-67f9-0310-80fc-b846ff1f7b36

scripts/PipelineHeuristic.py

index 175e18d..4b51450 100644 (file)
@@ -55,7 +55,7 @@ class PipelineHeuristic:
    vmatch is spliced an should be then newly aligned using QPalma or not.
    """
 
-   def __init__(self,run_fname,data_fname,param_fname,result_spliced_fname,result_unspliced_fname):
+   def __init__(self,run_fname,data_fname,reads_pipeline_fn,param_fname,result_spliced_fname,result_unspliced_fname):
       """
       We need a run object holding information about the nr. of support points
       etc.
@@ -126,7 +126,7 @@ class PipelineHeuristic:
    
       self.original_reads = {}
 
-      for line in open('/fml/ag-raetsch/share/projects/qpalma/solexa/allReads.pipeline'):
+      for line in open(reads_pipeline_fn):
          line = line.strip()
          id,seq,q1,q2,q3 = line.split()
          id = int(id)
@@ -594,15 +594,16 @@ def cpu():
 
 
 if __name__ == '__main__':
-   if len(sys.argv) != 6:
-      print 'Usage: ./%s data param run spliced.results unspliced.results' % (sys.argv[0])
+   if len(sys.argv) != 7:
+      print 'Usage: ./%s data reads param run spliced.results unspliced.results' % (sys.argv[0])
 
    data_fname = sys.argv[1]
-   param_fname = sys.argv[2]
-   run_fname = sys.argv[3]
+   reads_pipeline_fn = sys.argv[2]
+   param_fname = sys.argv[3]
+   run_fname = sys.argv[4]
 
-   result_spliced_fname    = sys.argv[4]
-   result_unspliced_fname  = sys.argv[5]
+   result_spliced_fname    = sys.argv[5]
+   result_unspliced_fname  = sys.argv[6]
 
    jp = os.path.join
 
@@ -614,7 +615,7 @@ if __name__ == '__main__':
    #result_spliced_fname    = 'splicedReads.heuristic'
    #result_unspliced_fname  = 'unsplicedReads.heuristic'
 
-   ph1 = PipelineHeuristic(run_fname,data_fname,param_fname,result_spliced_fname,result_unspliced_fname)
+   ph1 = PipelineHeuristic(run_fname,data_fname,reads_pipeline_fn,param_fname,result_spliced_fname,result_unspliced_fname)
 
    start = cpu()
    ph1.filter()