Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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


    • #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


      • #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


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

          Comment


          • #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


            • #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


              • #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


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

                  Comment


                  • #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


                    • #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


                      • #12
                        the same problem

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

                        Comment

                        Latest Articles

                        Collapse

                        • seqadmin
                          Advancing Precision Medicine for Rare Diseases in Children
                          by seqadmin




                          Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                          12-16-2024, 07:57 AM
                        • seqadmin
                          Recent Advances in Sequencing Technologies
                          by seqadmin



                          Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                          Long-Read Sequencing
                          Long-read sequencing has seen remarkable advancements,...
                          12-02-2024, 01:49 PM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by seqadmin, 12-17-2024, 10:28 AM
                        0 responses
                        26 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 12-13-2024, 08:24 AM
                        0 responses
                        43 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 12-12-2024, 07:41 AM
                        0 responses
                        29 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 12-11-2024, 07:45 AM
                        0 responses
                        42 views
                        0 likes
                        Last Post seqadmin  
                        Working...
                        X