Error python script overlapping_reads.py
1
0
Entering edit mode
2.1 years ago

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
python script github • 612 views
ADD COMMENT
1
Entering edit mode
2.1 years ago
ATpoint 62k

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

ADD COMMENT
1
Entering edit mode

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 REPLY
1
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1975 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6