Skip to content

Instantly share code, notes, and snippets.

@samuell
Created December 21, 2017 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuell/84f2da001093777521c98989ace9af97 to your computer and use it in GitHub Desktop.
Save samuell/84f2da001093777521c98989ace9af97 to your computer and use it in GitHub Desktop.
cat {i:targetdata} > {o:filledup} && \
let "fillup_lines_cnt = "$(wc -l {i:targetdata} | awk '{ printf $1 }')" * 2" && \
tail -n +2 {i:rawdata} \
| awk -F"\t" '$9 != "{p:gene}" { $12 "\tN" }' \
| sort \
| uniq \
| shuf --random-source={i:randsrc} \
| head -n $fillup_lines_cnt \
>> {o:filledup}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment