User Profile
Collapse
-
in this situation the ---TGT--- needs to be read as is...we cannot ignore the dashes or the program will not work -
ok, i inserted this into the program but nothing printed and there wasnt an error message
Code:filename = input("Please enter a filename:") with open(filename, "r") as myfile: data = myfile.readlines() for i in range(len(data)): data[i] = data[i].rstrip("\n")Leave a comment:
-
ok, by any chance is it possible to make this read from a txt file and for it to work for any substring alignmentLeave a comment:
-
need help with substring alignment
Situation..Give n two sequences, where one is a substring of the other, we define a substring alignment by matching the substring with the longer sequence and placing gaps everywhere else. For example if the input is ACCTGTAGG and TGT then the substring alignment is
ACCTGTAGG
---TGT---
i need help designing program that prints the substring alignment of two unaligned sequences. If no substring alignment exists... -
great, can this way work for any sequence or just this specific problem...if the sequences were of any length how would you combine them without having to type out each sequence?Leave a comment:
-
ok, im having trouble understanding zip(*sequences) ..ive never used that before at my level of programming and was wondering if there is an alternative methodLeave a comment:
-
Code:with open("e:/dna14.txt", "r") as myfile: data = myfile.readlines() myfile.close() for i in range(0, len(data), 1): data[i] = data[i].rstrip("/n") column_number = input("Please enter a coumn number: ") column_number = int(column_number) ch1 = (data[1])[column_number] Acount = 0Last edited by bvdet; Nov 18 '10, 11:01 PM. Reason: Please use code tags when posting code. [code]....code goes here....[/code]Leave a comment:
-
How to get the number of A's in each column?
...hey guys.. how can you write aprogram that prints the number of A's in each column of a multiple sequence alignment. For example for the multiple alignment below
>human
ACCT
>mouse
ACCT
>cat
TCCT
>dog
ACAT
the output should be
2 0 1 0 -
A 100% conserved column is
one that has the exact same nucleotide in every sequence. For example if the
user enters 1 and the the multiple alignment below is given as input
>human
ACC
>mouse
ACC
>cat
TCC
>dog
ACA
then the output should be "No". But if the user enters 2 then the output
should be "Yes".Leave a comment:
-
-
the fasta format multiple alignment is just a name i believe, i do not think it is anything significant..Leave a comment:
-
Print column numbers that are 100% conserved
how can i write a Python program that prints the column numbers in a FASTA format multiple alignment that are 100% conserved. im really having trouble getting a grip of this concept...For example in the multiple alignment below
>human
ACC
>mouse
ACC
>cat
TCC
>dog
ACA
column 2 is 100% conserved but columns 1 and 3 are not 100% conserved. -
how can i shorten this program??
...Code:map = {} dna = [ "A", "C", "G", "T"] with open("matrix.txt", "r") as myfile: line = myfile.readline() mylist = line.split() map{"AA"} = mylist[0] map{"AC"} = mylist[1] map{"AG"} = mylist[2] map{"AT"} = mylist[3] line = myfile.readline() mylistLast edited by bvdet; Nov 10 '10, 02:41 AM. Reason: Add code tags [code]....code goes here....[/code]
No activity results to display
Show More
Leave a comment: