MPIIComputationalEpigenetics / DeepBlue

DeepBlue Epigenomic Data Server
Other
2 stars 0 forks source link

info object from a select_genes request does not contain format information #115

Closed mlist closed 8 years ago

mlist commented 8 years ago

For example, if I select all genes in DeepBlue-R like this:

all_genes <- deepblue.select_genes(".*", "gencode v23")
request_id <- deepblue.get_regions(all_genes)
deepblue.info(request_id)

I get the following result

[[1]]$format
[1] ""

[[1]]$message
[1] ""

[[1]]$query_id
[1] "q24268"

[[1]]$state
[1] "done"

Without the information about the column types the conversion to genomic ranges in R fails.

felipealbrecht commented 8 years ago

I see the problem.

In fact, you are sending an empty output_format. The default value is NULL, that is converted to an empty string in DeepBlue.

What happens, is that DeepBlue uses the default format (CHROMOSOME,START,END) if the output_format is empty.

Here we have three options:

What do you think that makes more sense?

felipealbrecht commented 8 years ago

I will change the server to reject empty formats, but we have to change the R package for including a real format (CHROMOSOME,START,END) by default or at least change the 'output_format=NULL'

mlist commented 8 years ago

Why not option 3? I liked this one better.

On Tue, 10 May 2016 at 23:35 Felipe Albrecht notifications@github.com wrote:

I see the problem.

In fact, you are sending an empty output_format. The default value is NULL, that is converted to an empty string in DeepBlue.

What happens, is that DeepBlue uses the default format (CHROMOSOME,START,END) if the output_format is empty.

Here we have three options:

  • Reject requests when their output_format are empty (rather than use the default format);
  • If the format is empty, DeepBlue will change the request to the default format (rather than keeping it empty - I dont like this option);
  • Change in DeepBlueR, that if the format is empty, it will use the default format (CHROMOSOME,START,END);

What do you think that makes more sense?

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/MPIIComputationalEpigenetics/DeepBlue/issues/115#issuecomment-218299156

felipealbrecht commented 8 years ago

Because we still have to change the call to the get_regions command.

felipealbrecht commented 8 years ago

Do you think that does make sense that DeepBlue includes a default format when an empty format is informed?

felipealbrecht commented 8 years ago

I dont like 'magical' changes in the users' requests/commands.

mlist commented 8 years ago

A reasonable default makes sense but if you don't like it we can also change DeepBlueR to pick a default format itself.

felipealbrecht commented 8 years ago

Okay, I will not change the server, too much work and this approach makes sense.

Lets change only in the DeepBlueR!

Something like this: if (request_info$format == "") request_info$format = "CHROMOSOME,START,END"

Do you do or I do?

mlist commented 8 years ago

You do it. But if I remember correctly you have to use \t as separator

felipealbrecht commented 8 years ago

no, the format is comma separated: "CHROMOSOME,START,END"

mlist commented 8 years ago

Ok, could be. The downloaded regions are, that's probably why I thought it would be the same here.

felipealbrecht commented 8 years ago

Yes :+1: