Seqanswers Leaderboard Ad



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

  • Creating Count Table using BedTools2 (which "executables" do I add to PATH?)

    As you may guess by the title, I am not very experienced with Linux. I have been trying to follow the advice on these websites:

    Basically, I downloaded bedtools2 (from this site - so that I could generate a count table using the command (as seen on the first referenced biostars site):

    bedtools multicov –bams run1.bam run2.bam run3.bam -bed genes.bed

    I do not have XCode (and my MacOSX App Store has an installation problem), so I cannot use the "make" command to make this easy.

    So, this is what I have tried so far:

    1) I used "echo$PATH", which looks like this:


    2) I know I have to copy "executables of interest" to /usr/local/bin (I chose that from one output of echo$PATH).

    However, my question is: What are the executables of interest? I keep seeing this on forums, and am still stuck after hours. What exactly should I copy to /usr/local/bin for me to run a command like:

    bedtools multicov –bams run1.bam run2.bam run3.bam -bed genes.bed

    from anywhere? (And yes, I am guessing I will change the first word to "bedtools2").

    Do I copy an entire directory? There are numerous subdirectories in bedtools (/bin /data /docs /genomes /obj /scripts /src/ test).

    I don't see any files in /bin. I don't see a "multicov" directory in /src (although I see a "multiBamCov" directory there). I see a "multicov" directory in /test.

    If you have an idea of what exactly I should copy to /usr/local/bin, and anything else I need to do to run such a command, I would greatly appreciate. I have spent a while on this, and feel like if I needed to start a thread (even if it seems simple).

    Thank you!

  • #2
    This is exactly what my paths look like:


    I have also read to alter the ~/.bashrc and ~/.bash_profile, so I added this line to both of them:

    export PATH=$PATH:/Users/MacOwner/Desktop/bedtools2-2.19.1


    • #3
      The problem is that you don't have any executables.
      You've only downloaded the source code, which you must compile to build the executables.
      Once you've run the make command, the executables will be in the bin folder.
      You can then type the full path to the bin folder in the bed tools folder to execute the command, or add the path to the bin folder to your PATH environment variable so as to only have to type the name of the command.

      You need to install Xcode first. If you're not running OS Mavericks, you may also need to install the Xcode command line tools after having installed Xcode. The make command will then work, and you will have your executable files in the bin folder of the bedtools folder.

      The command will be bedtools and not bedtools2.

      Since these are computationally intensive tasks involving large files, you may find it more convenient to find a Linux server with sufficient computational power to run these programs. Also, your server administrator can install the tools for you. If your MAC has sufficient storage space, RAM and computational power, this may not be necessary.


      • #4
        Thanks for the information. Unfortunately I dont have access to any special servers just my laptop. My has an issue and cant download anything. I spent all day (literally) yesterday working with apple supporters and it will take a while to fix, but I need this for a quick project due soon.

        As per apple supporter suggestion, im doing the workaround which requires a friend to download mavericks, send the .app to me, me download that, then i can download xcode. My friend starting downloading mavericks and it is taking 17 hrs. Now I am worried that after all of this, the bedtools command may not run on my computer?

        This is kind of a nightmare for me as I need to present the counts.early next week.

        Are there any tools available online? I used galaxy to.perfom computationally expensive tasks up until now, and this is the last comp intensive task so I feel kind of panic and frustrated.

        Any advice appreciated ....


        • #5
          I've compiled bedtools on my own MACS, running Mavericks.
          I'm not sure it will work on your computer though.
          It depends how different our computers are.
          Here is the link to the binaries.

          I'll delete the file soon so it will only be available temporarily.

          Just unzip the folder.
          cd bin
          chmod u+x * # Not necessary if the files are already executable.

          I never use the online tools, so I can't help you with them.
          The best setup is a Linux server with a bioinformatician installing the software programs for all the users.
          Last edited by blancha; 05-04-2014, 02:41 PM. Reason: Thought htseq-count would work, but it may require a compiler to be installed too.


          • #6
            I thought about htseq-count too, but strangely enough, the installation instructions specify that a C compiler should be available.
            I would have thought a Python script like htseq-count would have worked out of the box, since Python is pre-installed on MAC.

            I always use htseq-count to count the numbers of reads aligned to features incidentally, and bedtools for the coverage. It does appear though that bedtools can also be used to count the number of reads aligned to features.

            I'm not familiar at all with the online tools.
            If you're really desperate and I have them time, I could count the features for you if you transfer me the BAM files.


            • #7
              Thank you for offering, blancha. ) Yes, I am a student with a presentation on Tuesday, and each tiny step has taken so long. I have had the bam files for days now, but have not progressed.

              I did have a friend let me use a sever with ht-seq in it. So, I felt much better.

              However, now that I am actually running it on my sam files, I see that the counts are all equal to zero. (

              I am using the command:

              htseq-count -s no -a 0 FourA.sam hg19.gtf > FourA.count

              When I look at the FourA. count, it has 38,726 lines all equal to zero, except one line that says "no_feature" 257.

              I tried using -s as "yes" and "no" and tried using -a as various numbers from 0 to 10 (the default). Each time, I get zero counts.

              Now, I am starting to panic...


              • #8
                I posted the issue in more detail here:

                Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc

                Many thanks...


                Latest Articles


                • 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
                • seqadmin
                  Strategies for Sequencing Challenging Samples
                  by seqadmin

                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                  03-22-2024, 06:39 AM





                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 12:08 PM
                0 responses
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 10:19 PM
                0 responses
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 09:21 AM
                0 responses
                Last Post seqadmin  
                Started by seqadmin, 04-04-2024, 09:00 AM
                0 responses
                Last Post seqadmin