code: def local_link(local_fn, remote_fn, staging):
      
      linkname = os.path.join(staging, remote_fn.lstrip(os.path.sep))
      return symlink(local_fn, linkname)
docs: Creates a symlink to a local staging area.
  
      The link name is built from `remote_fn`, but the absolute path is put
      inside the staging directory.
  
      Example
      -------
  
      If we have the following initial setup::
  
          cwd="/home/user"
          local="data/sample1.bw"
          remote="/hubs/hg19/a.bw"
          staging="__staging__"
  
      Then this function does the equivalent of::
  
          mkdir -p __staging__/hubs/hg19
          ln -sf \\
              /home/user/data/sample1.bw \\
              /home/user/__staging__/hubs/hg19/a.bw