Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Will Nelson
    Member
    • Nov 2010
    • 16

    #1

    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.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Symlink is working for me with samtools view (with either the link in cwd or from some place else).

    Comment

    • WhatsOEver
      Senior Member
      • Apr 2012
      • 215

      #3
      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.

      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

      Comment

      • Will Nelson
        Member
        • Nov 2010
        • 16

        #4
        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.

        Comment

        Latest Articles

        Collapse

        • kinpict.com
          Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by kinpict.com
          The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
          Today, 06:37 PM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        27 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        35 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-03-2026, 11:54 AM
        2 responses
        56 views
        0 reactions
        Last Post kinpict.com  
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        175 views
        0 reactions
        Last Post SEQadmin2  
        Working...