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

Isochore processing can't handle missing chromosome annotations #10

Closed
rdalbanus opened this issue Jul 12, 2018 · 1 comment
Closed

Comments

@rdalbanus
Copy link

rdalbanus commented Jul 12, 2018

Hi, Andreas,

I think I figured how to make the isochores files work, but now I'm running into another issue. If my sample doesn't have a chromosome annotation that is present in the isochore file, the software crashes:

Traceback (most recent call last):
  File "/lab/sw/ve/pl2/bin/gat-run.py", line 4, in <module>
    __import__('pkg_resources').run_script('gat==1.3.5', 'gat-run.py')
  File "/lab/sw/ve/pl2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 738, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/lab/sw/ve/pl2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1499, in run_script
    exec(code, namespace, namespace)
  File "/lab/sw/ve/pl2/lib/python2.7/site-packages/gat-1.3.5-py2.7-linux-x86_64.egg/EGG-INFO/scripts/gat-run.py", line 317, in <module>
    sys.exit(main(sys.argv))
  File "/lab/sw/ve/pl2/lib/python2.7/site-packages/gat-1.3.5-py2.7-linux-x86_64.egg/EGG-INFO/scripts/gat-run.py", line 295, in main
    annotator_results = fromSegments(options, args)
  File "/lab/sw/ve/pl2/lib/python2.7/site-packages/gat-1.3.5-py2.7-linux-x86_64.egg/EGG-INFO/scripts/gat-run.py", line 86, in fromSegments
    segments, annotations, workspaces, isochores = IO.buildSegments(options)
  File "/lab/sw/ve/pl2/lib/python2.7/site-packages/gat-1.3.5-py2.7-linux-x86_64.egg/gat/IO.py", line 180, in buildSegments
    isochores.intersect(workspaces["collapsed"])
  File "gat/Engine.pyx", line 3061, in gat.Engine.IntervalCollection.intersect (gat/Engine.c:44811)
  File "gat/Engine.pyx", line 2797, in gat.Engine.IntervalDictionary.__delitem__ (gat/Engine.c:37344)
KeyError: 'chrX'

In this case, it's complaining that chrX is in the isochores file, but not in the input files. For this particular analysis, I was using an input where I removed the sex chromosomes. In order to solve this problem, I had to make a new isochore file without the sex chromosomes. Same thing happened in another female sample, when it gave the KeyError for chrY.

Ideally, we should use the same full isochore file for each input, and GAT decides internally which chromosome annotations to use.

Best,
Ricardo

Update: I was just looking at some previous logs and found the same error, even though I wasn't using isochores. Seems like this issue is caused by the chromosomes annotations not being present int the workspace as well.

@AndreasHeger
Copy link
Owner

Thanks, @rdalbanus , I have fixed this.

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

2 participants