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

IRescue error: Traceback (most recent call last): File "/apps/software/gcc-12.1.0/python/3.10.5/bin/irescue", line 8, in <module> sys.exit(main()) #15

Closed
tcmartinez opened this issue Jan 15, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tcmartinez
Copy link

I am trying to run IRescue on 10X samples that were aligned using STARSolo and I am getting an error I do not understand. I was wondering if you could help me.

My submission script is:
#!/bin/bash -l
#SBATCH --job-name=IRescue
#SBATCH --account=tcmartinez
#SBATCH --partition=tier2q
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=4
#SBATCH --time=48:00:00
#SBATCH --cpus-per-task=4
#SBATCH --mem=64gb
#SBATCH --output=/gpfs/data/mcnerney-lab/Tanner/TCM230/ir.out
#SBATCH --error=/gpfs/data/mcnerney-lab/Tanner/TCM230/ir.err

module load gcc/12.1.0
module load python/3.10.5
module load samtools/1.18
module load bedtools/2.30.0

irescue -b /gpfs/data/mcnerney-lab/Tanner/TCM230/STARSolo/Aligned.sortedByCoord.out.bam
-g mm10
-p 8
-w /gpfs/data/mcnerney-lab/Tanner/TCM230/STARSolo/whitelist/Anames.tsv\

And the error message I am getting is:

[01/15/2024 - 13:11:21] IRescue job starts
[01/15/2024 - 13:11:21] Found CB and UR tags occurrence in bam's line 1.
[01/15/2024 - 13:11:21] Downloading and parsing RepeatMasker annotation for assembly mm10 from https://hgdownload.soe.ucsc.edu/goldenPath/mm10/bigZips/initial/mm10.fa.out.gz ...
[01/15/2024 - 13:12:13] WARNING: The following references contain read alignments but are not found in the TE annotation and will be skipped: chr4_JH584295_random, chrM
[01/15/2024 - 13:14:47] Writing mapped barcodes to ./IRescue_out//barcodes.tsv.gz
[01/15/2024 - 13:14:47] Writing mapped features to ./IRescue_out//features.tsv.gz
Traceback (most recent call last):
File "/apps/software/gcc-12.1.0/python/3.10.5/bin/irescue", line 8, in
sys.exit(main())
File "/apps/software/gcc-12.1.0/python/3.10.5/lib/python3.10/site-packages/irescue/main.py", line 101, in main
bc_per_thread = list(split_bc(barcodes_file, args.threads))
File "/apps/software/gcc-12.1.0/python/3.10.5/lib/python3.10/site-packages/irescue/count.py", line 133, in split_bc
for chunk in split_int(bclen, n):
File "/apps/software/gcc-12.1.0/python/3.10.5/lib/python3.10/site-packages/irescue/count.py", line 119, in split_int
for i in range(0, num, split):
ValueError: range() arg 3 must not be zero

@bepoli
Copy link
Member

bepoli commented Jan 23, 2024

Hi @tcmartinez,
sorry for the delay.

You're getting the same error as #1, however that was fixed.
I noticed that, sometimes, samtools indexes are corrupted (i.e. they do not allow to query the BAM file), causing the same error again even with IRescue 1.0.3. It happens quite randomly, so I couldn't fix it yet.

Please, try this:

  • delete or move BAM's index, to let IRescue build the index again with samtools. Alternatively, re-build the index yourself (then check if it works by running samtools view Aligned.sortedByCoord.out.bam chr1 | head).
  • execute IRescue again, but add the parameter -v to get more info about the run.
  • can you also double check that your whitelist file contains the barcodes indicated with the "CB" tag in the BAM file? It suffices to check just one barcode.

Thanks
B

@bepoli bepoli added the bug Something isn't working label Jan 24, 2024
@bepoli bepoli self-assigned this Jan 24, 2024
@tcmartinez
Copy link
Author

Thank you so much for your help . The issue was with my whitelist.

@bepoli
Copy link
Member

bepoli commented Feb 8, 2024

No problem, I'm glad you solved it

@bepoli bepoli closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants