Initialize with a sequence?
collinskatie opened this issue · 1 comments
Hi, thank you for your fantastic visualization package! What's the best way to initialize the process w/ a seed sequence, such that you iteratively modify that initial sequence based on the target? I saw in the documentation that you can specify an init_sequence - would this be the best way? When I try to initialize with this parameter to a predetermined string, I get the following error:
~/anaconda3/envs/deeptoehold/lib/python3.6/site-packages/seqprop-0.1-py3.6.egg/seqprop/generator/seqprop_generator.py in build_generator(seq_length, n_sequences, n_samples, sequence_templates, init_sequences, p_init, batch_normalize_pwm)
197
198 if init_sequences is not None :
--> 199 initialize_sequences(generator, init_sequences, p_init)
200
201 #Lock all generator layers except policy layers
NameError: name 'generator' is not defined
Thanks for any assistance!
Hi, I'm glad you're finding the package useful, and thanks a bunch for finding and reporting this bug!
A variable was not named properly in the initialisation script. It has been fixed and committed to the master branch now.
I also added a new notebook example showing how to use the 'init_sequences' parameter. You pass a list with as many sequences as the 'n_sequences' parameter is set to (e.g. n_sequences=10 --> pass a list with 10 initial sequences). Also, the p_init parameter specifies the PWM probability each initial nucleotide should be set to (i.e. p_init closer to 1.0 means lower initial PWM entropy).
Let me know if you have any other questions or find additional issues!
Best,
Johannes