SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forget to add "-I" option while run bwa aln MissDona Bioinformatics 1 09-01-2013 06:30 AM
how to place samtools in "PATH" for use with TopHat on MAC louis7781x Bioinformatics 15 12-16-2012 08:31 PM
Creating "Consensus" Sequence between Reference and Mapped Reads roliwilhelm Genomic Resequencing 2 07-23-2012 12:21 PM
Seated at the "adults" table now. pmiguel Illumina/Solexa 2 04-19-2012 07:51 AM
how to place bowtie in "PATH" for use with TopHat albrown415 Bioinformatics 8 06-14-2010 08:29 PM

Reply
 
Thread Tools
Old 05-04-2014, 02:49 AM   #1
lanner
Member
 
Location: Chicago

Join Date: Apr 2014
Posts: 29
Default 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:

https://www.biostars.org/p/44756/
https://www.biostars.org/p/75311/

Basically, I downloaded bedtools2 (from this site -https://github.com/arq5x/bedtools2/releases/tag/v2.19.1) 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:

/usr/local/bin:/Users/MacOwner/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/opt/local/bin:~/bin

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!
lanner is offline   Reply With Quote
Old 05-04-2014, 03:27 AM   #2
lanner
Member
 
Location: Chicago

Join Date: Apr 2014
Posts: 29
Default

This is exactly what my paths look like:

/Users/MacOwner/Desktop/bedtools2-2.19.1

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
lanner is offline   Reply With Quote
Old 05-04-2014, 06:20 AM   #3
blancha
Senior Member
 
Location: Montreal

Join Date: May 2013
Posts: 367
Default

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.
blancha is offline   Reply With Quote
Old 05-04-2014, 11:10 AM   #4
lanner
Member
 
Location: Chicago

Join Date: Apr 2014
Posts: 29
Default

Thanks for the information. Unfortunately I dont have access to any special servers just my laptop. My App.store 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 ....
lanner is offline   Reply With Quote
Old 05-04-2014, 03:39 PM   #5
blancha
Senior Member
 
Location: Montreal

Join Date: May 2013
Posts: 367
Default

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.
https://www.dropbox.com/s/dr15wptovo7gnl0/bin.zip
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.
./bedtools

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 at 03:41 PM. Reason: Thought htseq-count would work, but it may require a compiler to be installed too.
blancha is offline   Reply With Quote
Old 05-04-2014, 03:57 PM   #6
blancha
Senior Member
 
Location: Montreal

Join Date: May 2013
Posts: 367
Default

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.
blancha is offline   Reply With Quote
Old 05-04-2014, 05:05 PM   #7
lanner
Member
 
Location: Chicago

Join Date: Apr 2014
Posts: 29
Default

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...
lanner is offline   Reply With Quote
Old 05-04-2014, 05:58 PM   #8
lanner
Member
 
Location: Chicago

Join Date: Apr 2014
Posts: 29
Default

I posted the issue in more detail here:

http://seqanswers.com/forums/showthread.php?t=43056

Many thanks...
lanner is offline   Reply With Quote
Reply

Tags
bedtools, counts, install, installation

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO