User: mrth

gravatar for mrth
mrth30
Reputation:
30
Status:
New User
Location:
Last seen:
2 years, 2 months ago
Joined:
2 years, 6 months ago
Email:
m*****************@gmail.com

Posts by mrth

<prev • 9 results • page 1 of 1 • next >
0
votes
1
answer
97
views
1
answers
Comment: C: How to use cmd?
... Hi! Thanks for responding! I'm currently in the process of using the code. However, I get a dreaded red error message saying `NameError: global name 'getitem' is not defined`. But when the user inputs an incorrect ID number it works smoothly. :) -------------------- Fixed it! Used `self.getitem(comm ...
written 2.5 years ago by mrth30
1
vote
2
answers
96
views
2
answers
Comment: C: Creating a dictionary within a class
... Maaaate, you are a legend! Thank you so much! Been scratching my head all day trying to add it into my `class FastaFile`. It works! :) Eventually, I would like a user to input a sequence ID and the sequence associated with that ID will be the output. Hopefully... ...
written 2.5 years ago by mrth30
0
votes
2
answers
96
views
2
answers
Comment: C: Creating a dictionary within a class
... Thanks for responding. I edited to Python 2.7 now. What I meant by I would like to continue with my class is because I want to use all my functions within a class (even though I know it is simpler to do otherwise sometimes). ...
written 2.5 years ago by mrth30
0
votes
3
answers
1.7k
views
3
answers
Comment: C: Parsing FASTA file using class in Python
... Thanks for this information. I never knew pyfaidx existed. ...
written 2.5 years ago by mrth30
3
votes
3
answers
1.7k
views
3
answers
Answer: A: Parsing FASTA file using class in Python
... For those wondering, I have solved the problem. I used this code: from itertools import groupby class FastaFile: def __init__(self, path): self.path = path self._map = {} self.__fasta_iter() def __str__(self): return self._map. ...
written 2.5 years ago by mrth30
0
votes
3
answers
1.7k
views
3
answers
Comment: C: Parsing FASTA file using class in Python
... Hi there, I really appreciate the response! However, I'm trying to use class with magic methods to parse it as I need to add it somewhere within my code (for an assessment). I feel as though I am really close but yet so far away! ...
written 2.5 years ago by mrth30
0
votes
3
answers
1.7k
views
3
answers
Comment: C: Parsing FASTA file using class in Python
... You were correct. It is for an assignment. I usually use with open to parse my files but need to try something new this time around - classes. ...
written 2.5 years ago by mrth30
0
votes
3
answers
1.7k
views
3
answers
Comment: C: Parsing FASTA file using class in Python
... Thanks for replying! Unfortunately, it still gives the same error message. ...
written 2.5 years ago by mrth30
8
votes
3
answers
1.7k
views
7 follow
3
answers
Parsing FASTA file using class in Python
... Hello, I am new to the world of Biopython and Python in general. I am try to parse a fasta file using class. I have got the following code so far: from itertools import groupby class OpenFastaFile: def __init__(self, path): self.path = path self._map = {} ...
fasta python class biopython parsing written 2.5 years ago by mrth30 • updated 2.5 years ago by Matt Shirley9.1k

Latest awards to mrth

Teacher 2.5 years ago, created an answer with at least 3 up-votes. For A: Parsing FASTA file using class in Python
Scholar 2.5 years ago, created an answer that has been accepted. For A: Parsing FASTA file using class in Python

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2740 users visited in the last hour