Entering edit mode
4.8 years ago
grant.hovhannisyan
★
2.5k
Hi,
I am having troubles with RGT package. When I run
rgt-hint footprinting --atac-seq --paired-end --organism=SC SC1.bam SC1_peaks.bed --output-prefix=SC1
I get the error
Traceback (most recent call last):
File "/home/ghovhannisyan/.local/bin/rgt-hint", line 11, in <module>
sys.exit(main())
File "/home/ghovhannisyan/.local/lib/python2.7/site-packages/rgt/HINT/Main.py", line 89, in main
args.func(args)
File "/home/ghovhannisyan/.local/lib/python2.7/site-packages/rgt/HINT/Footprinting.py", line 105, in footprinting_run
atac_seq(args)
File "/home/ghovhannisyan/.local/lib/python2.7/site-packages/rgt/HINT/Footprinting.py", line 252, in atac_seq
min_length=None, max_length=145, strand=True)
File "/home/ghovhannisyan/.local/lib/python2.7/site-packages/rgt/HINT/signalProcessing.py", line 935, in get_bc_signal_by_fragment_length
cut_site = read.aend + reverse_shift - 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
I have added the organism as described here: https://groups.google.com/forum/#!category-topic/rgtusers/general-discussion--rgt-core-classes/6ioEaNXEeeA
Did anybody have this before? I suspect this could be because of the mapper - I used bwa, while in the example files they use bowtie2.
Disclaimer: cross-posted to RGT google group, which does not seem very active.
The error suggests that read.aend is, for some reason,
None
. I'll assume pysam is used under the hood, and that attribute is deprecated, but that should not be the problem. My first thought is that you have unmapped reads in your bam file, you could try filtering on that and see if the error is reproduced..Yes it somehow should be related to pysam... thanks, I will give it a try.
Hi Wouter, your suggestion worked, thank you! But now I get another one
Any thoughts?
My first thought is that you and they should be using python 3 ;-)
Not sure if that is going to make any difference though.
I downloaded the code, and my second thought is that they should follow PEP8 style guidelines. Also not going to make any differences :-D
the error is caused by a construct like this:
a, b = my_function(args)
However, since my_function in this case only returns one value there is not enough data to 'fill' both a an b. And indeed, if I search for that function (defined in
rgt/HINT/signalProcessing.py
) that function conditionally returns one or two values. That's some odd design, but whatever. I'm not going further down the rabbit hole here and see why it errors... no time for that. But perhaps you should stick to bowtie?agreed on python 3 :) Thanks anyways, I will post here if I find workaround.
So the first warning message is fixed by downgrading numpy. The main error still persists even when using bowtie2. Will try to email a developer and hope its not one of numerous abandoned bioinformatics packages...
I wouldn't worry too much about that warning. The last update on PyPI was made in July, so you might be lucky.