Menu

Extraction step not working

ambarrio
2014-09-09
2014-09-16
  • ambarrio

    ambarrio - 2014-09-09

    Hi!

    After running support, I am trying to run the extraction step and it is not functioning for me. I was wondering what are others experiences with this step. Or if I could get any help from Adam. I am using PBSuite_14.7.14.

    Let's say that I have the following simple graph - saved in the .gml file created after executing "support":

    graph [
      node [
        id 0
        label "ref0001860e3"
        extenders "m140530_040015_42203_c100653532550000001823125010071481_s1_p0/139728/0_13347:m140524_082726_42203_c100657162550000001823122510071413_s1_p0/50941/15946_18572"
      ]
      node [
        id 4006
        label "ref0000288e5"
        extenders "m140524_082726_42203_c100657162550000001823122510071413_s1_p0/33477/2734_5148"
      ]
      node [
        id 4048
        label "ref0001973e3"
        extenders ""
      ]
      edge [
        source 4006
        target 4048
        evidence "m140529_155547_42203_c100653522550000001823125010071497_s1_p0/39343/0_14955"
      ]
    ]
    

    After installing pyparsing-2.0.2 -which is not specified as required in the documentation- I start running "extraction". It dies with the following trace:

    2014-09-09 18:14:02,502 [INFO] Loaded 60889 Reads
    2014-09-09 18:14:03,584 [INFO] Parsed 9831 Reads
    Traceback (most recent call last):
      File "~/glob/local/PBSuite/bin/Extraction.py", line 344, in <module>
        me.run()
      File "~/local/PBSuite/bin/Extraction.py", line 317, in run
        self.__extractReads__()
      File "~/local/PBSuite/bin/Extraction.py", line 203, in __extractReads__
        self.flushQueue(outputQueue)
      File "~/local/PBSuite/bin/Extraction.py", line 236, in flushQueue
        outFile = self.openGapOut(gapName)
      File "~/local/PBSuite/bin/Extraction.py", line 252, in openGapOut
        basedir = os.path.join(self.supportFolder, gapName.replace('/','.'))
    AttributeError: 'int' object has no attribute 'replace'
    

    gapName is not really a str but an int. It dies when calling openGapOut with gapName. gapName comes from calling self.flushQueue(outputQueue). If I log within the function:

           for gapName in outputQueue:
                logging.info("GapName in flushQueue: " + 
                    str(gapName) )
    
                #pp.pprint(self.gapOutputs[gapName])
                pp.pprint(gapName)
    

    it'd log to the .err file:

    2014-09-09 18:14:03,585 [INFO] GapName in flushQueue: 0
    2014-09-09 18:14:03,585 [INFO] GapName in openGapOut: 0
    

    and 0 to the .out one with the pprint instruction.

    As outputQueue is a :

    defaultdict(<type 'list'>, {0: ['@m140530_040015_42203_c100653532550000001823125010071481_s1_p0/139728/0_13347\nAAAAGAGAGAGATTTCGGCG... and then it will come the qualities and so on...
    ]
    

    I wonder what Jelly is trying to do in the replace instruction. As I think it is trying to replace the / with . in the identifiers of the PB read (@m140530_040015_42203_c100653532550000001823125010071481_s1_p0/139728/0_13347), or?

    Then, if I use str() to qualify "0" as a string, it can continue, but it will die somewhere else afterwards:

    Traceback (most recent call last):
      File "~/local/PBSuite/bin/Extraction.py", line 344, in <module>
        me.run()
      File "~/local/PBSuite/bin/Extraction.py", line 317, in run
        self.__extractReads__()
      File "~/local/PBSuite/bin/Extraction.py", line 203, in __extractReads__
        self.flushQueue(outputQueue)
      File "~/local/PBSuite/bin/Extraction.py", line 236, in flushQueue
        outFile = self.openGapOut(gapName)
      File "~/local/PBSuite/bin/Extraction.py", line 266, in openGapOut
        sequence = self.reference[flankName[:10]]
    KeyError: '0'
    

    Hope you can help me to sort out this problem. Very much looking forward to your feedback,

    álvaro

     
  • ambarrio

    ambarrio - 2014-09-16

    Hi!

    Just for the records. I was running the wrong version. Support does not work on v14.7.14 but it works on the most recent version, 14.9.9.

    Problem solved.

    álvaro

     

Log in to post a comment.