Skip to content

Instantly share code, notes, and snippets.

@pipitone
Created August 12, 2013 18:45
Show Gist options
  • Save pipitone/6213772 to your computer and use it in GitHub Desktop.
Save pipitone/6213772 to your computer and use it in GitHub Desktop.
#!/bin/bash
filename=$1
datafile=$2
IFS=',' # splits rows by commas
while read ID symb chr start stop; do
cat $datafile | awk "(\$2==$chr) && (\$3>=$start) && (\$3<=$stop) {print}"
done < $filename > PGC1_315immunegenetest.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment