@@ -359,11 +359,11 @@ sub GetBiotypePriority {
359
359
$vcf_fh -> close ;
360
360
361
361
# samtools runs faster when passed many loci at a time, but limited to around 125k args, at least
362
- # on CentOS 6. If there are too many loci, split them into 50k chunks and run separately
362
+ # on CentOS 6. If there are too many loci, split them into smaller chunks and run separately
363
363
my ( $lines , @regions_split ) = ( " " , ());
364
364
my @regions = keys %uniq_regions ;
365
365
my $chr_prefix_in_use = ( @regions and $regions [0] =~ m / ^chr/ ? 1 : 0 );
366
- push ( @regions_split , [ splice ( @regions , 0, 50000 ) ] ) while @regions ;
366
+ push ( @regions_split , [ splice ( @regions , 0, $buffer_size ) ] ) while @regions ;
367
367
map { my $region = join ( " " , @{$_ } ); $lines .= ` $samtools faidx $ref_fasta $region ` } @regions_split ;
368
368
foreach my $line ( grep ( length , split ( " >" , $lines ))) {
369
369
# Carefully split this FASTA entry, properly chomping newlines for long indels
@@ -386,7 +386,7 @@ sub GetBiotypePriority {
386
386
# Query each variant locus on the filter VCF, using tabix, just like we used samtools earlier
387
387
( $lines , @regions_split ) = ( " " , ());
388
388
my @regions = keys %uniq_loci ;
389
- push ( @regions_split , [ splice ( @regions , 0, 50000 ) ] ) while @regions ;
389
+ push ( @regions_split , [ splice ( @regions , 0, $buffer_size ) ] ) while @regions ;
390
390
# ::NOTE:: chr-prefix removal works safely here because ExAC is limited to 1..22, X, Y
391
391
map { my $loci = join ( " " , map {s / ^chr// ; $_ } @{$_ } ); $lines .= ` $tabix $filter_vcf $loci ` } @regions_split ;
392
392
foreach my $line ( split ( " \n " , $lines )) {
0 commit comments