SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
RiboZero won't work? Neiltje Sample Prep / Library Generation 5 02-05-2014 12:59 PM
Cuffdiff won't open TopHat accepted_hits.bam Richard Barker RNA Sequencing 12 08-14-2012 10:14 AM
Something to follow? dan Wiki Discussion 3 11-19-2011 04:50 AM
cufflinks won't read my GTF file moriah Bioinformatics 0 08-28-2011 12:31 AM
Hello World! ===Follow the notice from my registration! yifangt Introductions 1 02-18-2011 12:39 PM

Reply
 
Thread Tools
Old 05-13-2014, 08:57 AM   #1
Will Nelson
Member
 
Location: Arizona

Join Date: Nov 2010
Posts: 16
Default samtools won't follow symlinks?

Seems strange but when I do a simple command like

samtools view ../../Tophat/Results/B6Br1.bam

where the target is a symlink, I get:

open: No such file or directory
[main_samview] fail to open "../../Tophat/Results/B6Br1.bam" for reading.

The symlink exists:

ls -l ../../Tophat/Results/B6Br1.bam
lrwxrwxrwx 1 will bioinfo 39 May 13 09:37 ../../Tophat/Results/B6Br1.bam -> dirs/B6Br1/tophat_out/accepted_hits.bam

And when I run the same samtools command using the link target accepted_hits.bam, it works.

It's inconvenient because it means to reorganize a bunch of tophat outputs, which all have the same name, I have to physically copy them.
Will Nelson is offline   Reply With Quote
Old 05-13-2014, 10:19 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,077
Default

Symlink is working for me with samtools view (with either the link in cwd or from some place else).
GenoMax is offline   Reply With Quote
Old 05-13-2014, 11:08 PM   #3
WhatsOEver
Senior Member
 
Location: Germany

Join Date: Apr 2012
Posts: 215
Default

For me it works too. Are you sure, your symlink is set correctly? The path to your accepted_hits.bam looks strange to me, as leading "/" or "../" are missing. I would suggest to use full path when creating symlinks, then you may also copy them elsewhere without running into problems.

Quote:
Originally Posted by Will Nelson View Post
ls -l ../../Tophat/Results/B6Br1.bam
lrwxrwxrwx 1 will bioinfo 39 May 13 09:37 ../../Tophat/Results/B6Br1.bam -> dirs/B6Br1/tophat_out/accepted_hits.bam
WhatsOEver is offline   Reply With Quote
Old 05-14-2014, 08:37 AM   #4
Will Nelson
Member
 
Location: Arizona

Join Date: Nov 2010
Posts: 16
Default

Thanks, yes, that was it...I did not realize that links which are created using a relative path don't work if they're copied to another location! Live and learn...well, I'll probably just delete this thread since it had nothing to do with samtools and nobody else having the same symlink problem will ever find it.
Will Nelson is offline   Reply With Quote
Reply

Tags
samtools

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 12:45 AM.


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