Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastx iteration returning bytes in python 3 #173

Closed
brwnj opened this issue Oct 14, 2015 · 1 comment
Closed

Fastx iteration returning bytes in python 3 #173

brwnj opened this issue Oct 14, 2015 · 1 comment

Comments

@brwnj
Copy link

brwnj commented Oct 14, 2015

In [8]: sys.version
Out[8]: '3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Mar  6 2015, 12:07:41) \n[GCC 4.2.1 (Apple Inc. build 5577)]'

In [10]: pysam.__version__
Out[10]: '0.8.4pre'

In [11]: for f in pysam.FastxFile("ttt.fastq.gz"):
   ....:     print(f)
   ....:     print(f.name)
   ....: 
@b'M03018:26:000000000-AHU3W:1:1101:13741:1809' b'1:N:0:0 TTACTGTGGCCG'
b'TACGGAAGGTCCGGGCGTTATCCGGATTTATTGGGTTTAAAGGGAGCGTAGGCGGGCCGTTAAGTCAGTTGTGAAAGTTCGGGGCTCAACCCCGGAATTGCAGTTGAAACTGCCGGTCTTGAGTACACGCAGGGAAGCCTGAATTCATGGTGTAGCGGTGAAATGCTTAGATATCATGAAGACGACCGATCGCGAAGGCAGGTTTCCGGAGTGTAACTGACGCTGAGGCTCGAAAGTGCGGGTATCAAACA'
+
b'BCCCCBBBCFFFGGGGGGGGGGHGGGGGHFHHHHGEFGFFHHHGHGGGGGGGHGGGGGGGGGGHHHHHHHHHGHGGHHHHGGGGGGHGFHHGGGGGGGHHHGHHHHHFHHHHHHGGGGGHHGHHHHHGFC?DGGGGGGGGGGGGGGGGGGGGGGGGGGGFFFEFFFFFFFFFFFFFFFFFFFFFFFFD-@--A@DA-.E.AAFFFF0;>.-AFFFFBFBBF?ADD.:.AEFAD/A.FB09--DFFFFFBF.'
b'M03018:26:000000000-AHU3W:1:1101:13741:1809'

pysam.Samfile works fine and was changed to strings. I'm not sure if this was overlooked during those changes or if this behavior is intentional.

@AndreasHeger
Copy link
Contributor

Thanks, I will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants