DiltheyLab / HLA-LA

Fast HLA type inference from whole-genome data
GNU General Public License v3.0
120 stars 40 forks source link

No longer working for me -- terminate called after throwing an instance of 'std::runtime_error' #65

Closed cariaso closed 11 months ago

cariaso commented 2 years ago

My wrapper code positions the input files and sets up an environment, then runs

cmdline = [
        "/HLA-LA/src/HLA-LA/HLA-LA.pl",
        "--BAM",
        bamfn,
        "--graph",
        "PRG_MHC_GRCh38_withIMGT",
        "--sampleID",
        sampleID,
        "--maxThreads",
        str(maxThreads),
        "--bwa_bin",
        "/bwa/bwa",
        "--picard_sam2fastq_bin",
        "/picard.jar",
        "--workingDir",
        workingDir,
        "--samtools_bin",
        "/usr/local/bin/samtools",
    ]

and was working well enough a few weeks ago.

Now when I run a ~100GB 30x WGS BAM it runs for 2.5h on an r5.2xlarge (with unimpresive parallel usage, just memory hungry)

last successful progress messages are

    8002000/8002013 runningPaths.size(): 7  completedGapEdgePaths.size(): 16796
 [ Mon Oct 18 14:12:34 2021 ] extensionAligner::extensionAligner(..): Indexing of edge paths; have 16804 completed edge paths.

and then it runs

/bwa/bwa mem -t8 -M -a /HLA-LA/src/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT/extendedReferenceGenome/extendedReferenceGenome.fa /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_1.fastq /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_2.fastq | /usr/local/bin/samtools view -@ 7 -Sb - > /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/remapped_with_a.bam.unsorted

which will eventually end with the messages:

terminate called after throwing an instance of 'std::runtime_error'

  what():  Command /bwa/bwa mem -t8 -M -a /HLA-LA/src/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT/extendedReferenceGenome/extendedReferenceGenome.fa /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_1.fastq /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_2.fastq | /usr/local/bin/samtools view -@ 7 -Sb - > /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/remapped_with_a.bam.unsorted returned code -1

HLA-LA execution not successful. Command was ../bin/HLA-LA --action HLA --maxThreads 8 --sampleID sampleID --outputDirectory /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID --PRG_graph_dir /HLA-LA/src/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT --FASTQU /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_U.fastq.splitLongReads --FASTQ1 /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_1.fastq --FASTQ2 /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_2.fastq --bwa_bin /bwa/bwa --samtools_bin /usr/local/bin/samtools --mapAgainstCompleteGenome 1 --longReads 0

Note that this command is not quite what I actually ran. Compare what it shows

../bin/HLA-LA --action HLA --maxThreads 8 --sampleID sampleID --outputDirectory /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID --PRG_graph_dir /HLA-LA/src/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT --FASTQU /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_U.fastq.splitLongReads --FASTQ1 /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_1.fastq --FASTQ2 /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_2.fastq --bwa_bin /bwa/bwa --samtools_bin /usr/local/bin/samtools --mapAgainstCompleteGenome 1 --longReads 0

to what I wrote:

        "/HLA-LA/src/HLA-LA/HLA-LA.pl",
        "--BAM",
        bamfn,
        "--graph",
        "PRG_MHC_GRCh38_withIMGT",
        "--sampleID",
        sampleID,
        "--maxThreads",
        str(maxThreads),
        "--bwa_bin",
        "/bwa/bwa",
        "--picard_sam2fastq_bin",
        "/picard.jar",
        "--workingDir",
        workingDir,
        "--samtools_bin",
        "/usr/local/bin/samtools",
    ]

The exit code seems to be 255.

FWIW, I am running with a version of bamtools from May 2021 due to https://github.com/DiltheyLab/HLA-LA/issues/59

Can anyone offer any insight that might help me to get this back online?

AlexanderDilthey commented 11 months ago

Hey @cariaso,

This here:

what(): Command /bwa/bwa mem -t8 -M -a /HLA-LA/src/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT/extendedReferenceGenome/extendedReferenceGenome.fa /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_1.fastq /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/R_2.fastq | /usr/local/bin/samtools view -@ 7 -Sb - > /tmp/hlatool-hlatool-1634559454icb90p6b/working/sampleID/remapped_with_a.bam.unsorted returned code -1

comes from HLA*LA, not from your surrounding pipeline. I guess there may be an issue with any of the paths or executables?

Best wishes

Alex