473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Genetics

I have to write a genetics program:
This is the INPUT:

25 sets of genetic sequences are provided. Each sample is provided in a specific format so that my program may read in the genetic information for the purposes of processing. The following is the first genetic sequence provided:

Sample 0:CTACGCTATC
Sample 1:TTACGCTATC
Sample 2:TTACGCTATC
Sample 3:TTACGCTATC
Sample 4:TTACGCTATC
Sample 5:CTACGCTATC
Sample 6:ATACGCTATC
Sample 7:ATACGCTATC
Sample 8:ATACGCTATC
Sample 9:TTACGCTATC
Sample 10:CTACGCTATC
Sample 11:GTACGCTATC
Sample 12:ATACGCTATC
Sample 13:TTACGCTATC
Sample 14:GTACGCTATC
Sample 15:ATACGCTATC
Sample 16:TTACGCTATC
Sample 17:GTACGCTATC
Sample 18:ATACGCTATC
Sample 19:ATACGCTATC
Each line within sample file has the following format:
Sample<space>#:Genetic sequence

That is, the word "Sample", followed by a space, followed by a number (starting at 0), followed by a colon (:) followed by the genetic sequence. The genetic sequence length can vary. Each genetic sequence is terminated by a newline character (\n). Your program is required to open a data file containing genetic information in the above format. It will have read in the genetic information into data structures (probably a list) so that it can be processed.

OUTPUT:
Because the data sets within this assignment are so large, the correctness of my results will have to be checked automatically using the diff program. In order for the diff program to report your answers correctly, my output must match EXACTLY. Therefore, I cannot deviate from the output format defined here. My output must be in the following form:

Sequence:genetic sequence you found
Length:#
Amino Acid list

The following is an example output:

Sequence:TACGCTATC
Length:9
AUG : (Met/M)Methionine, Start[1]
CGA : (Arg/R)Arginine
UAG : Amber (Stop)
Nov 21 '06 #1
2 1335
bartonc
6,596 Expert 4TB
Now, you know that we're not going to do you work for you.
Post some code here to show that you are making an effort.

Oh, and by the way, how did zellers congrunence turn out?
You have several threads on this forum that are left hanging because you nerver post back with so much as a "That works, thanks". We are here to help you, and like to feel appreciated for our trouble (we don't get paid to do this - it is out of the goodness of our hearts). So please show us that you are making an effort and show some appreciation. Thanks,
Barton (python forum moderator)
Nov 21 '06 #2
kudos
127 Expert 100+
Expand|Select|Wrap|Line Numbers
  1. import sys
  2. filename = sys.argv[1]
  3. fd = open(filename,"r")
  4. filecontent = fd.readlines()
  5.  
  6. for entry in filecontent:
  7.  print (entry.split(":")[1]).strip("\n")
  8.  
Here is a simple snippet that will read the sequence. Now, could you explain how 'TACGCTATC' becomes

AUG : (Met/M)Methionine, Start[1]
CGA : (Arg/R)Arginine
UAG : Amber (Stop)[/quote]

(I sleept throught my genetics classes :)

-kudos





I have to write a genetics program:
This is the INPUT:

25 sets of genetic sequences are provided. Each sample is provided in a specific format so that my program may read in the genetic information for the purposes of processing. The following is the first genetic sequence provided:

Sample 0:CTACGCTATC
Sample 1:TTACGCTATC
Sample 2:TTACGCTATC
Sample 3:TTACGCTATC
Sample 4:TTACGCTATC
Sample 5:CTACGCTATC
Sample 6:ATACGCTATC
Sample 7:ATACGCTATC
Sample 8:ATACGCTATC
Sample 9:TTACGCTATC
Sample 10:CTACGCTATC
Sample 11:GTACGCTATC
Sample 12:ATACGCTATC
Sample 13:TTACGCTATC
Sample 14:GTACGCTATC
Sample 15:ATACGCTATC
Sample 16:TTACGCTATC
Sample 17:GTACGCTATC
Sample 18:ATACGCTATC
Sample 19:ATACGCTATC
Each line within sample file has the following format:
Sample<space>#:Genetic sequence

That is, the word "Sample", followed by a space, followed by a number (starting at 0), followed by a colon (:) followed by the genetic sequence. The genetic sequence length can vary. Each genetic sequence is terminated by a newline character (\n). Your program is required to open a data file containing genetic information in the above format. It will have read in the genetic information into data structures (probably a list) so that it can be processed.

OUTPUT:
Because the data sets within this assignment are so large, the correctness of my results will have to be checked automatically using the diff program. In order for the diff program to report your answers correctly, my output must match EXACTLY. Therefore, I cannot deviate from the output format defined here. My output must be in the following form:

Sequence:genetic sequence you found
Length:#
Amino Acid list

The following is an example output:

Sequence:TACGCTATC
Length:9
AUG : (Met/M)Methionine, Start[1]
CGA : (Arg/R)Arginine
UAG : Amber (Stop)
Nov 21 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
1
by: Gabriel Zachmann | last post by:
For some reason, I would like to have some statistics about how often Python is used in the *scientific* communities (such as astronomy, genetics, electrical engineering, ...), as opposed to C++ or...
6
by: Tom Longridge | last post by:
My current Python project involves lots repeatating code blocks, mainly centred around a binary string of data. It's a genetic algorithm in which there are lots of strings (the chromosomes) which...
3
by: Michael | last post by:
I am currently doing some genetic research on the life cycle of viruses (biological as opposed to computer based) and require some information about the core operations of the C programming...
4
by: Kathie via AccessMonster.com | last post by:
Hello, I have to import monthly, files that were once *.csv but due to commas in addresses, the interface program was changed to dump tab delimited. Now my code is not finding the files in the...
0
by: yootaeho | last post by:
Hi, I have an Object which has a list of list of objects. For instance, public class myClass { public List<FirstClass{get;set;} }
2
by: yootaeho | last post by:
Hi, I have an Object which has a list of list of objects. For instance, public class myClass { public List<FirstClassmyFirstClass {get;set;} public List<SecondClassmySecondClass {get;set;}...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.