Hi
I have got some python related queries. I am working on an MRes project
which involves a bit of programing in python. Actually, I am using a
python program developed by someone, which gives pairwise genetic
distances between a set of sequences (I don't know how...) and outputs a
simple text file of the following format...
s1,s2,s3,s4,s5
4,7,2,3
8,6,4
3,6
7
where s1, s2, s3...represent sequences and the second line describes
the pairwise distance between s1 and all other sequences,thid line is
for the distance between s2 and other sequences.
and so on.
1. I want to read this line into a data structure(most probably by making a list of lists like [[s1,s2,4],[s1,s2,7],[s1,s3,2] and so on) which gives each pair and the corresponding pairwise distances. Of course, I would do this by writing a function that reads this file into a data structure which gives the all the pairs of sequences and theircorresponding distance values, but I am not sure how to do this.
I have got some python related queries. I am working on an MRes project
which involves a bit of programing in python. Actually, I am using a
python program developed by someone, which gives pairwise genetic
distances between a set of sequences (I don't know how...) and outputs a
simple text file of the following format...
s1,s2,s3,s4,s5
4,7,2,3
8,6,4
3,6
7
where s1, s2, s3...represent sequences and the second line describes
the pairwise distance between s1 and all other sequences,thid line is
for the distance between s2 and other sequences.
and so on.
1. I want to read this line into a data structure(most probably by making a list of lists like [[s1,s2,4],[s1,s2,7],[s1,s3,2] and so on) which gives each pair and the corresponding pairwise distances. Of course, I would do this by writing a function that reads this file into a data structure which gives the all the pairs of sequences and theircorresponding distance values, but I am not sure how to do this.
2. Secondly, I want to write another function which takes up three arguments, the data structure returned by the previous function and the names of two sequences. It then returns the corresponding value.
Please help
Kamran
Kamran
Express yourself instantly with MSN Messenger! MSN Messenger Download today it's FREE!
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor