A view is a type of Synapse Table that queries across metadata (Annotations) for particular items (currently: projects or files) with a particular “scope”. A
File View lists all
Tables within one or more
Project View lists all
Projects you’ve added to the view. Views can:
Tablesto be easily searched and queried
Tablestogether by their annotations
To create a
File View, select the
Project in which you would like to create the view. The
Project you choose does not have to contain the files you are including in your view. You will select the files of interest by defining the scope, which is the
Folders that contain your files. “File Views” can also contain
Folders; you can choose which kinds of items you would like to include during this process.
To create a
Project View, select the
Project in which you would like to create the view. You will select the projects of interest by defining the scope as above. The only notable difference between creating a
Project View and a
File View is that for project views, there is a 1:1 relationship between the projects you select in your scope and the projects that are shown in the view.
Views can be edited to change the scope of the view (e.g. the Project or Folder the view is showing) or which types of content is shown. Both of these options are found by navigating to “Show Scope of View” in the Tools menu; from there you may View and Edit the scope and the content-type of the view.
Note that it may take a few moments for the updated View to rebuild as it queries across the system.
For example, to query for everything in
For example, if you would like to use the Python client to update the annotation
woof in every file in a
File View with the synId syn456, you can do:
Views are in
Simple Search mode by default. You can filter out
Files of interest by selecting what characteristics you like using the facet menu on the left. You can toggle between simple and advanced search using the
Show advanced search/Show simple search link.
In advanced search, you can use a SQL-like query to search for items in that view. In the example below, we’re selecting for all files that have a
Cell Type of
Views can also be placed inside a
Wiki once they have been created. You can embed the entire view or a subset of a query on it.
To insert a file view with a synId of
In the Edit Project Wiki window, select Table: Query on a Synapse Table/View under the Insert dropdown. To embed the entire file view into the wiki enter
SELECT * FROM syn8146547 in the resulting pop-up.
To embed a subset of the file view, like the advanced search query in the previous example, enter
SELECT * FROM syn8146547 WHERE Cell_Type = 'PSC'.
Save the query and the edits to the
Wiki to embed the view.