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

IndexError when running minimds_inter.py script #1

Open
shenlinyong opened this issue Jul 25, 2022 · 0 comments
Open

IndexError when running minimds_inter.py script #1

shenlinyong opened this issue Jul 25, 2022 · 0 comments

Comments

@shenlinyong
Copy link

The software you developed is fantastic, I'm perfectly fine building 3D models of the intra of chromosomes. But I had trouble building 3D models inter chromosomes.

    856 Reading ../../data/fat/fat_36_Z_1.0mb.bed
    857 Reading ../../data/fat/fat_37_Z_1.0mb.bed
    858 Reading ../../data/fat/fat_38_Z_1.0mb.bed
    859 Reading ../../data/fat/fat_39_Z_1.0mb.bed
    860 Reading ../../data/fat/fat_Z_100kb.bed
    861 Scanning ../../data/fat/fat_1_100kb.bed
    862 Traceback (most recent call last):
    863   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 168, in <module>
    864     main()
    865   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 158, in main
    866     structures = interMDS(chrom_names, args.prefix, args.inter_res, args.intra_res, args.partitioned, params)
    867   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 111, in interMDS
    868     r, t = la.getTransformation(inferred_low, true_low)
    869   File "/home/SLY68/biosoft/miniMDS/linear_algebra.py", line 13, in getTransformation
    870     a.append(structure1.points[num-structure1.offset].pos)
    871 IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
    872 Scanning ../../data/lean/lean_1_100kb.bed
    873 Scanning ../../data/lean/lean_2_100kb.bed
    874 Scanning ../../data/lean/lean_3_100kb.bed
    875 Scanning ../../data/lean/lean_4_100kb.bed
    876 Scanning ../../data/lean/lean_5_100kb.bed
  ...... 
  69668 Reading ../../data/lean/lean_39_Z_1.0mb.bed
  69669 Reading ../../data/lean/lean_Z_100kb.bed
  69670 Scanning ../../data/lean/lean_1_100kb.bed
  69671 Traceback (most recent call last):
  69672   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 168, in <module>
  69673     main()
  69674   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 158, in main
  69675     structures = interMDS(chrom_names, args.prefix, args.inter_res, args.intra_res, args.partitioned, params)
  69676   File "/home/SLY68/biosoft/miniMDS/minimds_inter.py", line 111, in interMDS
  69677     r, t = la.getTransformation(inferred_low, true_low)
  69678   File "/home/SLY68/biosoft/miniMDS/linear_algebra.py", line 13, in getTransformation
  69679     a.append(structure1.points[num-structure1.offset].pos)
  69680 IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Other chromosomes are OK, and only chr1 has encountered this problem, and chr1 is many times larger than other chromosomes. _1_100kb.bed file is 1901776 lines.

Here is my running script:

for i in {1..39} Z;do
python ~/biosoft/miniMDS/minimds_inter.py -n 50 ../../data/fat/fat 1000000 100000
python ~/biosoft/miniMDS/minimds_inter.py -n 50 ../../data/lean/lean 1000000 100000
done
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

1 participant