Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigWig Error: sort: cannot create temporary file in '': Read-only file system #132

Closed
yjthu opened this issue Dec 31, 2019 · 7 comments
Closed
Labels
good first issue Good for newcomers improve-behaviour Optimise code without adding functionality

Comments

@yjthu
Copy link

yjthu commented Dec 31, 2019

Hi , the error is as follow:

Error executing process > 'BigWig (group1_R1)'

Caused by:
Process BigWig (group1_R1) terminated with an error exit status (2)

Command executed:

SCALE_FACTOR=$(grep 'mapped (' group1_R1.mLb.clN.sorted.bam.flagstat | awk '{print 1000000/$1}')
echo $SCALE_FACTOR > group1_R1.mLb.clN.scale_factor.txt
genomeCoverageBed -ibam group1_R1.mLb.clN.sorted.bam -bg -scale $SCALE_FACTOR -pc | sort -k1,1 -k2,2n > group1_R1.mLb.clN.bedGraph

bedGraphToBigWig group1_R1.mLb.clN.bedGraph genome.fa.sizes group1_R1.mLb.clN.bigWig

find * -type f -name "*.bigWig" -exec echo -e "bwa/mergedLibrary/bigwig/"{}"\t0,0,178" ; > group1_R1.mLb.clN.bigWig.igv.txt

Command exit status:
2

Command output:
(empty)

Command error:
sort: cannot create temporary file in '': Read-only file system

@yjthu
Copy link
Author

yjthu commented Dec 31, 2019

Hi there,

this error have been fixed by add "-T '.' " after sort command in "main.nf".

sort -T '.' -k1,1 -k2,2n

@drpatelh
Copy link
Member

Hi @yjthu ! Nice fix 😃 This has come up before:
#123

and is probably because the TMPDIR environment variable isn't set on your system by default. There is a way to export this using a custom config file as outlined in the issue above or we can set it to the work directory for that process given that this is likely to be deleted after the pipeline has finished anyway.

Please feel free to submit a PR to the repo with a fix if you like 👍

@drpatelh drpatelh added good first issue Good for newcomers improve-behaviour Optimise code without adding functionality labels Dec 31, 2019
@drpatelh
Copy link
Member

Fixed in #135

@brucemoran
Copy link

NB that while this is fixed, the release version is still 1.1.0 and so running nextflow run nf-core/chipseq still results in this issue.

@drpatelh
Copy link
Member

Hi @brucemoran ! If you haven't already figured it out the easy fix until the next release would be to just export the variable below before you run the command for the pipeline:
export TMPDIR=/tmp/

@brucemoran
Copy link

Yes edited in the -T . solution, easier fix as my TMPDIR was defined, and mounted/bound in container. No idea why it didn't work, permissions all fine. One of those things I guess.

I thought releases would have been used to deal with issues like this, shows how little I know about the Github machine!

Thanks for a great pipeline, appreciate your reply and work.

@drpatelh
Copy link
Member

Hmm, that is weird. That seems to have done the trick on all occasions except for this one!

Yep, releases do normally incorporate bug fixes like this and other pipeline updates but the frequency with which you release depends quite heavily on having the time to do it all! 😅 That's why I tend to release less often but with bigger changes.

You're very welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers improve-behaviour Optimise code without adding functionality
Projects
None yet
Development

No branches or pull requests

3 participants