iqbal-lab-org / gramtools

Genome inference from a population reference graph
MIT License
92 stars 15 forks source link

variantkmers script error #54

Closed sm0179 closed 7 years ago

sm0179 commented 7 years ago

cmd: python3 /data1/apps/gramtools/utils/variantKmers.py -f ./prg_24Mb_human_chr21_with_44439_vars_based_on_restricted_ref/prg.fa -k 11 -n > ./prg_24Mb_human_chr21_with_44439_vars_based_on_restricted_ref/kmer/ksize_11.all

Traceback (most recent call last): File "/data1/apps/gramtools/utils/variantKmers.py", line 254, in options.nreads, options.mask) File "/data1/apps/gramtools/utils/variantKmers.py", line 214, in exec for i in bls.getKmerDict(ksize,nonvariant): File "/data1/apps/gramtools/utils/variantKmers.py", line 130, in getKmerDict j=c[i:i+k].tostring() AttributeError: 'str' object has no attribute 'tostring'

tip of dev branch, commit 10ce3764c1d1c8746577e9e838acc2e97246f886

iqbal-lab commented 7 years ago

Python2 for script?

sm0179 commented 7 years ago

I thought it's only supposed to work with python3

iqbal-lab commented 7 years ago

My guesses gramtools.py needs py3. VarKmers might need 2

sm0179 commented 7 years ago

I get this with python2: File "/data1/apps/gramtools/utils/variantKmers.py", line 204 def exec(fasta, ksize, nonvariant, nreads, mask, output_fpath=''): ^ SyntaxError: invalid syntax

iqbal-lab commented 7 years ago

Bah

iqbal-lab commented 7 years ago

literally python2? I've used 2.7 I think mostly

ffranr commented 7 years ago

This issue should now be solved on all active branches.