User Profile
Collapse
-
CCGG26 did you figure out this problem yet? I'm still having trouble coming up with answers for this one. -
if youre given ----------TGT---- as the substring, is there a way to tell the command to only read the letters TGT and ignore the "-" ?Leave a comment:
-
How to use .split
I need to write a Python script to convert two sequences to interleaved FASTA format with 10 characters per line.
so if the input is
>human
ACACCGGTACCAGAT ATGATATACCGAGA
>mouse
ACCAGAGGGGGTTTT AAACCACAGCG
(saved as dna.txt)
the output should be
>human
ACACCGGTAC
CAGATATGAT
ATACCGAGA
>mouse
ACCAGAGGGG
GTTTTAAACC
ACAGCG
... -
any idea how to do it starting with the first line I use ?
meaning I can't write out the dna sequence, I have to use the filepathLeave a comment:
-
i looked at that one and tried all those ways. none of them worked /: i think that guy is in my class, but i have no clue who he is. do you know what i could do to solve my problem ?Leave a comment:
-
tried this, im getting closer and closer. but still not getting a single input value as the correct one.
with open("/Users/homemac/classes/bnfo135/dna.txt", "r") as myfile:
seq = myfile.readline s()
str(seq)
str.replace(str (seq), "A","T")
str.replace(str (seq), "C","G")
print(str(seq))
"['>human\\n', 'ACCGT\\n']"...Leave a comment:
-
Complement to DNA in output
Write a Python script that computes the complement
of a DNA sequence. In other words, your script should convert all
A's to T's, C's to G's, G's to C's, and T's to A's.
The input is one sequence in FASTA format in a file called "dna.txt".
For example if the file contains
>human
ACCGT
then the output of the program should be TGGCA. Note that your program should...Last edited by bvdet; Sep 14 '10, 03:35 AM. Reason: Add code tags. Please use them! [code] ...code goes here...[/code]
No activity results to display
Show More
Leave a comment: