question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

extract_intervals- AttributeError: 'NoneType' object has no attribute 'group' with GENCODE gtf

See original GitHub issue

Using extract_intervals on a GENCODE gtf file like these resulted in this error:

ubuntu@olgabot-loom:~$ velocyto extract_intervals gencode.vM15.annotation.gtf -p gencode.vM15.annotation.velocyto-intervals.txt
2017-10-24 23:14:54,320 - DEBUG - Reading /home/ubuntu/gencode.vM15.annotation.gtf
Traceback (most recent call last):
  File "/home/ubuntu/anaconda/bin/velocyto", line 11, in <module>
    load_entry_point('velocyto==0.9.6', 'console_scripts', 'velocyto')()
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/anaconda/lib/python3.6/site-packages/velocyto/commands/extract_intervals.py", line 95, in extract_intervals
    exonno = regex_exonno.search(tags).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
ubuntu@olgabot-loom:~$ which python
/home/ubuntu/anaconda/bin/python
ubuntu@olgabot-loom:~$ python --version
Python 3.6.2 :: Anaconda custom (64-bit)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
olgabotcommented, Oct 31, 2017

For anyone that finds this thread in the future, the ENSEMBL GTFs work.

0reactions
gioelelmcommented, Nov 4, 2017

I think the problem was less complex than we thought. It was related to one regular expression that anyway I was not using downstream. I removed it.

There is one extra problem left, when I process your gtf example above (but not other GENCODE gtfs). But I think it is only because your example is missing the transcript_name entry. I think that entry is mandatory http://www.gencodegenes.org/gencodeformat.html

So I consider fixed. Feel free to reopen the issue if you encounter further problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

'NoneType' object has no attribute 'group' - Stack Overflow
I'm trying to make a python script that will play videos and I found this file that download's Youtube videos. I am not...
Read more >
FAQ - GENCODE
What is the difference between GENCODE GTF and Ensembl GTF? The gene annotation is the same in both files. The only exception is...
Read more >
AttributeError 'NoneType' object has no attribute 'groups'
This error happens when using the Multixcan tool, it usually happens when the tool cant find files in the Metaxcan folder you provided....
Read more >
ODI 11g Data Lineage Load Plan Failing with "AttributeError
ODI 11g Data Lineage Load Plan Failing with "AttributeError: 'NoneType' object has no attribute 'group'" (Doc ID 2304033.1).
Read more >
AttributeError: 'NoneType' object has no attribute 'group'
I encountered the same error on Windows, this replacement regex worked for me on Windows: # pat = re.compile(r'/([^/]+)_\d+.jpg$') # for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found