haojingshao / npInv

npInv: an accurate tool for detecting and genotyping inversion using multiple alignment long reads
MIT License
7 stars 1 forks source link

java.lang.StringIndexOutOfBoundsException: Range [5, 0) out of bounds for length 0 #11

Open jamesdalg opened 1 year ago

jamesdalg commented 1 year ago

I've not seen this issue on your repository. Do you know why this would come about?

Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 1 (use --cores to define parallelism)
Rules claiming more threads will be scaled down.
Provided resources: mem_mb=865273, mem_mib=825189, disk_mb=865273, disk_mib=825189
Select jobs to execute...

[Fri Jul 28 00:07:19 2023]
rule npinv:
    input: /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam
    output: /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf
    jobid: 0
    reason: Missing output files: /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf
    wildcards: sample=HG00514.clr_reads
    resources: mem_mb=865273, mem_mib=825189, disk_mb=865273, disk_mib=825189, tmpdir=/var/scratch/jdalglei/96140

        java -jar /ceph/project/Wellcome_Discovery/jdalglei/sv_pipeline/npInv/npInv1.28.jar --input /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam --output /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf --minAln 500 --min 500 --max 10000;

#<INFO-1> Arguments= --input /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam --output /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf --minAln 500 --min 500 --max 10000 
#<INFO-2> Program starts at 2023/07/28 00:07:20
WARNING: BAM index file /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam.bai is older than BAM /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam
#<INFO-3> Running chromosome chr1 at 2023/07/28 00:07:20
#<INFO-4> Progressing chromosome chr1 at 2023/07/28 00:07:20
WARNING: BAM index file /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam.bai is older than BAM /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: Range [5, 0) out of bounds for length 0
    at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
    at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
    at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
    at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
    at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602)
    at java.base/java.lang.String.substring(String.java:2715)
    at java.base/java.lang.String.substring(String.java:2688)
    at inversion.Main.getAlignmentError(Main.java:536)
    at inversion.Main.runChr(Main.java:232)
    at inversion.Main.main(Main.java:141)
[Fri Jul 28 00:07:21 2023]
Error in rule npinv:
    jobid: 0
    input: /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam
    output: /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf
    shell:

        java -jar /ceph/project/Wellcome_Discovery/jdalglei/sv_pipeline/npInv/npInv1.28.jar --input /ceph/project/Wellcome_Discovery/jdalglei/data/pacbio/bam/HG00514.clr_reads.chm13.pb_aligned_sorted.bam --output /ceph/project/davieslab/jdalglei/results/sm_pacbio/HG00514.clr_reads/npInv/HG00514.clr_reads_npInv.vcf --minAln 500 --min 500 --max 10000;

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
haojingshao commented 1 year ago

Sorry for the late reply. It seems that your bam file missing the information for multiple alignment (NM:i:). Would you please send me some lines in the bam files as examples?