ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/tophat
(Generate patch)
# Line 1527 | Line 1527
1527      bwt_log = open(logging_dir + 'bowtie.'+readfile_basename+'.fixmap.log', "w")
1528      #bwt_mapped=mapped_reads
1529      unmapped_reads_out=None
1530 <    if unmapped_reads:
1530 >    if unmapped_reads:
1531           unmapped_reads_out=unmapped_reads+".fq"
1532      use_FIFO = use_BWT_FIFO and use_zpacker and unmapped_reads and params.read_params.color
1533      if use_FIFO:
# Line 1563 | Line 1563
1563             if reads_format:
1564                unzip_cmd.append("--"+reads_format)
1565             unzip_cmd+=[reads_list]
1566 <        
1567 <        if use_zpacker and (unzip_cmd is None):
1566 >
1567 >        if use_zpacker and (unzip_cmd is None):
1568            unzip_cmd=[ params.system_params.zipper ]
1569            unzip_cmd.extend(params.system_params.zipper_opts)
1570  
# Line 1585 | Line 1585
1585                   os._exit(os.EX_OK)
1586  
1587          fix_map_cmd = [prog_path('fix_map_ordering')]
1588 <        sam_zipcmd=None
1588 >        samzip_cmd=None
1589          if unmapped_reads:
1590             #mapping on the genome
1591             #fix_map_ordering will write BAM file directly, and unmapped_reads as BAM file too
# Line 1602 | Line 1602
1602             fix_map_cmd += ["-"]
1603             if use_zpacker:
1604                fix_map_cmd += ["-"]
1605 <              sam_zipcmd=[ params.system_params.zipper ]
1606 <              sam_zipcmd.extend(params.system_params.zipper_opts)
1607 <              sam_zipcmd += ["-c"]
1605 >              samzip_cmd=[ params.system_params.zipper ]
1606 >              samzip_cmd.extend(params.system_params.zipper_opts)
1607 >              samzip_cmd += ["-c"]
1608                mapped_reads += ".z"
1609             else:
1610                fix_map_cmd += [mapped_reads]
1611 <        
1611 >
1612          max_hits = params.max_hits
1613          if t_mapping:
1614            max_hits = params.t_max_hits
# Line 1666 | Line 1666
1666                unzip_proc.stdout.close() # see http://bugs.python.org/issue7678
1667  
1668          shellcmd += ' '.join(bowtie_cmd) + '|' + ' '.join(fix_map_cmd)
1669 <        if sam_zipcmd:
1669 >        if samzip_cmd:
1670             shellcmd += "|"+ ' '.join(samzip_cmd)+" > " + mapped_reads
1671             fix_order_proc = subprocess.Popen(fix_map_cmd,
1672                                            stdin=bowtie_proc.stdout,
# Line 1677 | Line 1677
1677                                   stdin=fix_order_proc.stdout,
1678                                   stdout=open(mapped_reads, "wb"))
1679             fix_order_proc.stdout.close()
1680 <        else:
1680 >        else:
1681             #write BAM output directly
1682             fix_order_proc = subprocess.Popen(fix_map_cmd,
1683                                            stdin=bowtie_proc.stdout)
1684                                          # stdout=open(mapped_reads, "w"))
1685             bowtie_proc.stdout.close()
1686 <        
1686 >
1687          # shellcmd += " > " + mapped_reads
1688          print >> run_log, shellcmd
1689          if samzip_proc:
# Line 2809 | Line 2809
2809              maps[ri] = [merged_map]
2810          if not params.system_params.keep_tmp:
2811                  os.remove(unspl_samfile)
2812                os.remove(unspl_bwtfile)
2812          #for ri
2813      return maps
2814  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines