TADbit icon indicating copy to clipboard operation
TADbit copied to clipboard

oneD normalization

Open alkurowska opened this issue 3 years ago • 3 comments

Hello,

I get the following error while running oneD normalization:

Error in formula.character(object, env = baseenv()) :

invalid formula ""tot ~ s(map) + s(cg) + s(res)"": not a call

Calls: as.formula -> formula -> formula.character

I believe this a problem with Python calling R. Could you debug this problem?

In the attachment you can see my output file. slurm_out.txt

alkurowska avatar Oct 24 '21 12:10 alkurowska

Hi,

Yes, that seems to be an issue with the R script. TADbit calls internally this script:

Rscript --vanilla normalize_oneD.R input.csv

so, I'd first check that from R you can execute that script.

Then TADbit creates a temporary folder 'tmp_oneD_xxxx' and put the input file which is a multi-column text file. You can also create a fake 4 column text file with tot, map, cg and res and see if that works.

You can also check if the R library library("dryhic") is correctly installed in R

David

david-castillo avatar Oct 26 '21 12:10 david-castillo

Hello,

I can execute the script from R, which gives me oneD_biases.csv as an output file. Also if I run tadbit normalize I get the input file "tot.csv" in that temporary folder and it has 4 columns and all the required data.

Aleksandra

alkurowska avatar Nov 01 '21 07:11 alkurowska

Hi,

Then, it's maybe that the R version called from python is not the correct one if you have multiple installations. You can try to do:

python -c 'from subprocess import Popen; Popen(["which","Rscript"])'

And see if Rscript is in the path that it should be.

David

david-castillo avatar Nov 02 '21 09:11 david-castillo