#!/usr/bin/perl #=============================================================================== # # FILE: tranMappedRefReads.pl # # USAGE: ./tranMappedRefReads.pl # # DESCRIPTION: Translate the mapped short reads to the reference genome using # bowtie to the mapping format needed by IsoInfer # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Jianxing Feng (feeldead), feeldead@gmail.com # COMPANY: THU # VERSION: 1.0 # CREATED: 05/29/2010 10:39:52 PM # REVISION: --- #=============================================================================== if( @ARGV < 1 ){ die("Usage: ./tranMappedRefReads.pl \n"); } $read_len = $ARGV[0]; while () { chomp; @tmp = split(/\t/); $chr = $tmp[2]; $strand = $tmp[1]; $start = $tmp[3]; $end = $start + $read_len; print "$chr\t$strand\t$start\t$end\n"; }