- Thanks! the reason I want to do this (Hope I can explain it correctly) is that when I want to see the gene regions in UCSC genome browser, my Bam files are in opposite strand. or when I do calculations on them I have to look at the values for the opposite strand.. hence, a suggestion was to just change the strands..
- will use '\t'. I get the header by samtools as It was giving me error that there is no header, and hence, I get the header from original file and then put it in the newbamfile at the end..
- I also have tried and($2,0x10) = would you mean something like this with negating the fourth bit?
Any suggestions for any replacement to awk? I can also go ahead without this step, (just always have to be sure to consider the opposite strand which sounds like more confusion down the road than changing the strands..)
Forgive my naiveness, if my steps don't make sense, I am trying to understand these Bam files and your suggestions would be great to have!