User Profile

Collapse

Profile Sidebar

Collapse
aboxylica
aboxylica
Last Activity: Dec 28 '07, 08:12 AM
Joined: Jul 5 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • aboxylica
    replied to basic!
    yes.. i want to add program 2 to program one.. i want to know what difference will
    readlines() from an o/p file(containing this masterList) and directly refering to for item in masterList make..
    The error can be corrected if i understand this difference...
    See more | Go to post

    Leave a comment:


  • aboxylica
    replied to basic!
    you mean it will have a "\n" that will make the diffrence. so what should i do ? add a "\n" to my list? it doesnt really make sense to me!...
    See more | Go to post

    Leave a comment:


  • aboxylica
    started a topic basic!

    basic!

    i have a basic doubt.. i have a program that does a particular task..this prg(2) actually works with the o/p from another program(1). The program 1 gives the o/p in the form of a list that is written to a file.. now my program 2 works fine when i take its input as the o/p file but now i want to string in the prg2 to the prg1.
    the program one works on a list called masterList.this is written to a file and taken as i/p

    my program...
    See more | Go to post

  • i am getting an error and still many sequence headers whose values are less than 2 are printed!
    but i want the headers only for those value is more than 2
    Traceback (most recent call last):
    File "C:\Python25\th is_final_1.py", line 165, in <module>
    calcdata=compil eData(fnArray,f nSeq,arraySet,s eqSet)
    File "C:\Python25\th is_final_1.py", line 137, in compileD
    seqList1.ap...
    See more | Go to post

    Leave a comment:


  • i want to print the header only if it satifies the following condition:
    how do i do it??
    Code:
    return 'Sequence Header: %s\n%s' % (dataSeq[0], outStr)if (log10(num/denList[i]))>=2
    See more | Go to post

    Leave a comment:


  • I want to know if i should write a seperate function to compute average or can i do it in the main part??
    See more | Go to post

    Leave a comment:


  • I have done this average calculation to a part of my output_file.. but i should be doing this on resultlist directly. i dont now how to exactly do that.here is the code for calculating average for a small part of my o/p file
    Code:
    # Open the file. File is in the same directory as source code
    f=file("result.txt")
    
    # Put the Contents os the testfile in list a
    
    a=f.readlines()
    ...
    See more | Go to post

    Leave a comment:


  • okay.. i dont want to do that because this is not the final result of my task so.. i am not going to write it to a file.
    what i should be doing is that..
    i get the results which have log values of ones with four headers...like
    >skud
    >scer
    >smik
    >spar

    if my result list has something like this
    Array set # = 1

    Sequence set # = 3

    Sequence Header:...
    See more | Go to post

    Leave a comment:


  • yup.. I got the o/p file for the last sequence file.. its about 87 KB. if i want all the values for all the 5000 files in my folder.. it will take 440MB..is it possible to write such a huge file?? because i need the entire output.
    See more | Go to post

    Leave a comment:


  • i want the entire result..i.e; all the log values greater than two(I am taking these values as one..the values lesser than this.. i dont care about). i want the entire thing written in a file.. will that be possible or will their be memory error??
    See more | Go to post

    Leave a comment:


  • but when i change
    while not calcdata is None:
    to while calcdata:


    the array set is not iterating at all.. the set is one through out.why is this happening??
    and what exactly is the difference between the two lines??
    and also
    if any log value is greater than two then am taking that value as one.. only for these sequences.. i want to print the seqset,arrayset and calculated value.
    ...
    See more | Go to post

    Leave a comment:


  • I have changed the indendation of this part so that only whatever is >1 is only printed is it correct?.. dont know if it is checking for the entire file!
    Code:
    for i, num in enumerate(numList):
            if (log10(num/denList[i]))>=2:
        	    outStr = '\n'.join(['Sequence = %s Calculation = %d' % (seqList[i], res) for i, res in enumerate(resultList)])
       
    	    return 'Array set # = %d\nSequence set # = %d\nSequence
    ...
    See more | Go to post

    Leave a comment:


  • And i also think that this program should not take such a longtime to run..though my sequence folder is 18MB and array file is 69KB. though it is pretty huge the calculation is simple only.. can i compute how long it will typically take to calculate??
    I think there is some serious error
    waiting for ur reply,
    cheers!!
    See more | Go to post

    Leave a comment:


  • my code is running successffully.. my code ran for five hours.results were ok


    but when its writing to a file it said.


    We have reached the end of the file! sequence file

    We have reached the end of the file! matrix file

    Traceback (most recent call last):

    File "C:\Python25\th is_final_1.py", line 174, in <module>

    f.write('\n'.jo in(masterList))...
    See more | Go to post

    Leave a comment:


  • this is what am doing and it doesnt seem to solve the problem.
    Code:
    numList = []
    
    
    
        denList = []
        seqList = []
        for i in xrange(len(seq) - len(subKeys)):
            subseq = seq[0:len(subKeys)]
            seqList.append(subseq)
            num, den = 1, 1
            for j, s in enumerate(subseq):
                if s=="N":
                    value[s]=0
    ...
    See more | Go to post

    Leave a comment:


  • okay.. i have to say that if it encounters "N" the value of this alphabet should be taken as "0"... I am able to do this for denominator.. but for the numerator being calculated.. i want to specify that the log value of "N" is zero .. and if many "NNNNN" come together.. this part of "NNNN" can be omitted.. how do i do this??
    See more | Go to post

    Leave a comment:


  • aboxylica
    started a topic reading a file a printing a list of values

    reading a file a printing a list of values

    I have a file like this!Sequence Header: >Sbay YOR009W c606:3651..4650

    Sequence = CCTAATCTTGAAAAA A Calculation = 1
    Sequence = CTAATCTTGAAAAAA A Calculation = 1
    Sequence = TAATCTTGAAAAAAA A Calculation = 1
    Sequence = AATCTTGAAAAAAAA A Calculation = 1
    Sequence = ATCTTGAAAAAAAAA A Calculation = 1
    Sequence = TCTTGAAAAAAAAAA A Calculation = 1
    Sequence = CTTGAAAAAAAAAAA A Calculation = 1
    Sequence...
    See more | Go to post

  • i am encountering a problem when i run my code for a huge folder containing many sequence files.. this is what it says
    Traceback (most recent call last):
    File "this_final_11. py", line 163, in <module>
    calcdata=compil eData(fnArray,f nSeq,arraySet,s eqSet)
    File "this_final_11. py", line 121, in compileData
    num *= dataArray[s][subKeys[j]]
    KeyError: 'N'
    Code:
    def compileData(fnArray,
    ...
    See more | Go to post

    Leave a comment:


  • oh........ i got the problem! Thanks
    See more | Go to post

    Leave a comment:


  • and here is the code with spaces removed!
    Code:
    from math import *
    print "hellllllllo"
    def parseArray(fn, dataset=1, key='PO', term='/'):
    
        '''
    
        Read a formatted data file in matrix format and
    
        compile data into a dictionary
    
        '''
        f = open(fn)
        # skip to required data set
        for _ in range(dataset):
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...