Skip to content

Instantly share code, notes, and snippets.

@hartzell
Created July 8, 2020 17:47
Show Gist options
  • Save hartzell/e0b03757bb02c86ead340aa96c7cd3d6 to your computer and use it in GitHub Desktop.
Save hartzell/e0b03757bb02c86ead340aa96c7cd3d6 to your computer and use it in GitHub Desktop.
quick perl revcomp
echo -n "CAAT" | perl -pe '{tr/atcgATCG/tagcTAGC/; $_=reverse}'
or for IUPAC:
tr/ABCDGHMNRSTUVWXYabcdghmnrstuvwxy/TVGHCDKNYSAABWXRtvghcdknysaabwxr/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment