+ fixed index error for negative stand queries of splice scores
authorfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 4 Jun 2008 10:12:12 +0000 (10:12 +0000)
committerfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 4 Jun 2008 10:12:12 +0000 (10:12 +0000)
git-svn-id: http://svn.tuebingen.mpg.de/ag-raetsch/projects/QPalma@9383 e1793c9e-67f9-0310-80fc-b846ff1f7b36

qpalma/sequence_utils.py

index 8f52892..aac593d 100644 (file)
@@ -170,11 +170,10 @@ def get_seq_and_scores(chr,strand,genomicSeq_start,genomicSeq_stop,dna_flat_file
 
    # build reverse complement if on negative strand
    if strand == '-':
-      genomicSeq = reverse_complement(genomicSeq)
-      
       fn = 'chr%d.dna.flat' % chr
       filename = os.path.join(dna_flat_files,fn)
       cmd =  'wc -c %s | cut -f1 -d \' \'' % filename
+      #print cmd
       import subprocess
       obj = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
       out,err = obj.communicate()
@@ -183,11 +182,14 @@ def get_seq_and_scores(chr,strand,genomicSeq_start,genomicSeq_stop,dna_flat_file
          print 'Error occurred while trying to obtain file size'
       end = int(out)
 
-      print 'size is %d' % end
+      #print 'size is %d' % end
 
       intervalBegin = genomicSeq_start-100
       intervalEnd    = genomicSeq_stop+100
 
+      #print 'before getSpliceScores'
+      #print intervalBegin ,intervalEnd
+
       total_size = end
       currentAcc, currentDon = getSpliceScores(chr,strand,intervalBegin,intervalEnd,total_size)