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

Problem with writing permissions on CentOS #31

Closed
palfalvi opened this issue Nov 9, 2018 · 6 comments
Closed

Problem with writing permissions on CentOS #31

palfalvi opened this issue Nov 9, 2018 · 6 comments

Comments

@palfalvi
Copy link

palfalvi commented Nov 9, 2018

Hi,

Thank you for your effort, it is a great initiative. I would love to try how babette can fit in some automated pipeline.

I was just trying out babette with some example data, but I got the following issue:

library(babette)

fasta_name <- "anthus_aco.fasta"

mrca_priors <- create_mrca_prior(
  taxa_names = get_taxa_names(fasta_name),
  alignment_id = get_alignment_id(fasta_name),
  mrca_distr = create_normal_distr(mean = 15.0, sigma = 0.025)
)
 
mcmc = create_mcmc(chain_length=2000, store_every = 1000)

out <- bbt_run(fasta_name, mcmc = mcmc, mrca_priors = mrca_priors)
Error: file.exists(output_log_filename) is not TRUE
In addition: Warning messages:
1: In file.rename(from = from, to = output_log_filename) :
  cannot rename file 'anthus_aco.log' to '/tmp/RtmpI5Egd6/beast2_258b458753999log', reason 'Invalid cross-device link'
2: In file.rename(from = from, to = to) :
  cannot rename file 'anthus_aco.trees' to '/tmp/RtmpI5Egd6/beast2_anthus_aco_258b42309a56a.trees', reason 'Invalid cross-device link'

I could not find any workaround for this issue. Do you have any idea how to solve?

Thank you in advance!

Best,
Gergo

@richelbilderbeek
Copy link
Member

Hi Gergo, thanks for helping improve babette! I usually get that error when using an encrypted home folder. Do you happen to use such an encrypted home folder?

@palfalvi
Copy link
Author

Hi,

Thanks for helping. I am using CentOS7, no encryption and here is the session info:

Session info ------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.0 (2018-04-23)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       Asia/Tokyo                  
 date     2018-11-12  

@richelbilderbeek
Copy link
Member

richelbilderbeek commented Nov 13, 2018

Hi @palfalvi,

No idea why CentOS7 (with an unencrypted home) fails.

I do know that I use tempfile to create temporary files,
which I feel is the cause,
that apparently somehow fails on CentOS,
like it does on an encrypted home.

As a work-around -it will be ugly, one could specify all temporary files.

These are the defaults:

bbt_run <- function(
  # Your arguments
  beast2_output_log_filename = tempfile(pattern = "beast2_", fileext = "log"),
  beast2_output_trees_filenames = tempfile(
    pattern = paste0(
      "beast2_",
      beautier::get_alignment_ids(fasta_filenames), "_"
    ),
    fileext = ".trees"
  ),
  beast2_output_state_filename = tempfile(
    pattern = "beast2_", fileext = ".xml.state"
  ),
)

Change it to:

bbt_run <- function(
  # Your arguments
  beast2_output_log_filename = "~/beast2.log",
  beast2_output_trees_filenames = paste0("~/", get_alignment_id(fasta_filenames), ".trees"),
  beast2_output_state_filename = "~/beast2.xml.state"
)

I hope that helps. If yes or no, please let me know.

It would help me, to reproduce the bug in a Continuous Integration service.
I use Travis CI for Mac+Ubuntu and AppVeyor for Windows.
If you could set up a third service (Semaphore, Jenkins, anything that is free), I could take a closer look at it.

Cheers, Richel

@richelbilderbeek
Copy link
Member

Hi @palfalvi, I've added #33 ('Detect if babette is run on CentOS') to at least give a warning when babette is run on an untested OS.

I am sorry I cannot help as long as I cannot let Travis or AppVeyor produce a CentOS environment. Well, you'll probably notice more often that the *buntus have all the support...

If you find a way for me to help (in a scalable way), I'd be happy to do so 👍

@richelbilderbeek richelbilderbeek changed the title Problem with writing permissions? Problem with writing permissions on CentOS Nov 15, 2018
@richelbilderbeek
Copy link
Member

richelbilderbeek commented Nov 15, 2018

This is the reprex, so I can check if it works:

library(babette)

fasta_name <- get_babette_path("anthus_aco.fas")

mrca_priors <- create_mrca_prior(
  taxa_names = get_taxa_names(fasta_name),
  alignment_id = get_alignment_id(fasta_name),
  mrca_distr = create_normal_distr(mean = 15.0, sigma = 0.025)
)

mcmc <- create_mcmc(chain_length = 2000, store_every = 1000)

out <- bbt_run(fasta_name, mcmc = mcmc, mrca_priors = mrca_priors)

Yes, this works on my OS (Lubuntu 16.10) and Travis and AppVeyor.

@richelbilderbeek
Copy link
Member

Unhappily closing the Issue 🙁

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

2 participants