Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bam2feat error: Return code -11 #34

Closed
AroneyS opened this issue Apr 11, 2024 · 6 comments
Closed

bam2feat error: Return code -11 #34

AroneyS opened this issue Apr 11, 2024 · 6 comments

Comments

@AroneyS
Copy link

AroneyS commented Apr 11, 2024

I think I've managed to install it correctly (v1.2.2 via pip), but I am running into an error with bam2feat as below. I think its a different issue to #21 due to having warnings like Cannot read alignment score at position: .

Do you have any advice? Bam files were created using minimap2.

2024-04-11 15:24:44.558] [svc] [�[32minfo�[m] Processing contig: NODE_16712_length_2673_cov_12.221925
[2024-04-11 15:24:44.559] [svc] [�[32minfo�[m] Getting per-read characteristics
[2024-04-11 15:24:44.558] [svc] [�[32minfo�[m] Processing contig: NODE_212_length_27811_cov_24.420450
[2024-04-11 15:24:44.559] [svc] [�[32minfo�[m] Getting per-read characteristics
[2024-04-11 15:24:44.566] [svc] [�[32minfo�[m] Processing contig: NODE_5071_length_4796_cov_26.411306
[2024-04-11 15:24:44.566] [svc] [�[32minfo�[m] Getting per-read characteristics
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 0
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 1
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 2
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 3
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 4
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 5
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 6
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 7
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 8
[2024-04-11 15:24:44.573] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 9
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 10
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 11
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 12
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 13
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 14
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 15
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 16
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 17
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 18
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 19
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 20
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 21
[2024-04-11 15:24:44.574] [svc] [�[33m�[1mwarning�[m] Cannot read alignment score at position: 22
[2024-04-11 15:24:44.574] [svc] [
Traceback (most recent call last):
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/bin/resmico", line 10, in <module>
    sys.exit(main())
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/__main__.py", line 52, in main
    args.func(args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/commands/bam2feat.py", line 80, in main
    bam2feat.main(args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 284, in main
    feat_files = run_bam2feat(bam_fasta, exe, args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 256, in run_bam2feat
    return [x for x in res]
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 256, in <listcomp>
    return [x for x in res]
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 227, in _run_bam2feat
    bam2feat(bam_sub, ref_tmp, outdir_feat, exe['bam2feat'], args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 190, in bam2feat
    run_cmd(cmd)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/fee5edea63eb33e4a3eddd1d49648ebd_/lib/python3.10/site-packages/resmico/bam2feat.py", line 99, in run_cmd
    raise ValueError('Return code: {}'.format(rc))
ValueError: Return code: -11
@AroneyS
Copy link
Author

AroneyS commented May 7, 2024

I reinstalled Resmico using the pip from source method and I now get a different error:

[2024-05-07 13:45:32.368] [svc] [�[32minfo�[m] Uncompressed fasta file detected. Using BamTools
[2024-05-07 13:45:32.369] [svc] [�[32minfo�[m] Processing contig: NODE_5091_length_4403_cov_21.562787
[2024-05-07 13:45:32.369] [svc] [�[32minfo�[m] Getting per-read characteristics
[2024-05-07 13:45:32.386] [svc] [�[32minfo�[m] Computing entropy and GC percent

Traceback (most recent call last):
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/bin/resmico", line 10, in <module>
    sys.exit(main())
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/__main__.py", line 52, in main
    args.func(args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/commands/bam2feat.py", line 80, in main
    bam2feat.main(args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 284, in main
    feat_files = run_bam2feat(bam_fasta, exe, args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 256, in run_bam2feat
    return [x for x in res]
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 256, in <listcomp>
    return [x for x in res]
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 227, in _run_bam2feat
    bam2feat(bam_sub, ref_tmp, outdir_feat, exe['bam2feat'], args)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 190, in bam2feat
    run_cmd(cmd)
  File "/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat.py", line 99, in run_cmd
    raise ValueError('Return code: {}'.format(rc))
ValueError: Return code: -6

@AroneyS
Copy link
Author

AroneyS commented May 7, 2024

Also get this other error outside of the log:

*** stack smashing detected ***: /mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat terminated
======= Backtrace: =========                    
/lib64/libc.so.6(+0x7731f)[0x7f980250631f]                                                             
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f980258f767]                                             
/lib64/libc.so.6(__fortify_fail+0x0)[0x7f980258f730]                                              
/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat(+0x21bba)[0x55f0a412ebba]
/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat(+0x27a56)[0x55f0a4134a56]
/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat(+0x1e667)[0x55f0a412b667]
/pkg/suse12/software/GCCcore/9.3.0/lib64/libgomp.so.1(GOMP_parallel+0x42)[0x7f980294d3d2]                                                                                                                      
/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat(+0x18eef)[0x55f0a4125eef]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f98024b2ac5]                                                                                                                                                       
/mnt/hpccs01/work/microbiome/ibis/SRA/results/benchmarking/20240129/.snakemake/conda/b89c45308a715f067df5b9f1955ffb05_/lib/python3.9/site-packages/resmico/bam2feat(+0x1dfd9)[0x55f0a412afd9]

@AroneyS
Copy link
Author

AroneyS commented May 7, 2024

The contig where it failed (NODE_5091_length_4403_cov_21.562787) has Ns in it. Is that the issue?

@nick-youngblut
Copy link
Contributor

The contig where it failed (NODE_5091_length_4403_cov_21.562787) has Ns in it. Is that the issue?

Yeah, that's almost definitely the issue. Why does the contig contain N's? Is it actually a scaffold?

@AroneyS
Copy link
Author

AroneyS commented May 8, 2024

Yep, turns out they were scaffolds. Resmico finishes for me now.
Do you plan on supporting scaffolds in the future?

@nick-youngblut
Copy link
Contributor

Do you plan on supporting scaffolds in the future?

Likely not, given that the feature table generation software was highly optimized for contigs (no N values).

@AroneyS AroneyS closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants