merenlab / illumina-utils

A library and collection of scripts to work with Illumina paired-end data (for CASAVA 1.7+ pipeline).
GNU General Public License v2.0
89 stars 31 forks source link

fastaunique #14

Closed annaship closed 6 years ago

annaship commented 6 years ago

Hi Meren, We finally switched to python3 and now I have a problem: /groups/vampsweb/seqinfobin/anaconda3/bin/python3 ./fastaunique TTAGGC_NNNNTCAGC_1_MERGED_V6_PRIMERS_REMOVED Traceback (most recent call last): File "./fastaunique", line 74, in main(args) File "./fastaunique", line 13, in main input = u.SequenceSource(args.input_fasta, unique = True) File "/groups/vampsweb/seqinfobin/anaconda3/lib/python3.6/site-packages/IlluminaUtils/lib/fastalib.py", line 94, in init self.init_unique_hash() File "/groups/vampsweb/seqinfobin/anaconda3/lib/python3.6/site-packages/IlluminaUtils/lib/fastalib.py", line 98, in init_unique_hash hash = hashlib.sha1(self.seq.upper()).hexdigest() TypeError: Unicode-objects must be encoded before hashing

meren commented 6 years ago

Which version is this, Anna?

Can you please type iu-merge-pairs -v?

annaship commented 6 years ago

Illumina-utils v2.1

On Sat, Feb 10, 2018 at 5:28 PM, A. Murat Eren notifications@github.com wrote:

Which version is this, Anna?

Can you please type iu-merge-pairs -v?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/merenlab/illumina-utils/issues/14#issuecomment-364700849, or mute the thread https://github.com/notifications/unsubscribe-auth/AALtlsy65ti0MnpRxrxVH8f8xUg-nT0Oks5tThgTgaJpZM4SBGbg .

meren commented 6 years ago

Crap :/

Can you please replace the /groups/vampsweb/seqinfobin/anaconda3/lib/python3.6/site-packages/IlluminaUtils/lib/fastalib.py with this one here and let me know if it works:

https://gist.github.com/meren/e2fd30fa8219246ca4108fb357a6ed56

Thanks,

annaship commented 6 years ago

Now the error message is different: Traceback (most recent call last): File "./fastaunique", line 74, in main(args) File "./fastaunique", line 44, in main while input.next(): AttributeError: 'SequenceSource' object has no attribute 'next'

On Sat, Feb 10, 2018 at 5:45 PM, A. Murat Eren notifications@github.com wrote:

Crap :/

Can you please replace the /groups/vampsweb/seqinfobin/ anaconda3/lib/python3.6/site-packages/IlluminaUtils/lib/fastalib.py with this one here and let me know if it works:

https://gist.github.com/meren/e2fd30fa8219246ca4108fb357a6ed56

Thanks,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/merenlab/illumina-utils/issues/14#issuecomment-364701957, or mute the thread https://github.com/notifications/unsubscribe-auth/AALtlpWt3bQL9sBN4Wd_qmGZak7xB5DCks5tThwAgaJpZM4SBGbg .

meren commented 6 years ago

That is something you need to fix in your file. Try next(input)

annaship commented 6 years ago

OK, thank you!

On Sat, Feb 10, 2018 at 5:50 PM, A. Murat Eren notifications@github.com wrote:

That is something you need to fix in your file. Try next(input)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/merenlab/illumina-utils/issues/14#issuecomment-364702262, or mute the thread https://github.com/notifications/unsubscribe-auth/AALtln_DHwp8cRZVIyG-DzuNPJISSrGPks5tTh0rgaJpZM4SBGbg .

annaship commented 6 years ago

It works! Thank you so much!

On Sat, Feb 10, 2018 at 5:51 PM, Anna Shipunova tetya-loshad@yandex.ru wrote:

OK, thank you!

On Sat, Feb 10, 2018 at 5:50 PM, A. Murat Eren notifications@github.com wrote:

That is something you need to fix in your file. Try next(input)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/merenlab/illumina-utils/issues/14#issuecomment-364702262, or mute the thread https://github.com/notifications/unsubscribe-auth/AALtln_DHwp8cRZVIyG-DzuNPJISSrGPks5tTh0rgaJpZM4SBGbg .

annaship commented 6 years ago

It works! Thank you so much!

meren commented 6 years ago

So I will release a new version, and it is better if you use this instead of this hacked version :)

annaship commented 6 years ago

Sure, will do.

On Sat, Feb 10, 2018 at 6:01 PM, A. Murat Eren notifications@github.com wrote:

So I will release a new version, and it is better if you use this instead of this hacked version :)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/merenlab/illumina-utils/issues/14#issuecomment-364702996, or mute the thread https://github.com/notifications/unsubscribe-auth/AALtlrpG_z6ob60yoKMcHfjfRdc0X7TXks5tTh_LgaJpZM4SBGbg .