Created
January 27, 2019 15:09
-
-
Save techtide/c8aa94c715a71a3e46cd490952a99666 to your computer and use it in GitHub Desktop.
my work in progress script to generate a phylogenetic tree from DNA sequences of species
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Phylogenetic Tree Generator | |
# By techtide | |
print "How many species: " | |
species_count = int(raw_input()) | |
sequences = [] | |
for i in range(0, species_count): | |
print "Sequence " + str(i+1) + ": " | |
sequences.append(raw_input().lower()) | |
comparing_sequence_chars = list(sequences[0]) | |
def compare_to(base): | |
for sequence in sequences: | |
sequence_chars = list(sequence) | |
if comparing_sequence_chars is sequence_chars: | |
pass | |
else: | |
differences = 0 | |
for i in range(0, len(sequence_chars)): | |
if sequence_chars[i] is not comparing_sequence_chars: | |
differences = differences + 1 | |
return differences |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment