Closed jaybee84 closed 2 years ago
@jaybee84 Whats the synapse id for the "Project Files and Metadata Fileview" table?
Every NF study has an associated "Project Files and Metadata" fileview.
Is there a way to go from the current selected study to that fileview (programatically?)
Below is a crude way of doing it:
iterator <- synGetChildren(<studyID>, includeTypes = list("entityview"), sortBy = "NAME", sortDirection = "DESC")
for (i in 1:length(iterator)) {
tryCatch(
{
member<-nextElem(iterator)
a[i] <- (member$id[member$name == "Files and Metadata" | member$name == "Project Files and Metadata"])
fileview_id <- na.omit(a)
return(fileview_id)
},
error=function(e) {
more <<-FALSE
}
)
}
Example
studyID <- "syn4939902"
iterator <- synGetChildren(studyID, includeTypes = list("entityview"), sortBy = "NAME", sortDirection = "DESC")
for (i in 1:length(iterator)) {
tryCatch(
{
member<-nextElem(iterator)
a[i] <- (member$id[member$name == "Files and Metadata" | member$name == "Project Files and Metadata"])
fileview_id <- na.omit(a)
return(fileview_id)
},
error=function(e) {
more <<-FALSE
}
)
}
fileview_id[1]
> "syn13363852"
@jaybee84 is there a way to do this: "When the user clicks the link it takes them to the "Project Files and Metadata Fileview" scoped using the generated query."
Edit: This is how:
In the web client we base64 encode the [Query](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/Query.html) JSON object in the URL:
https://www.synapse.org/#!Synapse:syn<id>/tables/query/<encodedQuery>
So you could do the same thing if you construct and encode the Query object that you need (
@jaybee84 Here's what it looks like in testing. This is testing data so there will be a warning about the id not being a synapse id.
When the app first loads, or the user clicks on an 'expected' bar: When the user clicks on an 'actual' bar:
This looks good .. couple of suggestions:
@jaybee84 For #2 what do you mean by banner? Something in the description above the plot?
I mean just a more conspicuous notification that a new link has been created for them to click on. Currently it is only one line of text that they may miss if they are not looking carefully.
A status flag may be a good starting point.
@jaybee84 How about this for after clicking on the bar:
@andrewelamb Sorry I missed this earlier. This looks good, but a couple of suggestions:
I changed to box so that the color fills the whole thing. I changed the color to red, the link color didn't look great against the green background.
I changed the the box title.
The tool tips now have just "number of files". I couldn't get rid of the duplicate "types of files", perhaps a plotly bug? Since they are clicking on the box they wouldn't need to know that anyway. I also removed the file ids from the tooltip. That could get to a huge stirng very quickly with actual file counts and actual synapse ids.
The updates look great! One request would be to try a different shade or color for the box. I have found coolors palette to have nice shades. May be pick one of those?
@jaybee84 The allowed colors are show at the bottom here. Do you have a preference?
Lets try light-blue
or aqua
and check which one looks good :)
I'll try it, but I'm not sure the link (which is blue) will stand out.
The top one is aqua, and the bottom is teal. Light blue was the exact color of the link, so it was invisible.
aqua
looks good to me. Actually, I would recommend using an action link
button instead of this one. That way the whole button is sensitive to click and folks dont have to aim for the link specifically. We did this for the "Back to NF Data Portal" button on the "About " page.
Please briefly describe your problem and what output you expect. This is a feature requested by one of our funders who is a heavy user of projectLive. They use the milestone tracker in the "Participating Studies" module to see how many files were expected for a certain progress report and how many files were uploaded. They visualize this in a bar plot which has a hover which tells them the count of files.
Expected Output: They would like to click on the bar and find the files on Synapse that are being counted in this bar.
One possible solution: A list of synIDs is generated from the bar. A synapse query with those synIDs is generated and provided as a link on the projectLive app (near the bar plots). When the user clicks the link it takes them to the "Project Files and Metadata Fileview" scoped using the generated query.