Skip to content

Instantly share code, notes, and snippets.

@keithshep
Created June 14, 2010 13:49
Show Gist options
  • Save keithshep/437703 to your computer and use it in GitHub Desktop.
Save keithshep/437703 to your computer and use it in GitHub Desktop.
strip rows with N or H calls from a dir full of genotype CSV files
#!/bin/bash
echo "input directory: $1"
echo "output directory: $2"
for i in `ls $1` ; do echo "striping N and H calls from: $i" && egrep -v '(,N,)|(,N$)|(,H,)|(,H$)|(,n,)|(,n$)|(,h,)|(,h$)' $1/$i > $2/$i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment