Skip to content

Instantly share code, notes, and snippets.

@ctokheim
Last active December 10, 2015 00:19
Show Gist options
  • Save ctokheim/4350659 to your computer and use it in GitHub Desktop.
Save ctokheim/4350659 to your computer and use it in GitHub Desktop.
Awk: MATS to PrimerSeq
# SE
cat SE.MATS.ReadsOnTargetAndJunctionCounts.txt | awk -F"\t" '{if($5=="+") print $5 $4 ":" $6 "-" $7 "," $5 $4 ":" $8 "-" $9 "," $5 $4 ":" $10 "-" $11; else print $5 $4 ":" $6 "-" $7 "," $5 $4 ":" $10 "-" $11 "," $5 $4 ":" $8 "-" $9;}' | tail -n +2 > se.txt
# MXE
cat MXE.MATS.ReadsOnTargetAndJunctionCounts.txt | awk -F"\t" '{if($5=="+") print $5 $4 ":" $6 "-" $7 "," $5 $4 ":" $10 "-" $11 "," $5 $4 ":" $12 "-" $13; else print $5 $4 ":" $6 "-" $7 "," $5 $4 ":" $12 "-" $13 "," $5 $4 ":" $10 "-" $11 }' | tail -n +2 > mxe.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment