Skip to content

Instantly share code, notes, and snippets.

@nuada
Last active August 29, 2015 14:01
Show Gist options
  • Save nuada/9a3cbe05a0c7e6b5e32c to your computer and use it in GitHub Desktop.
Save nuada/9a3cbe05a0c7e6b5e32c to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "track name=\"$(basename $1)\" description=\"hydra output\" useScore=0 colorByStrand=255,0,0 0,0,255 gffTags=on"
awk -F '\t' '{ \
gsub("+", "forward", $9); \
gsub("-", "reverse", $9); \
print $1 FS $2 FS $3 FS "Name=" $7 ";Strand=" $9 ";numMapping=" $16 FS FS $9; }' $1
awk -F '\t' '{
gsub("+", "forward", $10); \
gsub("-", "reverse", $10); \
print $4 FS $5 FS $6 FS "Name=" $7 ";Strand=" $10 ";numMapping=" $16 FS FS $10 }' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment