aakechin / NGS-PrimerPlex

NGS-PrimerPlex is a high-throughput tool for mupltiplex primer design
GNU General Public License v3.0
54 stars 21 forks source link

TypeError: cannot unpack non-iterable int object #22

Closed Freya-Cui-2020 closed 2 years ago

Freya-Cui-2020 commented 3 years ago

When we were trying to run the example file, it seemed that the output process had problems. The command used was below: ../NGS_primerplex.py --regions-file example_gene_list_file.regions_hg19.csv --reference-genome ../../test/hg19.fa

The standard output was below:

Reading input file...
ATTENTION! For region EGFR whole region was chosen!
 # Total number of input point regions: 31
 # Number of unique input point regions: 31
Creating input parameters for primer3...
Constructing primers...
100.0%
 # Total number of constructed primers: 46155
 # Total number of different constructed primers: 1280
Joining primer pairs to amplified blocks...
100.0%
 # Total number of amplified blocks on chromosome chr3: 2

 # Total number of amplified blocks on chromosome chr5: 1

 # Total number of amplified blocks on chromosome chr7: 2

 # Total number of amplified blocks on chromosome chr12: 1

 # Total number of amplified blocks on chromosome chr17: 3
 # Total number of amplified blocks: 9
 # Total number of amplicons: 90
 # Total number of multiplex variants: 10^9
 Searching for interactions between the amplified blocks...
100.0%
 Searching for the best primer pair combinations...
196.0%
 # Total number of combinations selected for the subsequent deeper analysis: 19600
 # Minimal score of the combinations before recalculation: 41
 # Maximal score of the combinations analyzed before recalculation: 41
 Recalculating scores for the selected combinations and taking best ones...
100.0%
 # Minimal score of the combinations analyzed: 1
 # Maximal score of the combinations analyzed: 1
 # Number of primer pairs and score for the multiplex variant 1 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 2 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 3 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 4 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 5 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 6 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 7 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 8 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 9 - 9 (1)
 # Number of primer pairs and score for the multiplex variant 10 - 9 (1)
Writing to output...
Primers combination number 1
 # Number of written amplicons: 9
Sorting amplicons to multiplexes 1 (contain 9 amplicons)...
Traceback (most recent call last):
  File "../NGS_primerplex.py", line 3570, in <module>
    multiplexes=sortAmpliconsToMultiplexes(globalMultiplexesContainer,globalMultiplexNums,args,currentReadyMultiplexes)
  File "../NGS_primerplex.py", line 2250, in sortAmpliconsToMultiplexes
    cls=makeFinalMultiplexes(localMultiplexNums,readyMultiplexes,len(mults),len(mults),True)
  File "../NGS_primerplex.py", line 2181, in makeFinalMultiplexes
    random.shuffle(edgelist)
  File "/home/wangws/anaconda3/lib/python3.8/random.py", line 307, in shuffle
    x[i], x[j] = x[j], x[i]
  File "/home/wangws/anaconda3/lib/python3.8/site-packages/networkx/classes/reportviews.py", line 1015, in __getitem__
    u, v = e
TypeError: cannot unpack non-iterable int object

However, the error was solved when we retained only the top2 region.

aakechin commented 3 years ago

@Freya-Cui-2020 Thank you for this comment! I think it is a bug, and it will be fixed in the future versions.

HandsYe commented 2 years ago

@Freya-Cui-2020 Thank you for this comment! I think it is a bug, and it will be fixed in the future versions.

hi,@aakechin. when it will be fixed?

aakechin commented 2 years ago

Try the new version of the NGS-PrimerPlex: https://github.com/aakechin/NGS-PrimerPlex/releases/tag/v1.3.0 @HandsYe The error has been fixed in the new version.