Planning to Write a script that reads a Fasta-formatted file and writes the number of sequences in it, followed by the accessions of the sequences. For example, if the input is
>Pig
ACGT
>Dog
AGTG
>Bunny
TATA
then the output should be
3
Pig
Dog
Bunny
I started:
from Bio import SeqIO
Input_file=(fil ename."r")...
User Profile
Collapse
-
Almost solved this problem...
import random
import sys
from string import*
a=random.choice ('AGTC')
seq = ''.join([random.choice(' AGTC') for x in range(34)])
print "Length:34",cou nt
print ">my seq " ,
print seq
I am getting output like this:
Length:34 <function count at 0xb7ebe80c>
>my seq GTGTCATTGGGCTTT CGTCTTTCATACCAG GCCC... -
New python user need help
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
TGCGCATATTGTCTA ACTATGGCTGTGGCC GGA
The output must be in valid Fasta format.
I am trying... -
Thanks for ur help!
sorry to answer u late.
still i have some problem...
python ffff.py
[]
True/False A C D E F G H I K L M N P Q R S T V X Y W
Traceback (most recent call last):
File "ffff.py", line 50, in <module>
if num_range[0]<=abs(zcoord)<= num_range[1]:
TypeError: bad operand type for abs(): 'list'
bash-3.1$
some times...Leave a comment:
-
new python user needs help!
I am working with a text filelooks like this:
#NAME AA TOPO ACCESS DSSP STRIDE Z-COORD
1lghB A i 79.8 H H -24.58
1lghB V i 79.6 H H -22.06
1lghB H i 71.9 H H -19.94
i need to compare those lines which has a value between 10 to 22 and presents in the following way
True/false A C D E F G H I K L M N P Q R S T V X Y W(here alfabets represents amino acids)
1 1:1 2:0 3:0 and so on for rest of the amino...
No activity results to display
Show More
Leave a comment: