Autodesk / nanodesign

Python package for working with nucleic acid structural designs.
Apache License 2.0
16 stars 11 forks source link

When using the -m modify flag in the converter script, I get an error #1

Closed joseph-schaeffer closed 7 years ago

joseph-schaeffer commented 7 years ago
[nanodesign.converter] INFO - Input file name ../tests/samples/flat_sheet.json
[nanodesign.converter] INFO - Input file format cadnano
[nanodesign.converter] INFO - Create a DNA structure using deleted/inserted bases from the caDNAno design file.
[nanodesign.converter] INFO - Output file name flat_sheet.pairs
[nanodesign.converter] INFO - Output file format simdna
[nanodesign.converters.cadnano.reader] INFO - Reading caDNAno design file ../tests/samples/flat_sheet.json
[nanodesign.converters.cadnano.reader] INFO - Number of bases in a virtual helix 448 
[nanodesign.converters.cadnano.reader] INFO - Lattice type square 
[nanodesign.converters.cadnano.reader] INFO - Number of virtual helices read 26 
[nanodesign.converters.cadnano.reader] INFO - Number of scaffold bases 7228 
[nanodesign.converters.cadnano.reader] INFO - Maximum number of lattice rows 37 
[nanodesign.converters.cadnano.reader] INFO - Maximum number of lattice columns 16 
[nanodesign.converters.cadnano.convert_design] INFO - Distance between adjacent helices 2.3 
[nanodesign.converters.cadnano.convert_design] INFO - Helix radius 1 
[nanodesign.converters.cadnano.convert_design] INFO - Number of bases in design 14458 
[nanodesign.converters.cadnano.convert_design] INFO - Number of deleted bases 428
Traceback (most recent call last):
  File "./converter.py", line 136, in <module>
    main()
  File "./converter.py", line 121, in main
    read_function(args.infile, args.inseqfile, args.inseqname)
  File "/Users/joseph/Autodesk/nanodesign/nanodesign/converters/converter.py", line 94, in read_cadnano_file
    self.dna_structure = self.cadnano_convert_design.create_structure(self.cadnano_design, self.modify)
  File "/Users/joseph/Autodesk/nanodesign/nanodesign/converters/cadnano/convert_design.py", line 209, in create_structure
    self._insert_bases(helices, base_connectivity)
  File "/Users/joseph/Autodesk/nanodesign/nanodesign/converters/cadnano/convert_design.py", line 364, in _insert_bases
    base_id = self._insert_bases_dsDNA(curr_base, base_id, helix_axis, new_bases, base_connectivity)
  File "/Users/joseph/Autodesk/nanodesign/nanodesign/converters/cadnano/convert_design.py", line 502, in _insert_bases_dsDNA
    [insert_coords, insert_frames] = _bp_interp(curr_coords, curr_frame, next_coords, next_frame, num_inserts/2)
    NameError: global name '_bp_interp' is not defined

This appears to be just a typo at line 50 in nanodesign/converters/cadnano/convert_design.py, it should be bp_interp. I'll put in a PR to fix this issue next week.

joseph-schaeffer commented 7 years ago

Resolved with PR #2.