ValueError: too many values to unpack ERROR from leafcutter_cluster.py script

80 views
Skip to first unread message

Alison Gaynor

unread,
Jul 28, 2021, 11:28:17 AM7/28/21
to leafcutter-users
Hello all,

I am trying to use the outlier splicing leafcutterMD algorithm and am having some trouble on the intron clustering step. 

I compiled the junc files from indexing with samtools and extracting junctions with regtools (I did not use the suggested for loop from the documentation or the bam2junc provided script- don't know if this is relevant!) 

I compiled the junc files in a txt document like this:

/.../undiagnosed_fq/BAM_files/junc_files/004Aligned.sortedByCoord.out.bam.junc

/.../undiagnosed_fq/BAM_files/junc_files/1007Aligned.sortedByCoord.out.bam.junc

/.../undiagnosed_fq/BAM_files/junc_files/1009Aligned.sortedByCoord.out.bam.junc

/.../undiagnosed_fq/BAM_files/junc_files/1010Aligned.sortedByCoord.out.bam.junc

/.../undiagnosed_fq/BAM_files/junc_files/1011Aligned.sortedByCoord.out.bam.junc

/.../undiagnosed_fq/BAM_files/junc_files/1013Aligned.sortedByCoord.out.bam.junc

With my full home address in the /.../

This was intron clustering command:

python /.../bin/leafcutter/clustering/leafcutter_cluster.py -j undpatient_junc.txt -m 50 -o undpatients_leafcutter -l 500000

I got the error:

scanning /.../undiagnosed_fq/BAM_files/junc_files/004Aligned.sortedByCoord.out.bam.junc...

Traceback (most recent call last):

  File "/.../bin/leafcutter/clustering/leafcutter_cluster.py", line 489, in <module>

    main(options, libl)

  File "/.../bin/leafcutter/clustering/leafcutter_cluster.py", line 11, in main

    pool_junc_reads(libl, options)

  File "/.../bin/leafcutter/clustering/leafcutter_cluster.py", line 46, in pool_junc_reads

    chrom, A, B, dot, counts, strand = lnsplit

ValueError: too many values to unpack (expected 6)

I am a bit confused about how to troubleshoot this. Any help is appreciated!

Thanks so much,

Alison 



Alison Gaynor

unread,
Jul 28, 2021, 12:30:01 PM7/28/21
to leafcutter-users
Sorry- I am realizing I left out of the original message that I actually am using 12 .junc files in this analysis, I just listed the first six in the original post. 

BJ

unread,
Jul 18, 2022, 11:22:24 PM7/18/22
to leafcutter-users
by any chance did you find a way to troubleshoot? I am getting the exact error message and don't know what could be causing it

Tuan Nguyen

unread,
Mar 13, 2024, 11:21:29 AMMar 13
to leafcutter-users
I ran into the same error because I was running the wrong python file. Instead of running leafcutter/clustering/leafcutter_cluster.py file, we should be running  leafcutter/clustering/leafcutter_cluster_regtools.py as instructed on the website.

My problem was I installed Leafcutter from the psi_2019 branch (which has a script for quantifying psi) instead of the master branch, and the leafcutter_cluster_regtools.py file is missing in that branch. What I did was manually download the file from github, add it to the same folder, make it executable (chmod 755), and run it.

Reply all
Reply to author
Forward
0 new messages