Skip to content

Commit

Permalink
fix upload_neurons with single-node neurons and connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Jul 29, 2019
1 parent 911cd9a commit 22aa551
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pymaid/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def transfer_neuron(x, source_instance, target_instance, move_tags=False,
force_id : bool, optional
If True and neuron/skeleton IDs already exist in
target instance, they will be replaced. **Use this with
extrem caution!**
extrem caution as this will destroy the existing
skeleton!**
no_prompt : bool, optional
If True, will not prompt before transferring neurons!
Expand Down Expand Up @@ -320,7 +321,7 @@ def upload_neuron(x, import_tags=False, import_annotations=False,
force_id=force_id,
remote_instance=remote_instance)
for i, n in config.tqdm(enumerate(x),
desc='Import',
desc='Uploading',
total=len(x),
disable=config.pbar_hide,
leave=config.pbar_leave)}
Expand Down Expand Up @@ -449,7 +450,7 @@ def upload_neuron(x, import_tags=False, import_annotations=False,
rl_map = config.compact_skeleton_relations

# Link connectors
links = [[n_map[n.treenode_id],
links = [[resp['node_id_map'][n.treenode_id],
cn_map[n.connector_id],
rl_map[n.relation]] for n in x.connectors.itertuples()]

Expand Down

0 comments on commit 22aa551

Please sign in to comment.