How To Convert Txt To Srt Online?

How do you write a python script to take a .txt nucleotide file and convert it to an amino acid sequence?

  • THIS IS WHAT I CURRENTLY HAVE #! /usr/bin/env python #This program takes a nucleotide sequence #and converts it to an amino acid sequence #and determines the amino acid sequence molecular weight #open a nucleotide data file InFileName="nt.gene1.txt" #open the input file for reading InFile= open(InFileName, 'r') #Out file will be saved as a .txt file OutFileName=InFileName + ".txt" OutFile=open(OutFileName,'w') #Initialze the counter used to keep track of line LineCounter=0 NtList=[] #Loop through every odd line in the file one by one (excludes the accession number) for line in InFile: if (LineCounter%2)==1: NtList.append(line) LineCounter=LineCounter+1 Here is my dictionary file: #Dictionary of nucleotide combinations for amino acid Nt2proteinDict={ 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'TCA':'S', 'TCC':'S', 'TCG':'S', 'TCT':'S', 'AGA':'R', 'AGG':'R', 'CGA':'R', 'CGC':'R', 'CGG':'R', 'CGT':'R', 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L', 'TTA':'L', 'TTG':'L', 'CCA':'P', 'CCC':'P', &#3

  • Answer:

    Type the appropriate codings according to the format of the file.... Good luck!

Woan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Type the appropriate codings according to the format of the file.... Good luck!

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.