I ve to Write a Python program that prints a random DNA sequence in Fasta format.
That program should ask for the length of the sequence and suggest a reasonable sequence name.
The session should look something like:
> python randomdna.py
Length: 34
>MySequence
TGCGCATATTGTCTAACTATGGCTGTGGCCGGA
The output must be in valid Fasta format.
I am trying this way:
import random
import sys
from string import *
count = input("34")
seq = ''.join([random.choice('AGTC') for x in range(count)])
print "Length:",count
print ">",seq
But its only printing "34"
any idea?
Thanks in advance