User Profile

Collapse

Profile Sidebar

Collapse
drjekil
drjekil
Last Activity: Nov 28 '08, 09:22 PM
Joined: Apr 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • drjekil
    started a topic Fasta file

    Fasta file

    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")...
    See more | Go to post

  • drjekil
    replied to New python user need help
    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...
    See more | Go to post

    Leave a comment:


  • drjekil
    started a topic New python user need help

    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...
    See more | Go to post

  • drjekil
    replied to new python user needs help!
    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...
    See more | Go to post

    Leave a comment:


  • drjekil
    started a topic new python user needs help!

    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...
    See more | Go to post
No activity results to display
Show More
Working...