Hi there.
I'm new to Linux, I'm using the 12.04 LTS distribution and I'm having kind of a hard time here.
I have a file which contains information in the fasta format (a format for biologists), which looks like this:
>Id string_of_varia ble_length ~Number~Id2
[string of thousands of characters]
>Id string_of_varia ble_length ~Number~Id2
[string of thousands of characters]
...
User Profile
Collapse
-
Copying a string from file
-
Reading from a file
I'm trying to get data from a txt file, still I don't know how to do it. The data is in fasta format (a format used in molecular biology to store protein/DNA sequences) whis is very simple:
Code:>Header1 Sequence1 >Header2 Sequence2 . . . >HeaderN SequenceN
-
Size of a string
I'm using a computer with 4 GB DDR3 Memory and Intel core i5 processor.
My question is about the max size of a string/list.
I want to make operations over a matrix of, let's say 30 rows and about 1500 columns (one character per column). Is it possible with the above specifications or should I split the matrix into pieces so each one has less columns? -
Windows 7 Home Premium
Python 2.7.2 (Tk version 8.5)
And using IDLE (2.7.2) to edit.
Maybe I'll move soon to Linux (ubuntu? not sure yet).
It's the first time I try to use a programming language and have had some minor troubles but I guess it's only a matter of time so I get used to Python. -
@bvdet
Thanks for your reply. I tried the code and it worked perfectly. I made some minor modifications so it asked the user for the size of the matrix:
Code:cols=input("How many columns will be in the matrix?: ") rows=input("How many rows will be in the matrix?: ")
Leave a comment:
-
Filling a list of lists...
Here's my problem.
I need a matrix (a list of lists) of undefined size (maybe I should define it as an empty list?). The matrix will have a size of nxm but n and m will be introduced by the user.
Now, the user will also introduce the values for the matrix as a string, for example: list[0]="Hello" but I need to store that string as a list of 5 elements list[0]=[H, e, l, l, o]
Is there a not so complicated way to do that?...
No activity results to display
Show More
Leave a comment: