setting path for python interpretor

2008-11-28 Thread Beema Shafreen
Hi all, Can any body suggest me how to the set path for making python2.4 as the main interpretor instead of python 2.5. regards -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

replace numbers in a string

2008-10-09 Thread Beema Shafreen
hi All, i have few lines in file "ttccatttctggacatgacgtctgt6901ggtttaagctttgtgaaagaatgtgctttgattcg" i need to replace the number and get only the alphabet in such a case what should i do. Can any body suggest me -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

Re: function return

2008-09-11 Thread Beema Shafreen
t when done: >> >> > fh.close() >> return data_lis >> >> > -- > http://mail.python.org/mailman/listinfo/python-list > -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

function return

2008-09-11 Thread Beema Shafreen
ne_symbol,ptms) return result fh.close() -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

biopython

2008-09-09 Thread Beema Shafreen
w can anybody suggest me an alternative for this -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

Re: print "%s"

2008-08-18 Thread Beema Shafreen
\t%s\t%s\t%s\t' > > - Michael > > On Aug 18, 3:27 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > > Cameron Simpson a écrit : > > > > > > > > > On 18Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: > > > | In my script i

print "%s"

2008-08-17 Thread Beema Shafreen
Hi ALL, In my script i have to print a series of string , so print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") I need to know instead of typing so many %s can i write %6s in python, as we do in C progm. What a

Regular expression

2008-07-16 Thread Beema shafreen
Hi all, How do I write a regular expression for this kind of sequences >gi|158028609|gb|ABW08583.1| CG8385-PF, isoform F [Drosophila melanogaster] MGNVFANLFKGLFGKKEMRILMVGLDAAGKTTILYKLKLGEIVTTIPTIGFNVETVE thanks -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting a file

2008-06-14 Thread Beema shafreen
Thanks lot for your valuable suggestions On Sun, Jun 15, 2008 at 4:04 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 14 Jun 2008 12:45:47 +0530, "Beema shafreen" > <[EMAIL PROTECTED]> declaimed the following in > gmane.comp.python.general: > >

sorting a file

2008-06-14 Thread Beema shafreen
Hi all, I have a file with three columns i need to sort the file with respect to the third column. How do I do it uisng python. I used Linux command to do this. Sort but i not able to do it ? can any body ssuggest me -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

e-value

2008-06-12 Thread Beema shafreen
4.4e-03 gi|78101790|LFEGGFDTLNK2.2e-03 gi|157021047|LLSGVTIAQGGVLPNIQAVLLPK7.3e-05 gi|157138410|LLSGVTIAQGGVLPNIQAVLLPK5.2e-02 gi|27820013|LTDEEVDEMIR2.6e-03 gi|56417572|TITLEVEPSDTIENVK7.8e-02 gi|157020596|HPGSFEIVHVK5.8e-02 can anybody help me reagr

Re: Typeerror

2008-05-21 Thread Beema shafreen
n what ever you are storing in res isn't an integer. > > > > Chris > > > > > > > > Beema shafreen wrote: > > > > > Hi all, > > > I getting the following error when i run my scirpt , > > > can somebody help me

Typeerror

2008-05-21 Thread Beema shafreen
Hi all, I getting the following error when i run my scirpt , can somebody help me regarding this to solve the type error problem Traceback (most recent call last): File "get_one_prt_pep.py", line 59, in ? if len(data[res])<=1: TypeError: string indices must be integers -- B

comparison of files using set function

2008-05-17 Thread Beema shafreen
quot;Fr66.txt",\ "Fr68.txt",\ "Fr70.txt",\ "Fr72.txt"]} data1 = file1_search(*files1) """113 is the total number of gi""" data2 = file2_search(**files2) #for j in data2:

set function

2008-05-16 Thread Beema shafreen
line in the script is this an right way will my program accept it or what are the other option to compare 10 different such items -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

basic comparing files

2008-05-15 Thread Beema shafreen
option or is there any other way -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

printing dictionary and tuple

2008-03-19 Thread Beema shafreen
hould i print the data without missing the lines excluding the error separated by tab. -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

module pickle

2008-01-08 Thread Beema shafreen
Hi I am beginner in python. and I am not able to understand the Pickle concept in python can. some body explain me about the use of this module, few examples. which will help me a lot. regards shafreen -- http://mail.python.org/mailman/listinfo/python-list

CSV

2008-01-03 Thread Beema shafreen
Hi all, I have written a script to parse a CSV file: import csv def get_lines(fname): fhandle = csv.reader(open(fname,"rb")) for line in fhandle: while fhandle.next()[0] == "prot_hit_num": continue for row in fhandle: print row result = get

joining rows

2007-12-29 Thread Beema shafreen
hi every body, I have two columns in a file separted by tabs If the column1 is common in the row1 and row2 then it should be column 2 should be displayed in the single line. eg: col 1 col2 A1 A2 A3 B1 C 2 D 3

comparing dictionaries to find the identical keys

2007-12-28 Thread Beema shafreen
hi everybody , i need to compare two dictionary's key. I have written a script gene_symbol = {} probe_id = {} result = {} def getGene(fname): fh = open(fname , 'r') for line in fh: yield line fh.close() for line in getGene("symbol_hu133"): data1= line

error :list out of range

2007-11-13 Thread Beema shafreen
hi everybody, I have written a code to check which is the lowest value in a list my list: ['94', 'A_16_P03647505', '-59', '42', 'A_16_P41573860', '-44', '513', 'A_16_P41573861', '-44', '66', 'A_16_P41573862', '-44', '327', 'A_16_P03647506', '-46', '77', 'A_16_P41573864', '-59',

hopping in a list

2007-11-12 Thread Beema shafreen
hi everybody, I have a created list, my code: res_value = [] fh = open('test','r') for line in fh.readlines(): data = line.strip().split('\t') current_span = data[3].strip() probe = data[2].strip() length = data[4].strip() res_value.append(cu

count increment...

2007-11-02 Thread Beema shafreen
hi, evrybody I have file A_16_P21360207304 A_14_P136880783 A_16_P21360209795 A_16_P21360210173 A_16_P036419591177 A_16_P036419601944 A_16_P03641962999 A_16_P41563648-31 A_16_P036419633391 A_16_P415636493626 A_16_P03641964180 A_16_P415636551216 A_1

error ...1 value to unpack

2007-11-02 Thread Beema shafreen
hi everybody, i have a file: A_16_P21360207#304 A_14_P136880#783 A_16_P21360209#795 A_16_P21360210#173 A_16_P03641959#1177 A_16_P03641960#1944 A_16_P03641962#999 A_16_P41563648#-31 A_16_P03641963#3391 A_16_P41563649#3626 A_16_P03641964#180 A_16_P41563655#1216 A_16_P03641965#1170 A_16_P03641966#194

looping

2007-11-01 Thread Beema shafreen
hi everybody, I have a file: A_16_P21360207 304 A_14_P136880783 A_16_P21360209795 A_16_P21360210173 A_16_P036419591177 A_16_P036419601944 A_16_P03641962999 A_16_P036419633391 A_16_P415636493626 A_16_P03641964180 A_16_P415636551216 A_16_P03641965

looping

2007-11-01 Thread Beema shafreen
hi everbody, i have a file , A_16_P418510561730 A_16_P03796992165 A_16_P21640222360 A_16_P21640223240 A_16_P03796993168 A_16_P418510591094 A_16_P216402251035 A_16_P03796994154 A_16_P216402261422 A_16_P216402271262 A_16_P41851063107 A_16_P0379699

Re: to sum a list in a dictonary

2007-11-01 Thread Beema shafreen
type(s) for +: 'int' and 'str' On 11/1/07, Beema shafreen <[EMAIL PROTECTED]> wrote: > > hi everybody, >I need to sum a list in dictionary... > my script, >d = {} > probes = list(enumerate((i.split('\t')[2],i.split(&

to sum a list in a dictonary

2007-11-01 Thread Beema shafreen
hi everybody, I need to sum a list in dictionary... my script, d = {} probes = list(enumerate((i.split('\t')[2],i.split('\t')[3], i.split('\t')[4])for i in open('final_lenght_probe_span'))) for idx, (probe_id, span, length) in probes: try : l = [span,l

dictionary

2007-10-31 Thread Beema shafreen
hi everybody, I have a file 2709852 2709911A_16_P21360207405-59 2710316 2710367A_14_P136880-42-51 2710325 2710384A_16_P21360209876-59 2711260 2711319A_16_P21360210-22-59 2711297 2711356A_16_P0364

redundancy_check

2007-10-30 Thread Beema shafreen
hi everbody, I have a file, a b c 1454VALTGLTVAEYFR8.9954e-07 1454VALTGLTVAEYFR0.00404626 1498STLTDSLVSK0.00404626 1505TIAMDGTEGLVR1.50931e-05 1528GAEISAILEER0.00055542 1528GAEISAILEER0.00055542 1538

dictionary and list

2007-10-29 Thread Beema shafreen
hi everbody, I have a file, a b c d e 2722316 2722360A_16_P03641972150-44 2722510 2722554A_16_P2136023916-44 2722570 2722614A_16_P0364197344-44 2722658

appending into a list

2007-10-29 Thread Beema shafreen
hi everybody, I have a file : A B C D E 2717353 2717412A_16_P03641964214-59 2717626 2717685A_16_P4156365525-59 2717710 2717754A_16_P036419651250-44 2719004

two files into an alternate list

2007-10-29 Thread Beema shafreen
hi everybody , i have a file : file 1: 1 2 3 4 5 6 file2: a b c d e f how do i make the two files into list like this = [1,a,2,b,3,c,4,d,5,e,6,f] regards shafreen -- http://mail.python.org/mailman/listinfo/python-list

two file into a single file

2007-10-29 Thread Beema shafreen
hi everybody, I have a two file, file 1: 17097 17186 1723 17895 17906 18295 18311 1880 19160 19629 file 2: 17097 17186 1723 17895 17906 18295 18311 1880 19160 19629 how do i make into a single file.

sorting data

2007-10-29 Thread Beema shafreen
hi all, I have problem to sort the data.. the file includes data as follow. file: chrX:123343123123343182A_16_P41787782 chrX:123343417123343476A_16_P03762840 chrX:123343460123343519A_16_P41787783 chrX:1233433612334395A_16_P03655927 chrX:

caluclating median distance

2007-10-28 Thread Beema shafreen
hi everybody, I have a file 1175123443A_16_P03652190 12771336387A_16_P41582022 1723178298A_16_P03652191 18801932270A_16_P41582024 1000120210001261539A_16_P41582025 1000180010001859

iterating over the other and finding the greatest

2007-10-27 Thread Beema shafreen
hi everybody, I have file with four columns:the content: column1column2 col3 col4 1175123443A_16_P03652190 12771336387A_16_P41582022 1723178298A_16_P03652191 18801932270A_16_P41582024 1

easy but difficult

2007-10-16 Thread Beema shafreen
hi everybody, I have a file separated by hash: as shown below, file: A#1 B#2 A#2 A#3 B#3 I need the result like this: A 1#2#3 B 2#3 how will generate the result like this from the above file can somebody tell me what i have to do.. My code: fh =open('abc_file','r') for

hi everybody

2007-08-21 Thread Beema shafreen
hi everybody, i have written to fetch the url, and accesstje nm and np entries my code: import re import urllib2 import time Gene_id=raw_input("Please enter the gene_id:") fh = urllib2.urlopen(' http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term='+Gene_id) for line in fh.readlines():

swapping

2007-08-18 Thread Beema shafreen
hi everbody, i have a file with data: fhl1fkh2 dfp1chk1 mal3alp14 mal3moe1 mal3spi1 mal3bub1 mal3bub3 mal3mph1 mal3mad3 hob1nak1 i have written code to check the redudant pairs my code: data = [] data1 = [] fh = open('sheet1','r') for line in fh: if

clarification

2007-08-16 Thread Beema shafreen
hi everybody, i have a file with data separated by tab mydata: fhl1fkh2 dfp1chk1 mal3alp14 mal3moe1 mal3spi1 mal3bub1 mal3bub3 mal3mph1 mal3mad3 hob1nak1 hob1wsp1 hob1rad3 cdr2cdc13 cdr2cdc2 shows these two are separated by tab represented as

clarification

2007-08-16 Thread Beema shafreen
hi every body, i have compared two files: code: fh = open('HPRD_MAIN_20.txt','r') for line in fh.readlines(): data = line.strip().split('#') fh1 = open('NOMENCLATURE_MAIN_20.txt','r') for line1 in fh1.readlines(): data1 = line1.strip().split('#')

beginner in python

2007-08-02 Thread Beema shafreen
Hi everybody , I am a beginner in python, I have to fetch the redundant entries from a file, code: import re L = [] fh = open('ARCHITECTURE_MAIN.txt','r') for line in fh.readlines(): data =line.strip() # splitted = data.split('#') L.append(data) fh.close() M

beginner in python

2007-08-01 Thread Beema shafreen
hi everybody, I am beginner in python I have to calculate the euclidean distance between the atoms from a pdb file i have written the the code and its shows me some error , the code: import re import string import math ab =[] x_value = [] y_value = [] z_value = [] fh = open("1K5N.pdb",'r') for

beginner in python

2007-08-01 Thread Beema shafreen
Hi everybody , I am a beginner in python, I have to fetch the redundant entries from a file, code: import re L = [] fh = open('ARCHITECTURE_MAIN.txt','r') for line in fh.readlines(): data =line.strip() # splitted = data.split('#') L.append(data) fh.close() M