A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/samtools/samtools/issues/2165 below:

Permission denied · Issue #2165 · samtools/samtools · GitHub

Are you using the latest version of samtools and HTSlib? If not, please specify.

(run samtools --version) YES, v1.21.

Please describe your environment. Please specify the steps taken to generate the issue, the command you are running and the relevant output.
  1. Running the following command line on a cloud server where I have no permission of the /tmp dir for my submitted job:
samtools reheader -c 'sed -E "
    s/NC_000015\.10/chr15/g;
    s/NC_000022\.11/chr22/g;
    s/NC_000004\.12/chr4/g;
    s/NC_000007\.14/chr7/g;
    s/NC_000002\.12/chr2/g;
    s/NC_000012\.12/chr12/g;
    s/NC_000019\.10/chr19/g;
    s/NC_000014\.9/chr14/g;
    s/NC_000006\.12/chr6/g;
    s/NC_000020\.11/chr20/g;
    s/NC_000018\.10/chr18/g;
    s/NC_000021\.9/chr21/g;
    s/NC_000017\.11/chr17/g;
    s/NC_000001\.11/chr1/g;
    s/NC_000005\.10/chr5/g;
    s/NC_000013\.11/chr13/g;
    s/NC_000008\.11/chr8/g;
    s/NC_012920\.1/chrM/g;
    s/NC_000016\.10/chr16/g;
    s/NC_000003\.12/chr3/g;
    s/NC_000024\.10/chrY/g;
    s/NC_000010\.11/chr10/g;
    s/NC_000009\.12/chr9/g;
    s/NC_000011\.10/chr11/g;
    s/NC_000023\.11/chrX/g;
"' "${mapped_dir}/ax.bam" > "${refined_dir}/ax.bam"

Error:

samtools reheader: fail to open temp file 'reheaderKIWo81': Permission denied
[main_reheader] failed to read the header from 'sed -E "
s/NC_000015\.10/chr15/g;
s/NC_000022\.11/chr22/g;
s/NC_000004\.12/chr4/g;
s/NC_000007\.14/chr7/g;
s/NC_000002\.12/chr2/g;
s/NC_000012\.12/chr12/g;
s/NC_000019\.10/chr19/g;
s/NC_000014\.9/chr14/g;
s/NC_000006\.12/chr6/g;
s/NC_000020\.11/chr20/g;
s/NC_000018\.10/chr18/g;
s/NC_000021\.9/chr21/g;
s/NC_000017\.11/chr17/g;
s/NC_000001\.11/chr1/g;
s/NC_000005\.10/chr5/g;
s/NC_000013\.11/chr13/g;
s/NC_000008\.11/chr8/g;
s/NC_012920\.1/chrM/g;
s/NC_000016\.10/chr16/g;
s/NC_000003\.12/chr3/g;
s/NC_000024\.10/chrY/g;
s/NC_000010\.11/chr10/g;
s/NC_000009\.12/chr9/g;
s/NC_000011\.10/chr11/g;
s/NC_000023\.11/chrX/g;
"'.
  1. save the sed cmdln as sed_script.txt, run this:
samtools reheader \
    -c "sed -E -f ${debug_dir}/sed_script.txt"
    "${mapped_dir}/ax.bam" > "${refined_dir}/ax.bam"

The error is the same.

  1. run the same cmdln on my local Ubuntu server where I can access the /tmp dir, the reheader succeeds.
  2. tricks like ln -s $(pwd) /tmp do not work.
  3. There is no -T option for reheader like some other functions.

If my prediction is true, maybe you should generalize the -T option to all the functions?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4