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
                          Essential Discoveries and Tools in Epitranscriptomics
                          by seqadmin




                          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                          04-22-2024, 07:01 AM
                        • seqadmin
                          Current Approaches to Protein Sequencing
                          by seqadmin


                          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                          04-04-2024, 04:25 PM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by seqadmin, Today, 11:49 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, Yesterday, 08:47 AM
                        0 responses
                        16 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-11-2024, 12:08 PM
                        0 responses
                        60 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-10-2024, 10:19 PM
                        0 responses
                        60 views
                        0 likes
                        Last Post seqadmin  
                        Working...
                        X