Created
November 12, 2010 19:48
-
-
Save stephenturner/674568 to your computer and use it in GitHub Desktop.
run_step0.pl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# runs step 0 on all chromosomes | |
# produces the group files and the tarballed | |
# sets for running step1 and step 2 on | |
use strict; | |
# create and store distributions for the top 25 models from permutation testing | |
# for both the model p-value and interaction p-value | |
my $PRGM_NAME = "run_step0.pl"; | |
my $step0script = '/scratch/username/impute/impute_step0.sh'; #CHANGE | |
# Subroutine: usage | |
# Displays current version date and usage | |
sub usage{ | |
print "\nusage:\t\t$PRGM_NAME <basename, not including .bed/bim/fam>\n\n"; | |
print "example:\t$PRGM_NAME mydata\n\n"; | |
} | |
# subroutine: check_args | |
# Checks number of arguments passed in and returns name of pedigree file. | |
sub check_args{ | |
if(@ARGV != 1) | |
{ usage(); | |
exit;} | |
return @ARGV; | |
} | |
my ($beginbase) = check_args(); | |
for(my $i=1; $i<=22; $i++){ | |
my $basefile = "$beginbase$i"; | |
my $outbase = "$beginbase" . "_chr$i"; | |
print "$step0script $basefile $outbase\n"; | |
system("$step0script $basefile $outbase"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment