473,554 Members | 3,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

looping through a big file containing a set of files.

111 New Member
hey!
I have a program that takes two input files(one in the matrix form) and one in the sequence form.Now my problem is that i have to give the matrix file(containing many matrices) and sequence file containing many sequences and calculate the same log score as I did for one matrix file and one sequence file.
how it should exactly work is that. for every sequence it should calculate log values for all the weight matrices,then go to the second sequence and calculate all the log values using the matrices.
my matrix file is huge containing so many matrices. a part of it is here.

//
NA Abd-B
PO A C G T
01 10.19 0.00 10.65 6.24
02 5.79 0.67 10.50 10.11
03 4.50 0.00 0.00 22.57
04 0.00 0.00 0.00 27.08
05 0.00 0.00 0.00 27.08
06 0.00 0.00 0.00 27.08
07 27.08 0.00 0.00 0.00
08 0.00 2.83 0.00 24.25
09 0.00 0.00 24.45 2.62
10 19.33 0.00 4.34 3.41
11 0.31 12.28 3.39 11.09
//
//
NA Adf1
PO A C G T
01 0.71 0.08 26.02 1.55
02 3.03 23.00 1.24 1.09
03 0.26 10.50 3.29 14.31
04 0.00 0.06 28.23 0.07
05 0.12 27.27 0.06 0.91
06 1.44 20.36 0.37 6.19
07 5.35 0.28 21.49 1.24
08 7.81 16.10 3.81 0.63
09 0.51 17.77 0.45 9.63
10 0.00 0.14 28.21 0.00
11 0.00 25.69 0.20 2.46
12 0.48 9.98 0.07 17.82
13 1.27 0.00 27.01 0.07
14 15.59 7.98 2.92 1.87
15 4.28 22.37 0.00 1.70
16 0.18 0.77 22.70 4.70
//
//
NA Aef1
PO A C G T
01 0.00 0.06 12.49 0.00
02 3.80 0.17 0.00 8.57
03 0.87 0.06 0.00 11.62
04 0.06 9.76 2.32 0.41
05 9.82 0.00 2.73 0.00
06 9.76 0.00 0.00 2.78
07 3.80 0.31 0.00 8.43
08 0.00 0.00 0.00 12.54
09 0.00 6.53 5.85 0.17
10 0.00 12.38 0.17 0.00
11 2.73 1.02 8.80 0.00
12 5.85 0.00 6.70 0.00
13 1.02 5.96 0.00 5.57
14 0.00 5.16 4.66 2.73
15 1.03 7.55 3.97 0.00
16 4.82 5.00 2.73 0.00
//
//
NA Antp
PO A C G T
01 5.52 14.49 27.56 0.49
02 8.17 14.02 11.42 14.47
03 18.18 27.29 1.31 1.29
04 40.26 5.66 1.83 0.32
05 19.05 12.67 0.43 15.91
06 9.94 0.07 0.20 37.86
07 26.63 15.17 0.00 6.27
08 47.45 0.06 0.00 0.56
09 0.81 0.48 0.00 46.79
10 26.46 19.05 1.81 0.75
11 48.07 0.00 0.00 0.00
12 30.51 0.00 0.00 17.56
13 43.45 0.00 0.00 4.62
14 30.06 5.98 0.00 12.03
15 0.38 0.64 0.00 47.05
16 22.14 0.29 7.15 18.49
//
//

the sequence file is here( I mean this is also a part of my file)the actual file starts from "CC" the line before is just heading which we omit and this file is containg two sequences.
>CG9571_O-E|Drosophila melanogaster|CG 9571|FBgn003108 6|X:19926374..1 9927133
CCAGTCCACCGGCCG CCGATCTATTTATAC GAGAGGAAGAGGCTG AACTCGAGGATTACC CGTGTATCCTGGGAC GCG
GATTAGCGATCCATT CCCCTTTTAATCGCC GCGCAAACAGATTCA TGAAAGCCTTCGGAT TCATTCATTGATCCA CAT
CTACGGGAACGGGAG TCGCAAACGTTTTCG GATTAGCGCTGGACT AGCGGTTTCTAAATT GGATTATTTCTACCT GAC
CCTGGAGCCATCGTC CTCGTCCTCC
>Cp36_DRR|Droso phila melanogaster|Cp 36|FBgn0000359| X:8323349..8324 136
AGTCGACCAGCACGA GATCTCACCTACCTT CTTTATAAGCGGGGT CTCTAGAAGCTAAAT CCATGTCCACGTCAA ACC
AAAGACTTGCGGTCT CCAGACCATTGAGTT CTATAAATGGGACTG AGCCACACCATACAC CACACACCACACATA CAC
ACACGCCAACACATT ACACACAACACGAAC TACACAAACACTGAG ATTAAGGAAATTATT AAAAAAAATAATAAA ATT
AATACAAAAAAAATA TATATATATA
this is my code which works(prints the log value for one sequence and one matrix)
Expand|Select|Wrap|Line Numbers
  1. from math import *
  2. import random
  3. f=open("deeps1.txt","r")
  4. line=f.next()
  5. while not line.startswith('PO'):
  6.     line=f.next()
  7.  
  8. headerlist=line.strip().split()[1:]
  9. linelist=[]
  10.  
  11.  
  12. line=f.next().strip()
  13. while not line.startswith('/'):
  14.     if line != '':
  15.         linelist.append(line.strip().split())
  16.     line=f.next().strip()
  17.  
  18. keys=[i[0] for i in linelist]
  19. values=[[float(s) for s in item] for item in [j[1:] for j in linelist]]
  20.  
  21. array={}
  22. linedict=dict(zip(keys,values))
  23. keys = linedict.keys()
  24. keys.sort()
  25. for key in keys:
  26.     array=[key,linedict[key]]
  27.  
  28. datadict={}
  29. datadict1={}
  30. for i,item in enumerate(headerlist):
  31.     datadict[item]={}
  32.     for key_ in linedict:
  33.         datadict[item][key_]=linedict[key_][i]
  34.  
  35.  
  36. for keymain in datadict:
  37.     for keysub in datadict[keymain]:
  38.         datadict[keymain][keysub]+=1.0
  39.  
  40. datadict1=datadict.copy()
  41. for keysub in datadict:
  42.     for keysub in datadict[keymain]:
  43.         datadict1[keymain][keysub]=datadict[keymain][keysub]/(sum(values[int(keysub)-1])+4)
  44.  
  45.  
  46.  
  47. def readfasta():
  48.     file1= open("chr011.py",'r')
  49.     file_content=file1.readlines()
  50.     first=1
  51.     list1=""    
  52.     for line in file_content:
  53.         if line[0]==">":
  54.             if first==0:
  55.                 print "***********"
  56.                 list1+=sequence
  57.                 print "***********"
  58.             else:
  59.                 first=0
  60.                 sequence=""
  61.                 seq=""
  62.                 for i in range(0,len(line)-1):
  63.                     seq+=line[i]
  64.         else:
  65.                 for i in range(0,len(line)-1):
  66.             sequence+=line[i]  
  67.     list1+=sequence
  68.     return list1
  69.  
  70.  
  71.  
  72. p=readfasta()
  73.  
  74.  
  75.  
  76.  
  77.  
  78. res=1
  79. part=""
  80. q=len(p)
  81. seqq=""
  82.  
  83. value={"A":0.3,"T":0.3,"C":0.2,"G":0.2}
  84. for i in range(q-16):
  85.     part=p[i:i+16]
  86.     seqq=part
  87.     res=1
  88.     score=1
  89.     for j in range(16):
  90.         key=seqq[j]
  91.         res=res*datadict1[key]["%02d"%(j+1)]
  92.         #print res
  93.     for key in seqq:
  94.         score=score * value[key]
  95.     #print score,"*******************",res
  96.     log_ratio=log10(res/score)
  97.     print i,log_ratio
  98.  
what changes should i make and how?/
waiting for your reply,
cheers!
Jul 13 '07 #1
103 5814
bartonc
6,596 Recognized Expert Expert
Start with a list of input files (hopefully, generated automatically when there are many). Like:
Expand|Select|Wrap|Line Numbers
  1. matrixFileList = ['matfile1', 'matfile2']
  2. sequenceFileList = ['seqFile1', 'seqFile2']
  3.  
  4. # use zip() to pair them
  5. filesList = zip(matrixFileList, sequenceFileList)
  6.  
  7. # define your function to take file names
  8. def mainFunc(matFileName, seqFileName):
  9.     print matFileName, seqFileName
  10.  
  11.  
  12. # call the function for ever file pair in the list
  13. for pair in filesList:
  14.     mainFunc(*pair)   # the * breaks the tuple into its parts.
  15.  
Jul 13 '07 #2
aboxylica
111 New Member
my sequence file:>CG9571_O-E|Drosophila melanogaster|CG 9571|FBgn003108 6|X:19926374..1 9927133
CCAGTCCACCGGCCG CCGATCTATTTATAC GAGAGGAAGAGGCTG AACTCGAGGATTACC CGTGTATCCTGGGAC GCG
GATTAGCGATCCATT CCCCTTTTAATCGCC GCGCAAACAGATTCA TGAAAGCCTTCGGAT TCATTCATTGATCCA CAT
CTACGGGAACGGGAG TCGCAAACGTTTTCG GATTAGCGCTGGACT AGCGGTTTCTAAATT GGATTATTTCTACCT GAC
CCTGGAGCCATCGTC CTCGTCCTCCGTCCC TTAGCGCCTCCTGCA TGGATGTCGTTTTTG GGTTTCATACCTTTT CAC
ACTGGAAAAATACGG AATTTGTTGTAAGCC CTTTCAAGACGAATG GGATTTAGCTTCGGA TGTCAACGTCACCAT AAT
CATATTAGGAATATT TCTACTCAATTGCAA TATTGGTACTTTTCT GACTGTAAACGCGAT GATAATTACAAATAT GCC
TAATTTGCTGTCTTT ATAATCAAATGGAGT TCTTTATATTTCCAA AATATTGAAATTCCG ATTCCCTAGAAAATA ATA
CGTTTTTCTGTTATT AATAAAAAACCAATA GGAAAGTTCTCAAAA ATTACTCTGTTGTAT TTGATCATTTCTTTT CCG
GTATAATCTTTTATT TTAAGCATTCCCATG TGAATAAATTTCAGA CTAATGTATTAATAA GATGTCGTGTTTTTC CAC
TTACAAATTTCTCAT ACAGCTGGATATATA CTACGAGTACTATAC ACATGCTCTGGG
>Cp36_DRR|Droso phila melanogaster|Cp 36|FBgn0000359| X:8323349..8324 136
AGTCGACCAGCACGA GATCTCACCTACCTT CTTTATAAGCGGGGT CTCTAGAAGCTAAAT CCATGTCCACGTCAA ACC
AAAGACTTGCGGTCT CCAGACCATTGAGTT CTATAAATGGGACTG AGCCACACCATACAC CACACACCACACATA CAC
ACACGCCAACACATT ACACACAACACGAAC TACACAAACACTGAG ATTAAGGAAATTATT AAAAAAAATAATAAA ATT
AATACAAAAAAAATA TATATATATACAAAA ATTTGTTGTGTTTGA ATTGAATTAAGAGCT TATCAAGAAAAAAAT TTC
AGTGACTCATAATAC ACTACTCTACAAGTT TAAATTGAATCAACA ATTTAACTTTCATTG CTCAGGTTTTTAGTA ACA
ATGTTTATATAAGTT TAGGTATAACAAATG ATTTAAATATAAGAT ACTGTATTTCACATT GAGACGAAACAATCC ACC
GAAAATCATAAAATA TAAGAATGTTGCATT TTATTTTTAAAAATA AAGATGCCTTTTAAG AGGAATAACTTAAAT GTC
TTTAATACCTTTGAA TTTAATTATATGGCT AATAAACACAAACTT AAAGCTTAAAACTGC ATCGAATTGAATGCG GTT
ATAAATGTACTTATA TATCTAATATAATCT GCTAATATGGTTTAC ATGGTATATCTTTCT CGGAAATTTTTACAA AAA
TTATCTATTCATATA TCTCGAGCGTAAGAT ATTTATCAGTTTATA GATAACATCTTTAAA TTTGGGTGATTAAAA AAA
AACATTG
>Cp36_PRR|Droso phila melanogaster|Cp 36|FBgn0000359| X:8324430..8324 513
TCTAGAGATCTGGGC ACGATGGCGAGACAA AGATGCGGCGCAAAA TCGGAAATGGAGATG GATCACGTAGCCGGC CAT
GGCGG
>Him_distal|Dro sophila melanogaster|Hi m|FBgn0030900|X :18039896..1804 3470
GGTTTTCTGCGATGG CTTCCGCGCCAGCTG AAGTATCTGATTTGC TGCCTTGTTTTTGTT GATATTTCTGCGAAG GGA
CTTGTGCTTTTCAAA TGGCCTTTTTTTGGG ATTACGGCAAGGGCG CGTTTCCCACGCTCG ATCCCCACTTACCAT TGG
TGCACGCGATTGCGG CAAGCTGCTGAGGCA AGCTATTAAACGCCA CACTGGGCCGGGGGG CGGTACCGGTGGGCG TGG
CAGGGGAGTCGACAC ATGTTGTGTGCCAGA GAACTTTGCTCCGAT CCCCAGATCATCAAA TAGTTGTCGCTGTCT GCT
CGTGCGCAAATTGCA ATACTTTGCATACCC TTACTGCAGGGTATC TGAGCTTGGACTTTA AATAAGGGGGTATAA CAT
AGCTTATACTCTCTA TCTCTGTTATAAAGT CAATTTTCCTTAGAT CTTTAGTACAGTGGG TAGTTAAGGAGACAT AAC
TTCCAAAAAAAAAAA CTATAAAATTGCAAT AATTTATGCAAAATA TGTATTTTATTGAAT GGGATGAATAATTTA CCT
TATACGACTGTAAAA CATTTCTAACGATTA AATGCACTTCTAAAA GTTTTCCCACAAGTA GGTGAGCTATTATGC TAA
GCGTTCCATGACTTG GAATCTAAGATCTTG TTTTGATCTTCGCTG ATCTTTGAGAACTCG GGGATTACTTACACA TTT
CTGGGCAGGCACAAG TGGGCCGAGGCAGTG TAGATTCATCACGTT TTCACTCAACACACG CAGCTCATTAACAGC CCC
GCTGACAACTTGTCA GGACTTCCCCCTCGT GAATCCCCCTGCTAC GCAACCCCCATTCCC CGCCCATTCCAACAC TTC
CCGCCGGGAGCGTGG GAAATTATGCGTGTT GGTGGGACGTCGGGC GGTGAAAATTGGCGC GCTCTTCGGGGGGCC ACA
CCGCGTGGCATTGAC AACTCTTCCACATTT CGCGCCCAACGATGC GTTGGCATCAGTGGG TCACAGGGATTACGG CTG
GCTGGGATTCCAGAG CCAGATCTTTTTCAG CCAAAACTTTCAGCT TTCGAAGACCTCAAG CGATAGGAGAGTGTC GGA
AGTCCAGAAATAGAC GCGTAGCACATAAAT TATGGATCGTATCGA GTATCGATTAGCCCG GGACAAGCGAAGCGA TAG
GGAGACATATTTTTA TTACCCTCTCGGGGA CCTGCACTTGTTGGC TTCGCTTCTATGAAA GATCCCTCTACCATA TCA
CGTATGTGGGCTCCC CCAATCGAACCGAGT TGTGGGAAATGTTTT CCCAGGCCAACAGCT AATTGTCACTCCAAG GGT
TGTCCCCGCAGCCCA GACGACAGATAAGCG GGCAAGTGAAGCCCA GCGATCTGAGTCAAG TGAAGGGCTTCAATT TCT
TTCCCGAGTGGAACT GGGATATCGAAATTA CATTTGTAACAGACG TTTTAGTCCGCAATC CTCAGCTAATGGGAC TTA
CGAACATATATTCAT CTGAAATTCAAGAAC ATGCGCACTTAAAGA GCAGGGAAGTCGCAC ACGCGCAAGTCAGGC GCT
CAAAAAGGGATCTTC GGAGGTACAGTGGGC AAAAGACTGTAAATA AATAATATAAATAAA ATAATATTTAGCTCT ATG
TGTTTATATAATCTA CAAAGTAGTTAACAA AAAATATAAAATGGA TATAAAAATACATCT TATATATCCCTATAA TAA
GAAATAAATAATAAT TTTAGTAAATTAATT TTGTTACACAAAGTA CCTGTATTATTACCT CTTTTTTGTTGGTTG GTT
CTTTTTTGATGTGGC CCCACTGTGCTCTCT TATCAGTGCGACAAT CAGGCATTGCCTTTC CCCATCGGGGGATTC TAA
TTCCGTGGACGATGG GCCGAAACGCCTATA AAGTCGCTCATTAAA AATGTTTAATTATGG CCCATCTTGCATCTT GCA
CCGATGTGGATGGGG TTTGTCGGCAATGAT TTACATTATAAAAAT GCCCGTTATCTGAGC ATTTTGTACGCTCCA CTC
CCTCTTCCCCCCTCC AAAAAAAAAAAAAAC AGATATGTATATTCC CCGAGATATTCCCAA GCGGCCAAAAATAGA CGC
AAATTGTAACGCACT TGAAGTGCACTCTGA AACATCTTGAAGTCC AAATAAAATAGCAGA GAGACCCACAATAAT ATA
CGTTGATATACACAT GTATATATGTATGTA TGTACATAAAGGGCC AGGAGCAGGAACGTT AGGCATGCGGTGGTA CGA
GCACCGTGGTGCGAG CGAGAGCGCTGTGCT GCCTGAGGGAGAGGT AGCGAGTGGGTTGCA TTGCGCACACAGAAC ATG
TGAATGCAGAGTTCA AGTGCATGCCGTGAC ACAGACACGCACACA CACACACGCACACAC AGATGAGTAGCCGCT GCA
AAGTGTTTTTTCCCA GGCGCTATTTATAAT ATGCATCCCGTCGCC GATCCGATCCGATCC AATCCAATCCGATTG GAT
CCCATCTTGCGGCAC TACGATTATGACGCT CGACACGATGATGCA TTCGCAGAGTTTCCC GATCGCAGAGTACCC TGT
ACTCGAGTAGTTTTT AGATGCAGTATTATT AAGTAGAAAATTGTA ACCGTATAATATTCC ATTATATTAAATATT TTT
ATAGCACTAAAGAAA TAAAAGCCCATTTTA TAATTTATATTACAA AAATACTTAACCATA GAAACTTATGATATG ATA
CCAATATTTAAGTTC CAAAAAATGTAGAAC ATTTTTAAGTATATA CTCGAAAATATTAAT TTTCAAAATTGATAT TCA
AGAGATATTATAAAA AGATCCCCATTCTAA ATATCTAACATCATG CCATGCTTTCTAATG AGTATAGTATACCCC TGC
TACCCTGTCAATCCG CAAAACAGGCGCCGA AACATGCGGTTTCTC GCAGCAGACTGCCAC GGGAAAAATTCGGTT CGA
GATTTGGGAATGGAT GTATGACGGAGCAGA AGGAGCAGGACCCGG ATTTCGGATTTCGGA ATGGATATGGAAATG AAG
ATGGAAATGGGACTT TGACTGCGCGACGGC CACATGCGCCGCTGG CGATGCCGCTGGATG TTGCATGTGGCAGCG GTC
GGTGCAGCAGCGAAA GTGTTGCAGCTGTAT GAGAGGGTCTATTTT TGGGGCGATTGTGCG GCGCTGGTGCTGCCA CAT
GTGTTCTGTGTTGGG CTGCTAAAAGGCATT GTAATGAGAGCAGAA AATAGAATTGACTCC ACTTGAGCAATGTCC CAT
AAAGCGGGAGTTTCG AGTTTGGCGCGCAAT GTGCCGCACCAGCAA ACGAACAAAAGAAAA AAAAAAAAAAAAAAC ACA
GCCAGTAACACATGG GCCCACGAGTTATGT TTTATTTTTAATCCC ACAAAGAGTCGATCT CCAAAACAAACCCGC AGA
GAGCACATATAAAGA GACTCGGTGGACGAG TGGTTCGAAACAGTC TTCCGCCGCAGCTCG ACGCGCTCGCATATC GGG
AATATATAGATCGGA GATATCGCAGGACCC ACAGCAGAGCAGAGC CGCAGAGCCACCAAC CTCG
>Him_proximal|D rosophila melanogaster|Hi m|FBgn0030900|X :18041232..1804 3470
GCCCAGACGACAGAT AAGCGGGCAAGTGAA GCCCAGCGATCTGAG TCAAGTGAAGGGCTT CAATTTCTTTCCCGA GTG
GAACTGGGATATCGA AATTACATTTGTAAC AGACGTTTTAGTCCG CAATCCTCAGCTAAT GGGACTTACGAACAT ATA
TTCATCTGAAATTCA AGAACATGCGCACTT AAAGAGCAGGGAAGT CGCACACGCGCAAGT CAGGCGCTCAAAAAG GGA
TCTTCGGAGGTACAG TGGGCAAAAGACTGT AAATAAATAATATAA ATAAAATAATATTTA GCTCTATGTGTTTAT ATA
ATCTACAAAGTAGTT AACAAAAAATATAAA ATGGATATAAAAATA CATCTTATATATCCC TATAATAAGAAATAA ATA
ATAATTTTAGTAAAT TAATTTTGTTACACA AAGTACCTGTATTAT TACCTCTTTTTTGTT GGTTGGTTCTTTTTT GAT
GTGGCCCCACTGTGC TCTCTTATCAGTGCG ACAATCAGGCATTGC CTTTCCCCATCGGGG GATTCTAATTCCGTG GAC
GATGGGCCGAAACGC CTATAAAGTCGCTCA TTAAAAATGTTTAAT TATGGCCCATCTTGC ATCTTGCACCGATGT GGA
TGGGGTTTGTCGGCA ATGATTTACATTATA AAAATGCCCGTTATC TGAGCATTTTGTACG CTCCACTCCCTCTTC CCC
CCTCCAAAAAAAAAA AAAACAGATATGTAT ATTCCCCGAGATATT CCCAAGCGGCCAAAA ATAGACGCAAATTGT AAC
GCACTTGAAGTGCAC TCTGAAACATCTTGA AGTCCAAATAAAATA GCAGAGAGACCCACA ATAATATACGTTGAT ATA
CACATGTATATATGT ATGTATGTACATAAA GGGCCAGGAGCAGGA ACGTTAGGCATGCGG TGGTACGAGCACCGT GGT
GCGAGCGAGAGCGCT GTGCTGCCTGAGGGA GAGGTAGCGAGTGGG TTGCATTGCGCACAC AGAACATGTGAATGC AGA
GTTCAAGTGCATGCC GTGACACAGACACGC ACACACACACACGCA CACACAGATGAGTAG CCGCTGCAAAGTGTT TTT
TCCCAGGCGCTATTT ATAATATGCATCCCG TCGCCGATCCGATCC GATCCAATCCAATCC GATTGGATCCCATCT TGC
GGCACTACGATTATG ACGCTCGACACGATG ATGCATTCGCAGAGT TTCCCGATCGCAGAG TACCCTGTACTCGAG TAG
TTTTTAGATGCAGTA TTATTAAGTAGAAAA TTGTAACCGTATAAT ATTCCATTATATTAA ATATTTTTATAGCAC TAA
AGAAATAAAAGCCCA TTTTATAATTTATAT TACAAAAATACTTAA CCATAGAAACTTATG ATATGATACCAATAT TTA
AGTTCCAAAAAATGT AGAACATTTTTAAGT ATATACTCGAAAATA TTAATTTTCAAAATT GATATTCAAGAGATA TTA
TAAAAAGATCCCCAT TCTAAATATCTAACA TCATGCCATGCTTTC TAATGAGTATAGTAT ACCCCTGCTACCCTG TCA
ATCCGCAAAACAGGC GCCGAAACATGCGGT TTCTCGCAGCAGACT GCCACGGGAAAAATT CGGTTCGAGATTTGG GAA
TGGATGTATGACGGA GCAGAAGGAGCAGGA CCCGGATTTCGGATT TCGGAATGGATATGG AAATGAAGATGGAAA TGG
GACTTTGACTGCGCG ACGGCCACATGCGCC GCTGGCGATGCCGCT GGATGTTGCATGTGG CAGCGGTCGGTGCAG CAG
CGAAAGTGTTGCAGC TGTATGAGAGGGTCT ATTTTTGGGGCGATT GTGCGGCGCTGGTGC TGCCACATGTGTTCT GTG
TTGGGCTGCTAAAAG GCATTGTAATGAGAG CAGAAAATAGAATTG ACTCCACTTGAGCAA TGTCCCATAAAGCGG GAG
TTTCGAGTTTGGCGC GCAATGTGCCGCACC AGCAAACGAACAAAA GAAAAAAAAAAAAAA AAAACACAGCCAGTA ACA
CATGGGCCCACGAGT TATGTTTTATTTTTA ATCCCACAAAGAGTC GATCTCCAAAACAAA CCCGCAGAGAGCACA TAT
AAAGAGACTCGGTGG ACGAGTGGTTCGAAA CAGTCTTCCGCCGCA GCTCGACGCGCTCGC ATATCGGGAATATAT AGA
TCGGAGATATCGCAG GACCCACAGCAGAGC AGAGCCGCAGAGCCA CCAACCTCG
>Obp18a_prom|Dr osophila melanogaster|Ob p18a|FBgn003098 5|X:18969778..1 8972746
ATGGCGAAAATCTGT TTCCCAACTAACAAT GAGCGCATCATCACA GCTCTATATATATAA CCCATCGATTTGCTA ATT
CAGCTCAAAAGTAGA CAGGAGATTTTAATT AAATAATTGGATGCT ACTTTACATTCGCCA CACACCAACAAATAA AGT
CTATAATTGAAATTT TAAGCGCAGTTCCCG ATTATGAGCTACACG TATGTCGTATGCGCA ATATCTGCATTACAA TTG
CCAATAGTAAATTAC CAACTTGGTTTTCTT CATATTTATTAAGAT AGAAAACATACAATT TTTGGCTTTTACACT CCA
AGCATCTCTGAAGTT TAAACAAAAAACATA TGTGTAGCCTATCTA CTGTATTGGACTTTA TTCGTATATTTTATA TGG
TTCATTAATATAGGT ATAAATACAAATTAT ATTCACGCTTTGCGA TTTGCAGCGAATATC ACATCTTATACACGA TGT
AAAAAAAAAAAAAAT ATTTCGTCATGTTTT TAGGTTGGCCGCAGG CAGTGCTCACTGTAC CGCCACAATGTTTAT CGT
TTTGCATTTTTTTTT TCTTTGTTTTCTTGC GGTTTCCCCTAATTA TCTTTAGTATAAACT TAGTCTACTGTCTTT TTT
GGTAAGTATTTTCGT GATGGGCTCGTCTAT GCGAATTCCCATTTC CAATGAATAAATAAA GTAATTAGAACATTA AAA
TTAGCAATAAAACAC GTACATTTAAAGCTG ACAACAAAAAAAAAA AGTATTCTTATGTTA AACTGTAGTATGTGC CTA
TGCAATATTAAGAAC AATTAAATAAAATAG CATATTAACTTATGG CAGCACTTTGTTGCT ATGTTTATGTTTATG TTT
ATGCACGCAGTTAGG CCAGGGCGGATGTAA CATGATCACCCACTC GAAGGCAAAAAGTAT AAGTGCATGGTCAGC ATT
CACACGCCGACCAAA TACATATTACATACG TACATACATATCTCG CTCTCCCGATAAGCC TAGATATATAAGATA TAC
ATAAGAACGCCGCTC CGCTGCTGGCGTACC CGGCAGCGCAGCTAC GCGGATTAGCCTAAG TCCAAATATATTAAA AAC
TGTAAAATCAGAGAG ACTCTGTAGACGTTG AGCTGACAGAACCAT TTCTGCCTACTCTAA AATCAAAAGAAGAAA TTG
AATAAATATATGTCA GCCCGACGGCTGCCT TCAACTTAAAACGGA CTTGTGTTCTGAATT GGAGTTCATCATTAC ATG
GCGACCGTGACAGTC GTCCAACGCTGGACG AATTGACCAAAGCTG GTGAAAACAAAGGAA CAAAGGAACACTGGA CTG
GAAGAAGACTGGACT AATTAAATGGAACTG CAAAAACCAAGGAAA AATCTGAGTGAGTAG AGTTCTATTGAGTAT GGG
CAAACACCGTGGCGG TTTGAAAACTAAGCT GAATAAACGTATAGC CCACGTAAGGTGGCT AATATACGGTCAGCA AAC
GCCACCGGTTTGGTC GAAAGCTCTAAAGCT ACATGCAGAGCTAGA CCACTTGTTGCAATA TCAGCAAGAATTAAA GAC
CCATAAGCTCGAGAA AACTCACTCAGATAA TATTAAAAATATACC CACAATTAATGAAGT TCCAAAATACCAGGC ATG
TCCAGCACCAGCACC AGCATTAACAAAACC AAAGAAGTCCTGCCC CCCTGGCTGCGAAGG AATCTGGAGTCCCCA CTG
CCTGGGGACTTGTGA GCGACCATCGACGTC TTCAGCGGCGAAGAA ATAGACAGCAGCGAG GGAGTGTCAGCGTGC CAC
CCCCGGCGACGCCCA GCTGACACCTGATGA GCATCATCAACAGCA GAATATAATAATAAA TATATATAAATATAA AGT
AAATATAAAATATAT ATAGATAAGAAAAAT TGTAAGAAATATTGT AAAACGGAGCATATA CTATTATGCCCTGTT AAC
CCAATATGGCCCGTG AAGCCATAGCTAGAA TCAGGCAGGCAACAA TGTAAAATACAATTT TTTTTTACTCTTGCG AAC
ATTGAAAGATTTTAT AAATAGATAATTCCA AACATAAATGTCTAT AGAGACAAATGAAAT AAGTAAAACTGAAAA TAA
AAGTATATACAAAGG AAATTTTCTATTCTA TTCTCCAAAATATAA AATTAGTATACCCAA AATGGGTCTAATAGA CAC
TAAAACTGTGGACTC TACAGCCAATGTAAT AAATAAAGTAGAAGT CCAAAATGCAGACTT GTTCTGGATAACCAT AAT
ACTAATTGTAATTGC ATTAATTATGGTATC CAATGCATTAATAAA AATATACAAACTGCA TAACAAGTGTCTTAA GAA
ACGATACCGTAGCAC TGCTAACGGTATAGA TAATATTTAAGGAAG ATCTTTAATAAAGTC AATTATGAATGAAAA TAT
GAGAAAAATTATATG AAAAAAAAAAAATAA TAAATAAAAAAAAAA ATATAAAACGTAATA TTGAATTTATCTACG TTA
AAAAAAAAAATATAT ACAAATGAATAAATT TGAAGTTATGAGTAT ACCACAGCATGGACT GGGAAAAGCTTGTTG ATC
AGATAAAAGATCAAA ATGAAAATTTCAGAA AATCCTATAAGTGCT TAACGCAAAACAGAT CAACACAAGCTGTAA CAA
TCAATAGGAATGCCC AAGTCTTGGTAAATA GTTATAATGAAATCA GAGAGTTGATCCAAC AAAATAGAAAGAATT TGG
AACGCAAACAGTGTG CTAAGGCTTTGAACC TACTGGTGACATTAA GAGAAAAATTAATAT TTATAAAAAATAAAT TCA
GTCTCCAGATAGAAA TTCCAACCATAGTAA ACACCCCACTAAGAA TAAATTTGAATGAAG ACAGCACTAACTCTG ACG
AGGAAGATAGGACTA TAGTCAAGGAAGACA TTAAAGAGGAAGATC TTCACGATCTAACTA TACCAGCAAAATTAA TGC
TGAA
>Obp19a_prom|Dr osophila melanogaster|Ob p19a|FBgn003110 9|X:20223943..2 0226446
CCACCTGCGAAATGG GTCATAGTATATGTA TTTGTAAAAAATGTA TGTAAAAAAATGTTA AATTAATAATTTTGA ATT
TCAATTTGGAGCTGA AAATAATATTTTGTG TCCATCAACAGCTCC AAAGCGATGGTTCAT TTTATCTTGTGTGCG TTC
AATAGAATCACTCTT ACGTTAGCGCGTCCA TTGATGGTTGTCCCA TTGAAGTACTTCTTA AAGCCGTCGGCCATT GCT
ACTGGACTGGATCTG GAGATCTGGAGATCT GGATTTGGGGTCGGG TCCGGGTGAGAGCTG AGTGTGTTCTGCCTA TAG
CTCCGAGCGAGAACC TAATGACAAGCAGCG AAGTGCAAAGCTCGG CCAACTAGATTACAA AGTCGATTCATTGGC AGG
ATTCGATTTTTATTG ACTCAACGAGGTGGT ACATGAGTTTGGTCC CCAAGCCTTTAACTG TGGCATCGAGGACCG GAA
AGGGGGTGCTGATTA TAAATAGTTATGGAT TGCTGACGGGTCGAA TGGGTCGGAGCGGTG GGGAGCCATGACTTC AAT
GATTTGGCAGCATCG GCGCCCTAGCCATGG AGCATGGCCTGCTGG CAGCCCTTGCAGTAG AGCTTGGTCTCGCGC CGC
TTCGTGTTGCGGCGG TGCATCTTGACCAGG ACGTAGACGAGTCCC AACGAGGCCCAGGTG GCCTTGGCTACCTGT GGG
TTTCGGTGGCGTATT TGGGCGCATCTTGTG TACTGCCGTGTACTG AATCACTTACATTGG CGCGACCACGCATGG TCT
GGCTGTTGAAGGCTT CGTTGAAGTTGAAAT GATCGGACATCTTTG GATCGTTGTTGACCG GATTGGCGTGGCTTT TAA
CAAAAGATTAAAATT TGGATTCGATATTCG ACCTGTATTTTAGAC CGGGATTCGGATTGT GACTTTTAAACGTTC GAA
ATGAAAGGAATGTTA CTGACAGTCGTCAAA GCCGACTCGGGTTTC CCAACTAGAGAGAAT GCTGAAGTCTAGTAC CGA
CTAATGGGATACCCA TTAATTACTGCTTAA ATACTGTGATGAAAA TTGAGATATGCAAGA GGCAAATCGAAAGTT TTG
GACATTTTCATATTG TACCTTTAACCAACT TCAGAATTCATTGAG CTAAATACCATTTAC AATTTTATGAAATTT TTA
AGCATGTTACAGCTA TAACTATTTTTAAAC CAGTTACTAGATTCG TTGAAAATTGTATGT CACACAGAACTTCTT GCC
ATCCTGGTCGGAATT AGGATCACTAGCCAA GCCGATATGGCTATG TCTGTCCGTATGAAA GTCTTGGAATCTGAT ATT
AACATCGCATATCGA TCGACCATTATATAT CTAATATATCCTCTA CAAATGTATTTTATC ACCTAGCTAGCATGT AAA
CATTCTGGCCTATTT AGCTGTACGCTTCAG TTATGCTAATGCAAA CATAAGCCTTTTGTG ATATTATAATTTACA TTT
ATTATTTATTGCAGT TAGCTTTATCAGCGA TTTGGGCTCATGCCA CACGCAATACTACTT ATTTCAACGTCATCA GTT
GTACTAAATGCACAA ATGAAATACATTTCG CCAAATAAATGCCAA CTTGCAACTAATTTG AATGCTAATCAAACC GAA
CTACTCATTTGCATA CAAGGTAATAGGTGG TTAAAGTGAGTGTAA TGGACTTACTTAAGG GGTTACAAGGCTTAT ATT
TAAAATGCCTGCCTT GTAATTAAATTTTTA AATATATTGGAAAAA AATGGCCACTTGTTA TGTGAGTCTCCAGAA AAA
AAACAAAAAAACAGC AACCATCTGGTATGC AAAATATCTGGTGGT AGCAAAATATCTGGT GGTATCTGGTGGACT ATC
AAAATATAAAAACTT TTTTTTCCAGATAGT ATATCTTAAAATCAG CATCTTGAAGGAGTA TATGTAAATAGCAAA CTA
TTTGTAAAAATAGAT TTTATTTTATAATTT TTTAAGATATATACC AAACATTATTACCGA TTGTGATTATCTTTA CAT
TGTTTGACCTCAAAA CGGAAAACTGGATGC GCGGTATCCATGCGA CCCTAACTCTGGAAC CGATTTTGGAACCGC CCC
GTTAGATCTCAGATT GAAACCTTATTTGCA TTCGCATGATCGCTG ATGAACACTGGGGAA ATGCGGCCCAGCAAT GGG
ATTGTCAACGCATCT CGGCCAGAATCGCGC CTCGCATGCCACCTC GCACGGTGACCACAT ACCTGTGTACACTGT CAA
TTAACGTGGCAAGAT TATAGCCCGGCCAGA AAGTAATCCGCCCCA GGAACACCACCCACC GCCCGCCCATTTGGA TAT
GGAAATGGGCAGTGG GGGCGGCGATTGGCG CTAACCCATAATTCC CACACCCACTTAGCG GTTCGATCGAACCAA TAT
GAAGTCATTTGCATG TCGGGGGCCGTGTAT AAAAGGAGTCGCCGA TGGGTCTGGAGTCTG GAATCCGCCAAATCG TCT
CGGAAAT
>Obp19b_prom|Dr osophila melanogaster|Ob p19b|FBgn003111 0|X:20224439..2 0227440
ATTGCTGACGGGTCG AATGGGTCGGAGCGG TGGGGAGCCATGACT TCAATGATTTGGCAG CATCGGCGCCCTAGC CAT
GGAGCATGGCCTGCT GGCAGCCCTTGCAGT AGAGCTTGGTCTCGC GCCGCTTCGTGTTGC GGCGGTGCATCTTGA CCA
GGACGTAGACGAGTC CCAACGAGGCCCAGG TGGCCTTGGCTACCT GTGGGTTTCGGTGGC GTATTTGGGCGCATC TTG
TGTACTGCCGTGTAC TGAATCACTTACATT GGCGCGACCACGCAT GGTCTGGCTGTTGAA GGCTTCGTTGAAGTT GAA
ATGATCGGACATCTT TGGATCGTTGTTGAC CGGATTGGCGTGGCT TTTAACAAAAGATTA AAATTTGGATTCGAT ATT
CGACCTGTATTTTAG ACCGGGATTCGGATT GTGACTTTTAAACGT TCGAAATGAAAGGAA TGTTACTGACAGTCG TCA
AAGCCGACTCGGGTT TCCCAACTAGAGAGA ATGCTGAAGTCTAGT ACCGACTAATGGGAT ACCCATTAATTACTG CTT
AAATACTGTGATGAA AATTGAGATATGCAA GAGGCAAATCGAAAG TTTTGGACATTTTCA TATTGTACCTTTAAC CAA
CTTCAGAATTCATTG AGCTAAATACCATTT ACAATTTTATGAAAT TTTTAAGCATGTTAC AGCTATAACTATTTT TAA
ACCAGTTACTAGATT CGTTGAAAATTGTAT GTCACACAGAACTTC TTGCCATCCTGGTCG GAATTAGGATCACTA GCC
AAGCCGATATGGCTA TGTCTGTCCGTATGA AAGTCTTGGAATCTG ATATTAACATCGCAT ATCGATCGACCATTA TAT
ATCTAATATATCCTC TACAAATGTATTTTA TCACCTAGCTAGCAT GTAAACATTCTGGCC TATTTAGCTGTACGC TTC
AGTTATGCTAATGCA AACATAAGCCTTTTG TGATATTATAATTTA CATTTATTATTTATT GCAGTTAGCTTTATC AGC
GATTTGGGCTCATGC CACACGCAATACTAC TTATTTCAACGTCAT CAGTTGTACTAAATG CACAAATGAAATACA TTT
CGCCAAATAAATGCC AACTTGCAACTAATT TGAATGCTAATCAAA CCGAACTACTCATTT GCATACAAGGTAATA GGT
GGTTAAAGTGAGTGT AATGGACTTACTTAA GGGGTTACAAGGCTT ATATTTAAAATGCCT GCCTTGTAATTAAAT TTT
TAAATATATTGGAAA AAAATGGCCACTTGT TATGTGAGTCTCCAG AAAAAAAACAAAAAA ACAGCAACCATCTGG TAT
GCAAAATATCTGGTG GTAGCAAAATATCTG GTGGTATCTGGTGGA CTATCAAAATATAAA AACTTTTTTTTCCAG ATA
GTATATCTTAAAATC AGCATCTTGAAGGAG TATATGTAAATAGCA AACTATTTGTAAAAA TAGATTTTATTTTAT AAT
TTTTTAAGATATATA CCAAACATTATTACC GATTGTGATTATCTT TACATTGTTTGACCT CAAAACGGAAAACTG GAT
GCGCGGTATCCATGC GACCCTAACTCTGGA ACCGATTTTGGAACC GCCCCGTTAGATCTC AGATTGAAACCTTAT TTG
CATTCGCATGATCGC TGATGAACACTGGGG AAATGCGGCCCAGCA ATGGGATTGTCAACG CATCTCGGCCAGAAT CGC
GCCTCGCATGCCACC TCGCACGGTGACCAC ATACCTGTGTACACT GTCAATTAACGTGGC AAGATTATAGCCCGG CCA
"how can i make a list of the individual sequences.here the new sequences start with">" symbol.so i want to put them in individual lists.and i cant specify the number of sequences in the entire file.. how can i do?"
Jul 13 '07 #3
bvdet
2,851 Recognized Expert Moderator Specialist
my sequence file:>CG9571_O-E|Drosophila melanogaster|CG 9571|FBgn003108 6|X:19926374..1 9927133
CCAGTCCACCGGCCG CCGATCTATTTATAC GAGAGGAAGAGGCTG AACTCGAGGATTACC CGTGTATCCTGGGAC GCG
GATTAGCGATCCATT CCCCTTTTAATCGCC GCGCAAACAGATTCA TGAAAGCCTTCGGAT TCATTCATTGATCCA CAT
............... ..........
GCGCGGTATCCATGC GACCCTAACTCTGGA ACCGATTTTGGAACC GCCCCGTTAGATCTC AGATTGAAACCTTAT TTG
CATTCGCATGATCGC TGATGAACACTGGGG AAATGCGGCCCAGCA ATGGGATTGTCAACG CATCTCGGCCAGAAT CGC
GCCTCGCATGCCACC TCGCACGGTGACCAC ATACCTGTGTACACT GTCAATTAACGTGGC AAGATTATAGCCCGG CCA
"how can i make a list of the individual sequences.here the new sequences start with">" symbol.so i want to put them in individual lists.and i cant specify the number of sequences in the entire file.. how can i do?"
Python is great for this kind of stuff:
Expand|Select|Wrap|Line Numbers
  1. def parseData(fn, dataset=1, key='>'):
  2.     # initialize output list
  3.     dataList = []
  4.  
  5.     # open file for reading
  6.     f = open(fn)
  7.  
  8.     # skip to required data set
  9.     for _ in range(dataset):
  10.         try:
  11.             s = f.next()
  12.             while not s.startswith(key):
  13.                 s = f.next()
  14.         except StopIteration, e:
  15.             print 'We have reached the end of the file!'
  16.             f.close()
  17.             return False
  18.  
  19.     for line in f:
  20.         if not line.startswith(key):
  21.             dataList.append(line.strip())
  22.         else:
  23.             break
  24.  
  25.     f.close()
  26.     return dataList
  27.  
  28. fn = 'your_file'
  29. data = []
  30. i = 1
  31. while True:
  32.     d = parseData(fn, i)
  33.     if d:
  34.         data.append(d)
  35.     else:
  36.         break
  37.     i += 1
  38.  
  39. for item in data:
  40.     for i in item:
  41.         print i
Jul 13 '07 #4
aboxylica
111 New Member
This is my code. it always seems to go to exception loop..i donno why??
Expand|Select|Wrap|Line Numbers
  1. from math import *
  2. import random
  3. f=open("deeps1.txt","r")
  4. line=f.next()
  5. while not line.startswith('PO'):
  6.     line=f.next()
  7.  
  8. headerlist=line.strip().split()[1:]
  9. linelist=[]
  10.  
  11.  
  12. line=f.next().strip()
  13. while not line.startswith('/'):
  14.     if line != '':
  15.         linelist.append(line.strip().split())
  16.     line=f.next().strip()
  17.  
  18. keys=[i[0] for i in linelist]
  19. values=[[float(s) for s in item] for item in [j[1:] for j in linelist]]
  20.  
  21. array={}
  22. linedict=dict(zip(keys,values))
  23. keys = linedict.keys()
  24. keys.sort()
  25. for key in keys:
  26.     array=[key,linedict[key]]
  27.  
  28. datadict={}
  29. datadict1={}
  30. for i,item in enumerate(headerlist):
  31.     datadict[item]={}
  32.     for key_ in linedict:
  33.         datadict[item][key_]=linedict[key_][i]
  34.  
  35.  
  36. for keymain in datadict:
  37.     for keysub in datadict[keymain]:
  38.         datadict[keymain][keysub]+=1.0
  39.  
  40. datadict1=datadict.copy()
  41. for keysub in datadict:
  42.     for keysub in datadict[keymain]:
  43.         datadict1[keymain][keysub]=datadict[keymain][keysub]/(sum(values[int(keysub)-1])+4)
  44.  
  45.  
  46.  
  47. def readfasta(fn,dataset=1,key=">"):
  48.     datalist=[]
  49.     fn= open(fn)
  50.     for _ in range(dataset):
  51.         try:
  52.             s=f.next()
  53.             while not s.startswith(key):
  54.                 s=f.next()
  55.         except StopIteration,e:
  56.             print "we have reached the end of file!"
  57.             f.close()
  58.             return False
  59.     for line in f:
  60.         if not line.startswith(key):
  61.             datalist.append(line.strip())
  62.         else:
  63.             break
  64.     f.close()
  65.     print datalist
  66.     return datalist
  67.  
  68. fn="redfly_sequence.fasta"
  69. data=[]
  70. i=1
  71. while True:
  72.     d=readfasta(fn,i)
  73.     print d
  74.     if d:
  75.         data.append(d)
  76.     else:
  77.         break
  78.     i=i+1
  79.  
  80. for item in data:
  81.     for i in item:
  82.         print i
  83.  
  84.  
  85.  
  86.  
  87. #p=readfasta()
  88.  
  89.  
  90.  
  91.  
  92.  
  93. res=1
  94. part=""
  95.  
  96. #q=len(d)
  97. #print q
  98. seqq=""
  99.  
  100. #value={"A":0.3,"T":0.3,"C":0.2,"G":0.2}
  101. #for i in range(q-16):
  102.  #   part=d[i:i+16]
  103.   #  seqq=part
  104.    # res=1
  105.     #score=1
  106.    # for j in range(16):
  107.     #    key=seqq[j]
  108.      #   res=res*datadict1[key]["%02d"%(j+1)]
  109.         #print res
  110.    # for key in seqq:
  111.     #    score=score * value[key]
  112.     #print score,"*******************",res
  113.     #log_ratio=log10(res/score)
  114.    # print i,log_ratio
  115.  
waiting for your reply
cheers!!
Jul 15 '07 #5
bartonc
6,596 Recognized Expert Expert
If you mean this,[code=python]# useing
Expand|Select|Wrap|Line Numbers
  1.  tags#
  2.                 s=f.next()
  3.         except StopIteration,e:
  4.             print "we have reached the end of file!"
it is supposed to do that. Simply remove the print statement.

Exceptions are often used to control program flow just like if, while, etc. That is the case here.
Jul 15 '07 #6
aboxylica
111 New Member
even if i do that..it is going to false.. i want to see if it is reading the entire file or not..
Jul 15 '07 #7
aboxylica
111 New Member
what i want to do specifically is store the sequences seperately in lists and calculate the scores for them individually how do i do it??
Jul 15 '07 #8
aboxylica
111 New Member
i executed the code you gave me it works..it takes the entire file as a single list.. i want to read the entire file but take the "individual files" as lists..calculat e the scores for thrm..how do i do this?
waiting for your reply,
cheers!
Jul 15 '07 #9
aboxylica
111 New Member
hey,
am stuck..plz help
Jul 15 '07 #10

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

Similar topics

8
4045
by: kaptain kernel | last post by:
i've got a while loop thats iterating through a text file and pumping the contents into a database. the file is quite large (over 150mb). the looping causes my CPU load to race up to 100 per cent. Even if i remove the mysql insert query and just loop through the file , it still hits 100 per cent CPU. This has the knock on effect of slowing...
5
9423
by: B-Dog | last post by:
I have an old dos program that uses dat files to store the data and I'm trying to convert to dotnet. I'd like to be able to import the data into an access database but I don't know which format the dat files are in. Here is the first few lines of the dat file. If anyone could help me figure out which type this is it would be greatly...
2
24207
by: deko | last post by:
I have a table that contains a bunch of pictures. When the user selects a particular image in a form, I need a way to extract the selected bitmap image (stored in an OLE Object table field) to the file system so the user can do stuff with "somePicture.bmp", for example. Is there an easy way to do this? Thanks in advance.
10
24049
by: bienwell | last post by:
Hi, I have a question about file included in ASP.NET. I have a file that includes all the Sub functions (e.g FileFunct.vb). One of the functions in this file is : Sub TestFunct(ByVal strInput As String) return (strInput & " test") End Sub
3
9534
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and MusicAlbum let you find MP3 and other music files based on the singer and album name; DocAuthor let you find Office documents created by a certain user;...
1
2946
by: Alex | last post by:
Hello, I have a stored procedure that processes an individual file from a directory and archives it in a subdirectory.Now, the problem is, when i execute it , it will only process one file. What i want to do is to check to see if there are any files in the folder, and if there are , process them all, and once done, go to the next part in a...
1
6455
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located...
5
2686
by: Mark | last post by:
Hi I have an application (in vb.NET 2005) which holds data in SQL Server and some of the SQL records are simply paths to related files. I would like to be able to do a text search on both the SQL data and the contents of any referenced files. The returned list being a listing which includes both records containing the text and files...
0
1953
by: anthon | last post by:
Hi all - first post! anywho; I need to create a function for speeding up and down a looping clip. imagine a rotating object, triggered by an action, and slowly decreasing in speed, till it reaches a point 0 (compare a hand spinning a fortune wheel). now, this is quite an easy this to achieve, since you just have to set an interval to...
0
7506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7782
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8018
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7541
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7872
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6123
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5423
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2006
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.