bodegalab / irescue

Uncertainty-aware quantification of Transposable Elements expression in scRNA-seq
MIT License
12 stars 2 forks source link

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 closed 7 months ago

tcmartinez commented 8 months ago

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 commented 8 months ago

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:

Thanks B

tcmartinez commented 7 months ago

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

bepoli commented 7 months ago

No problem, I'm glad you solved it