Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Kimist99
    Member
    • Aug 2013
    • 30

    Problems using wgsim in Linux/Ubuntu

    Hello All!

    I'm a relative newbie to Bioinformatics and I'm having problems with the code I'm using to generate reads from a reference sequence.

    I'm using Linux/Ubuntu, and here is the code I'm using along with the error message:

    Kimist@Kimist99:~/seqaln$ ./wgsim.c -N 10000 hg18.chr20.10k_200k.fa sim_1.fq sim_2.fq > sim.mutation.txt
    ./wgsim.c: line 1: /bin: Is a directory
    ./wgsim.c: line 3: syntax error near unexpected token `c'
    ./wgsim.c: line 3: ` Copyright (c) 2008 Genome Research Ltd (GRL).'


    Any help you can provide is greatly appreciated, I feel like this is something easy and that I just don't have the expertise to figure it out. My classmates all use Macs.
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    wgsim is a C program. If it hasn't been done, you need to compile it with MAKE it before using it.
    the command will be:


    /path/to/wgsim -N 10000 hg18.chr20.10k_200k.fa sim_1.fq sim_2.fq > sim.mutation.txt

    Comment

    • Kimist99
      Member
      • Aug 2013
      • 30

      #3
      Originally posted by lindenb View Post
      wgsim is a C program. If it hasn't been done, you need to compile it with MAKE it before using it.
      the command will be:


      /path/to/wgsim -N 10000 hg18.chr20.10k_200k.fa sim_1.fq sim_2.fq > sim.mutation.txt
      Thanks for the quick repsonse!

      I thought I did compile it with MAKE, but apparently I didn't.

      How can I confirm the compiling was done?

      Thanks again!

      Comment

      • dnafp
        Junior Member
        • Sep 2013
        • 9

        #4
        At the command prompt type:
        file /path/to/wgsim
        this should return you something like "elf executable" ...

        If you can open that file in an editor, it's usually not compiled yet. You'll likely need to find the execuable wgsim without the ending ".c".

        Comment

        • lindenb
          Senior Member
          • Apr 2010
          • 143

          #5
          go in the wgsim.c folder (samtools/misc) and type "make" or "make wgsim"

          Comment

          • Kimist99
            Member
            • Aug 2013
            • 30

            #6
            Originally posted by lindenb View Post
            go in the wgsim.c folder (samtools/misc) and type "make" or "make wgsim"
            Now I'm getting the following error:

            :~/seqaln$ make wgsim
            gcc -g -Wall -O2 wgsim.c -o wgsim
            wgsim.c:39:18: fatal error: zlib.h: No such file or directory
            #include <zlib.h>
            ^
            compilation terminated.
            make: *** [wgsim] Error 1

            Thanks again for the advice!

            Comment

            • lindenb
              Senior Member
              • Apr 2010
              • 143

              #7
              install zlib and zlib-devel packages :

              sudo apt-get install zlib-devel

              Comment

              • Kimist99
                Member
                • Aug 2013
                • 30

                #8
                Originally posted by lindenb View Post
                install zlib and zlib-devel packages :

                sudo apt-get install zlib-devel
                After a couple hours of trying to trouble shoot this myself, I get nothing but the following message:

                ~/seqaln$ sudo apt-get install zlib-devel
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                E: Unable to locate package zlib-devel

                I assumed the package was part of Samtools-0.1.19.

                Comment

                • GenoMax
                  Senior Member
                  • Feb 2008
                  • 7142

                  #9
                  Package you need to install is called "zlib1g-dev". Package page: http://packages.ubuntu.com/lucid/libdevel/zlib1g-dev

                  If you are new to ubuntu doing the installs through the "package/software manager" is probably a better idea.

                  Comment

                  • Kimist99
                    Member
                    • Aug 2013
                    • 30

                    #10
                    Originally posted by GenoMax View Post
                    Package you need to install is called "zlib1g-dev". Package page: http://packages.ubuntu.com/lucid/libdevel/zlib1g-dev

                    If you are new to ubuntu doing the installs through the "package/software manager" is probably a better idea.
                    Worked like a charm, thanks again!

                    Comment

                    • Kimist99
                      Member
                      • Aug 2013
                      • 30

                      #11
                      Bottom line for folks using samtools in Ubuntu, you need to make sure you download all the necessary packages before trying to run it.

                      Comment

                      • eco32i
                        Member
                        • Jul 2012
                        • 10

                        #12
                        The easiest way to use samtools on ubuntu is just to install the package via apt-get:

                        Code:
                        $ sudo apt-get install samtools

                        Comment

                        • Kimist99
                          Member
                          • Aug 2013
                          • 30

                          #13
                          Originally posted by eco32i View Post
                          The easiest way to use samtools on ubuntu is just to install the package via apt-get:

                          Code:
                          $ sudo apt-get install samtools
                          Unforntuantely, doing that didn't work until after I donwloaded the packages mentioned above.

                          Comment

                          Latest Articles

                          Collapse

                          • GATTACAT
                            Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                            by GATTACAT
                            Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                            07-01-2026, 11:43 AM
                          • SEQadmin2
                            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                            by SEQadmin2


                            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                            Here are nine questions we think about, in roughly the order they matter, before...
                            06-18-2026, 07:11 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by SEQadmin2, 07-02-2026, 11:08 AM
                          0 responses
                          22 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-30-2026, 05:37 AM
                          0 responses
                          23 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-26-2026, 11:10 AM
                          0 responses
                          22 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-17-2026, 06:09 AM
                          0 responses
                          55 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...