src/hg/utils/automation/makeDownloads.pl 1.20
1.20 2009/03/19 16:14:35 hiram
Allow some missing TRF files, option to avoid RepeatMasker, and special business to find haplotypes when they are in separate directories
Index: src/hg/utils/automation/makeDownloads.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/automation/makeDownloads.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -b -B -U 4 -r1.19 -r1.20
--- src/hg/utils/automation/makeDownloads.pl 3 Mar 2009 21:46:55 -0000 1.19
+++ src/hg/utils/automation/makeDownloads.pl 19 Mar 2009 16:14:35 -0000 1.20
@@ -17,8 +17,10 @@
# Option variable names:
use vars @HgAutomate::commonOptionVars;
use vars @HgStepManager::optionVars;
use vars qw/
+ $opt_allowMissedTrfs
+ $opt_noChromRoot
$opt_ignoreRepeatMasker
/;
# Specify the steps supported with -continue / -stop:
@@ -48,10 +50,13 @@
";
print STDERR $stepper->getOptionHelp();
print STDERR &HgAutomate::getCommonOptionHelp('dbHost' => $dbHost,
'workhorse' => $defaultWorkhorse);
- print STDERR " -ignoreRepeatMasker do not look for RM .out files\n";
- print STDERR "
+ print STDERR <<_EOF_
+ -allowMissedTrfs tolerate missing trfMaskChrom/*.bed files
+ -noChromRoot find RM .out files for chr*_hap in actual hap chrom name
+ -ignoreRepeatMasker do not look for RM .out files
+
Automates generation of assembly download files for genome database \$db:
compress: Create compressed download files, md5sum.txt and README.txt in
$HgAutomate::clusterData/\$db/goldenPath/*/
install: Create links to those files from
@@ -59,9 +64,10 @@
This will blow away any existing README.txt files and any files that are
already in bigZips etc. So if you have added files specially for this
release (include README.txt sections), and then need to run this again,
be sure to back them up in a different directory first.
-";
+_EOF_
+ ;
# Detailed help (-help):
print STDERR "
Assumptions:
1. $HgAutomate::clusterData/\$db/{\$db.2bit,chrom.sizes} are in place.
@@ -82,8 +88,10 @@
sub checkOptions {
# Make sure command line options are valid/supported.
my $ok = GetOptions(@HgStepManager::optionSpec,
+ 'allowMissedTrfs',
+ 'noChromRoot',
'ignoreRepeatMasker',
@HgAutomate::commonOptionSpec,
);
&usage(1) if (!$ok);
@@ -164,12 +172,16 @@
push @chromTrfFiles, $trfFile;
} elsif ($trfFile =~ /chrM\.bed$/) {
$trfFudge++;
} else {
+ if ($opt_allowMissedTrfs) {
+ $trfFudge++;
+ } else {
warn "Missing TRF $trfFile\n";
$problems++;
}
}
+ }
if ($problems > 15) {
warn "A bunch of missing files... stopping here.\n";
last;
}
@@ -1027,9 +1039,11 @@
foreach my $chr (@chroms) {
my $chrRoot = $chr;
$chrRoot =~ s/^chr//;
$chrRoot =~ s/_random$//;
+ if (! $opt_noChromRoot) {
$chrRoot =~ s/_\w+_hap\d+//;
+ }
push @{$chromRoots{$chrRoot}}, $chr;
}
$chromGz = "chromosomes";
} else {