Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • rahularjun86
    Member
    • Jan 2011
    • 58

    Bambus2 error

    Hi all,
    I am getting following error while running goBambus2 for scaffolding.
    HTML Code:
    File "/home/rsharma/Software/amos-3.1.0/bin/goBambus2", line 364
        p = subprocess.Popen(AMOSDIR+"OutputResults -b %s -prefix %s %s"%(amosbank, prefix+".scaff.linear"), shell=True, stdin=subprocess.PIPE, stdout=vtext, stderr=logfile)
                                                                                                                                                                            ^
    IndentationError: unindent does not match any outer indentation level
    Do anyone have any idea how to fix this? I would really appreciate your response.

    Regards,
    Rahul
    Rahul Sharma,
    Ph.D
    Frankfurt am Main, Germany
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    Looks like a white space indentation problem in the Python script.

    Can you copy and past the region of code at line 364 and paste it here inside a [ code ] and [ /code ] block? Say lines 350 to 370 would do?

    Or if you know exactly which version of goBambus you have, can you give a URL for the source file?

    Comment

    • rahularjun86
      Member
      • Jan 2011
      • 58

      #3
      Thanks for your reply. I am using amos tools (http://sourceforge.net/projects/amos/files/amos/3.1.0/). Also trying to install Bambus2 separately, but it is also not working.
      Code is following:
      Code:
      p = subprocess.Popen(AMOSDIR+"Linearize -b %s"%(amosbank), shell=True, stdin=subprocess.PIPE, stdout=vtext, stderr=logfile)
              if xopt_dict["verbose"] == 1:
                  print "9) running Linearize"
              else:
                  print "9) running Linearize...",
              sys.stdout.flush()
              sts = os.waitpid(p.pid,0)[1]
              if xopt_dict["verbose"] != 1:
                  if sts == 0:
                      print "\t\t%s...success!%s"%(GREEN,NONE)
                  else:
                      print "\t\t%s...failed%s"%(RED,NONE)
                      sys.exit(1)
      
             p = subprocess.Popen(AMOSDIR+"OutputResults -b %s -prefix %s %s"%(amosbank, prefix+".scaff.linear"), shell=True, stdin=subprocess.PIPE, stdout=vtext, stderr=logfile)
      
              if xopt_dict["verbose"] == 1:
                  print "10) running OutputResults"
              else:
                  print "10) running OutputResults...",
              sys.stdout.flush()
      Thanks,
      Rahul
      Rahul Sharma,
      Ph.D
      Frankfurt am Main, Germany

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        The indentation as shown in the forum post is certainly inconsistent - even allowing for missing white space at the very start for the first line. This seems to be the latest version,



        Here by eye in the browser the indentation looks OK at line 364. One guess is there could be a mixture of tabs and spaces which is best avoided (the Python style guide says use just spaces).

        Comment

        • rahularjun86
          Member
          • Jan 2011
          • 58

          #5
          Many thanks,, It is working now
          Thanks,
          Rahul
          Rahul Sharma,
          Ph.D
          Frankfurt am Main, Germany

          Comment

          • maubp
            Peter (Biopython etc)
            • Jul 2009
            • 1544

            #6
            Originally posted by rahularjun86 View Post
            Many thanks,, It is working now
            What changed? Or what did you change - is there a bug AMOS need to fix?

            Comment

            • rahularjun86
              Member
              • Jan 2011
              • 58

              #7
              Hi, I just replace the goBambus2.py file and reinstall the things and it is working now
              Rahul Sharma,
              Ph.D
              Frankfurt am Main, Germany

              Comment

              • rahularjun86
                Member
                • Jan 2011
                • 58

                #8
                Dear maubp,
                Bambus2 is running successfully on my machine now. But I am confused regarding the input files for bambus. what is the mate file and how to generate it? I have .contig file from minimus2 run.
                Is this mate file I need to generate from the Illumina paired-end data I assembled using velvet??? Please share your experience
                Regards,
                Rahul
                Rahul Sharma,
                Ph.D
                Frankfurt am Main, Germany

                Comment

                • maubp
                  Peter (Biopython etc)
                  • Jul 2009
                  • 1544

                  #9
                  I've never used Bambus2 so I can't help you - sorry.

                  Comment

                  • satishkumar
                    Junior Member
                    • Nov 2010
                    • 8

                    #10
                    Hi maubp,

                    I have been trying to run the goBambus from Amos package and I was hitting at this error:

                    File "/opt/amos-3.1.0/bin/goBambus2.ori", line 364
                    scafffile = open("%s.scaffold.linear.fasta"%(outprefix), 'w')
                    ^
                    IndentationError: unindent does not match any outer indentation level

                    I tried to put your code above and run it , but still I am not able to run it because of the below error:

                    goBambus2_1 contigs_mixed.fasta myscaff --all --contigs
                    /opt/amos-3.1.0/bin/goBambus2_1: line 4: import: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 6: RED: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 7: GREEN: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 8: BLUE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 9: NONE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 12: AMOSDIR: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 13: LOGFILE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 16: syntax error near unexpected token `('
                    /opt/amos-3.1.0/bin/goBambus2_1: line 16: ` logfile = open(LOGFILE,'w')'

                    Minimus2]$ goBambus2_1 -c contigs_mixed.fasta -o out
                    /opt/amos-3.1.0/bin/goBambus2_1: line 4: import: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 6: RED: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 7: GREEN: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 8: BLUE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 9: NONE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 12: AMOSDIR: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 13: LOGFILE: command not found
                    /opt/amos-3.1.0/bin/goBambus2_1: line 16: syntax error near unexpected token `('
                    /opt/amos-3.1.0/bin/goBambus2_1: line 16: ` logfile = open(LOGFILE,'w')

                    Can you help me to troubleshoot it?

                    Satish

                    Comment

                    • NAdia1234
                      Junior Member
                      • May 2013
                      • 3

                      #11
                      Hi rahularjun86 I have the same problem that you had. The error on line 364. I checked goBambus2.py agains the script that is in the link that maubp gave. I found that there is an extra %s on line 364. Do you think this is the problem?
                      I cannot change the script because I have no experience with Python. And I want to replace the file as you did. How did you replace it? I installed mine with the amos package -3.1.0, where can I find the correct file? What are the other things that you reinstalled?

                      Thank you in advance

                      NAdia

                      Comment

                      • felipelira3
                        Member
                        • Oct 2012
                        • 11

                        #12
                        the same problem

                        How can I (we) replace the goBambus2.py?
                        thank you in advance.

                        Comment

                        Latest Articles

                        Collapse

                        • SEQadmin2
                          From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                          by SEQadmin2


                          Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                          The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                          ...
                          Yesterday, 10:05 AM
                        • SEQadmin2
                          Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                          by SEQadmin2


                          With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                          Introduction

                          Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                          05-22-2026, 06:42 AM
                        • SEQadmin2
                          Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
                          by SEQadmin2

                          Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


                          Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
                          05-06-2026, 09:04 AM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, Yesterday, 12:03 PM
                        0 responses
                        19 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, Yesterday, 11:40 AM
                        0 responses
                        14 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 05-28-2026, 11:40 AM
                        0 responses
                        29 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 05-26-2026, 10:12 AM
                        0 responses
                        31 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...