Question: Error python script overlapping_reads.py
0
gravatar for Amaranta Remedios
9 months ago by
Manchester
Amaranta Remedios10 wrote:

Hi,

I am trying to run this script overlapping_reads.py https://github.com/ARTbio/tools-artbio/blob/master/tools/small_rna_signatures/overlapping_reads.py However I keep getting this error and I don't really know how to solve it. Any suggestion?

samtools index sorted_g.mapped_TEs_new_f.bam && overlapping_reads.py --input sorted_g.mapped_TEs_new_f.bam --minquery 25 --maxquery 35 --mintarget 25 --maxtarget 35 --overlap 10 --output pairable_sequences.sorted_g.mapped_TEs_new_f.fasta

File "/Users/user/bin/overlapping_reads.py", line 168, in 
args.mintarget, args.maxtarget, args.overlap)
File "/Users/user/bin/overlapping_reads.py", line 48, in init
overlap=self.overlap)
File "/Users/user/bin/overlapping_reads.py", line 79, in query_positions
for genomicKey in self.alignement_dic.keys():
RuntimeError: dictionary changed size during iteration
script github python • 216 views
ADD COMMENTlink written 9 months ago by Amaranta Remedios10
1
gravatar for ATpoint
9 months ago by
ATpoint46k
ATpoint46k wrote:

Python2/Python3 incompatibility error? Try running with both python2 and python3 and then see if the error goes away.

ADD COMMENTlink modified 9 months ago • written 9 months ago by ATpoint46k
1

Thanks a lot ! It was exactly that. What solved it was to add this to my script: #!/Users/user/.pyenv/shims/Python and run with python2.7

ADD REPLYlink modified 9 months ago • written 9 months ago by Amaranta Remedios10
1

The classic python error ;-) Developers should really indicate in the README what they used imho.

ADD REPLYlink written 9 months ago by ATpoint46k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2164 users visited in the last hour
_