Cogent icon indicating copy to clipboard operation
Cogent copied to clipboard

get_bad_or_unmapped_hq.py

Open NahlaHu opened this issue 2 years ago • 3 comments

Hi,

I was trying to run the command python <path_to_Cogent>/get_bad_or_unmapped_hq.py hq.fasta hq.5merge and I have this error:
File "/usr/local/Cogent/Cogent/helper_scripts/get_bad_or_unmapped_hq.py", line 20, in print >> sys.stderr, "Reading transcript file {0}....".format(input) TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(, file=<output_stream>)"?

Thanks

NahlaHu avatar Mar 31 '22 18:03 NahlaHu

HI @NahlaHu - my guess is you are not using Python 3? -Liz

Magdoll avatar Apr 02 '22 23:04 Magdoll

Thanks Liz, Well, the python version we have is Python 3.8.13. And the badmapped.fasta file was generated, but sized zero and generate this error. what is your suggestion? Thanks

NahlaHu avatar Apr 03 '22 22:04 NahlaHu

Thanks Liz, Well, the python version we have is Python 3.8.13. And the badmapped.fasta file was generated, but sized zero and generate this error. what is your suggestion? Thanks

The get_bad_or_unmapped_hq.py script written by python 2, so when you change your python version to python 2,that will generate the result smoothly.

JohnnyChen1113 avatar Oct 12 '22 17:10 JohnnyChen1113