genome / gms

The Genome Modeling System installer
https://github.com/genome/gms/wiki
GNU Lesser General Public License v3.0
78 stars 22 forks source link

BWA set to arbitrarily use x20 cpus in gms-pub branch of gms-core #62

Closed malachig closed 10 years ago

malachig commented 10 years ago

At some point in the gms-pub branch of gms-core repository, BWA commands were overridden to use 20x cpus. This was probably done because we were not able to correctly parse available cpus from openlava the way we do for LSF. This was fixed as part of issues #10 and #48.

We should not do this. Change the following code back to the way it is done in the master branch.

sub decomposed_aligner_params {
    my $self = shift;
    my $params = $self->aligner_params || ":::";

    my @spar = split /\:/, $params;

    my $bwa_aln_params = $spar[0] || "";

    my $cpu_count = $self->_available_cpu_count;
    $cpu_count = $cpu_count * 20;

    $self->status_message("[decomposed_aligner_params] cpu count is $cpu_count");

    $self->status_message("[decomposed_aligner_params] bwa aln params are: $bwa_aln_params");

    # Make sure the thread count argument matches the number of CPUs available.
    if (!$bwa_aln_params || $bwa_aln_params !~ m/-t/) {
        $bwa_aln_params .= "-t$cpu_count";
    } elsif ($bwa_aln_params =~ m/-t/) {
        $bwa_aln_params =~ s/-t ?\d/-t$cpu_count/;
    }

    $self->status_message("[decomposed_aligner_params] autocalculated CPU requirement, bwa aln params modified: $bwa_aln_params");

    return ('bwa_aln_params' => $bwa_aln_params, 'bwa_samse_params' => $spar[1], 'bwa_sampe_params' => $spar[2]);
}
gatoravi commented 10 years ago

This was fixed in genome/gms-core@0c9d4f3b5ecb689442c32a28abc6bd63a634fc5a