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

1.mpileup.R - BatchtoolsError write permission error #14

Open
SRHilz opened this issue Oct 18, 2017 · 5 comments
Open

1.mpileup.R - BatchtoolsError write permission error #14

SRHilz opened this issue Oct 18, 2017 · 5 comments

Comments

@SRHilz
Copy link
Contributor

SRHilz commented Oct 18, 2017

I've just tried to run a new batch of exomes through the copy number pipeline, and have encountered a new error while running 1.mpileup.R.

Almost all of the mpileup files for each sample + chromosome are successfully generated:

[shilz@n6 THetA]$ ll /costellolab/shilz/tools/Costello-PSCN-Seq/seqzData/CostelloP_2015-Exome,bwa,realigned,rmDups,recal,mpileup/Homo_sapiens/
total 282747836
-rw-r--r-- 1 shilz costellolab  810866744 Oct 15 21:31 Patient276,Z00483-trim,chr=1.mpileup.gz
-rw-r--r-- 1 shilz costellolab  237568378 Oct 15 20:42 Patient276,Z00483-trim,chr=10.mpileup.gz
-rw-r--r-- 1 shilz costellolab  415875698 Oct 15 20:59 Patient276,Z00483-trim,chr=11.mpileup.gz
-rw-r--r-- 1 shilz costellolab  404682127 Oct 15 20:59 Patient276,Z00483-trim,chr=12.mpileup.gz
-rw-r--r-- 1 shilz costellolab  170785520 Oct 15 21:11 Patient276,Z00483-trim,chr=13.mpileup.gz
-rw-r--r-- 1 shilz costellolab  257024396 Oct 15 20:49 Patient276,Z00483-trim,chr=14.mpileup.gz
-rw-r--r-- 1 shilz costellolab  344659939 Oct 15 21:01 Patient276,Z00483-trim,chr=15.mpileup.gz
-rw-r--r-- 1 shilz costellolab  376578483 Oct 15 20:57 Patient276,Z00483-trim,chr=16.mpileup.gz

However, two seem to not complete when the script hits an error and stops running:

-rw-r--r-- 1 shilz costellolab 1610939722 Oct 15 20:29 Patient372,Z00496-trim,chr=9.mpileup
-rw-r--r-- 1 shilz costellolab  466056895 Oct 15 20:59 Patient372,Z00496-trim,chr=9.mpileup.gz.tmp

and

-rw-r--r-- 1 shilz costellolab 1326738204 Oct 15 21:00 Patient372,Z00500-trim,chr=16.mpileup
-rw-r--r-- 1 shilz costellolab  409682667 Oct 15 21:27 Patient372,Z00500-trim,chr=16.mpileup.gz.tmp

I have tried simply re-running 1.mpileup.R, but it throws and error that these intermediate tmp files already exist. When I then delete them and try rerunning, it also does not work unfortunately.

Here are the last few dozen lines form the Rscript*.o* output file from the R run, with the part that seems potentially problematic highlighted:

  A 'listenv' vector with 27 unnamed elements.
 Collect and resolve all futures...done
 Gather and rearrange...
**Error: BatchtoolsError in BatchtoolsFuture ('sample_7'): 'Error : BatchtoolsError in BatchtoolsFuture ('chr_chrX'): 'Error in getWritablePathname.Arguments(static, ...) : 
  No write permission for directory: seqzData/CostelloP_2015-Exome,bwa,realigned,rmDups,recal,mpileup/Homo_sapiens''**
 Gather and rearrange...done
mpileup()...done
Execution halted
Warning messages:
1: In delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_26_1483439475'
2: In delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_17_1062549309'
3: In delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_13_1838446915'
4: In delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_9_1953818508'
5: In delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_7_2035481989'

I wanted to see if you knew what might be causing this, before I delve into my own investigation? Let me know if there is any more info I can provide.

Many thanks!

@SRHilz
Copy link
Contributor Author

SRHilz commented Oct 18, 2017

If helpful, I ran it for a smaller dataset on Oct 6 (a single patient) and it seemed to work fine. So I am checking now to see if the problem is solved by doing one patient at a time.

@HenrikBengtsson
Copy link
Owner

Weird. Could there be any truth to that

Error in getWritablePathname.Arguments(static, ...) : 
  No write permission for directory: seqzData/CostelloP_2015-Exome,bwa,realigned,rmDups,recal,mpileup/Homo_sapiens

error message? Normally I'd trust that type of error unless it's just a hiccup which when rerunning it should solve it. Before trying to write/move a file, that getWritablePathname() function will try to create a small dummy file to make sure you have the proper file permission and if not it'll give that error (for the purpose of being a bit more informative that just "failed to write").

Could it be that you're running out of disk space?

Also, the log files mentioned in those warnings might provide additional clues;

  Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error',
'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session:
 '/costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_26_1483439475

Have a look at the tail of those to see if the show more info/the same error message as above:

tail -50 /costellolab/shilz/tools/Costello-PSCN-Seq/.future/20171015_201234-e7GtcR/sample_26_1483439475

If they all mention the same error, that's definitely useful to know.

@SRHilz
Copy link
Contributor Author

SRHilz commented Oct 19, 2017

Thanks for the helpful insight, Henrik! I think you are probably right about it being a memory and not a weird permissions issue, as it seems to be fine when I break up the run into smaller runs of only 10-15 samples or so.

@HenrikBengtsson
Copy link
Owner

This is still a bit odd to me.

It could be related to HenrikBengtsson/R.utils#72, which would reveal itself with higher probability then more samples you run at the same time. On the other hand, every time I've gone into the details of that code I've concluding that this shouldn't be the case here ... but I've been wrong before.

Please keep posting updates on this, e.g. if you see it again - the more info we can gather the more likely it is that we can avoid this problem.

@complexgenome
Copy link

I run into similar issue (with different package) when I use 224 CEL (HuEx ST1.0 microarray )files. But all works good if I work with small number of files (13). Weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants