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

mark genomes as circular #84

Open
alexweisberg opened this issue Oct 10, 2020 · 2 comments
Open

mark genomes as circular #84

alexweisberg opened this issue Oct 10, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@alexweisberg
Copy link

Hi,

I really like the reference genome layout example from the wiki and am replicating that with my own data. The graph network looks good, however all of the genomes are rendered as linear molecules. Is there a way to indicate in the input gff3 files that all or some replicons are circular? I tried adding a region line with is_circular=true however that resulted in a key error exception:

Traceback (most recent call last):
File "/local/cluster/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexes/base.py", line 2656, in get_loc
return self._engine.get_loc(key)
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'group_9859'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Software/panaroo/scripts/reference_based_layout.py", line 219, in
layout(**vars(args))
File "/Software/panaroo/scripts/reference_based_layout.py", line 128, in layout
mapping, ref_g_id, max_dist)
File "/Software/panaroo/scripts/reference_based_layout.py", line 32, in add_to_queue
"gene_id"], max_dist)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexing.py", line 1494, in getitem
return self._getitem_tuple(key)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexing.py", line 868, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexing.py", line 988, in _getitem_lowerdim
section = self._getitem_axis(key, axis=i)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexing.py", line 1913, in _getitem_axis
return self._get_label(key, axis=axis)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexing.py", line 141, in _get_label
return self.obj._xs(label, axis=axis)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/generic.py", line 3585, in xs
loc = self.index.get_loc(key)
File "/local/lib/python3.7/site-packages/pandas-0.24.1-py3.7-linux-x86_64.egg/pandas/core/indexes/base.py", line 2658, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'group_9859'

This error does not happen if I run it without a region line. Thanks!

@gtonkinhill
Copy link
Owner

Hi,

Plotting circular replicons is a little tricky as the input to the algorithm is linear contigs. This is sometimes resolved when multiple contigs span the entire loop but is not always the case.

When I have run into this in the past I have manually added an edge in cytoscape to complete a loop and improve the plotting layout.

@alexweisberg
Copy link
Author

alexweisberg commented Oct 12, 2020 via email

@gtonkinhill gtonkinhill added the enhancement New feature or request label Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants