windows - How to make batch file that will swap typed characters (A=T to T=A) -


i want make simple batch file can type in letters dna bases (a, t, g, c) , change text type opposite base pairs. please me make code.

examples:

a=t  t=a  c=g  g=c 

these changes want batch file make. want typing within batch file.

most obvious solution (quite straight forward):

set x=atatatccgcatcgatcgaa set x=%x:a=x% set x=%x:t=a% set x=%x:x=t% set x=%x:g=x% set x=%x:c=g% set x=%x:x=c% echo %x% 

replace "a"s "x", replace "t"s "a", replace "x"s "t". same "g"-"c".


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -