File Views

Overview

A file view is a view of all Files within one or more Projects or Folders. File views can:

  • Provide a way of isolating or linking data based on similarities
  • Provide the ability to link Files together by their annotations
  • Allow view/editing File attributes in bulk
  • Allow Files to be easily searched and queried


Create a File View

To create a file view, navigate to your Project in the web client. Here, we’ll use The Wondrous Research Example. Navigate to the Table tab and click on the Add File View button.

In the resulting pop-up, give your view a name and then select Add container under Scope to select the Projects and Folders you’d like to use.

You can search for Projects/Folders of interest by browsing by your favorite and current projects, by searching for a project by name, or by entering in a Synapse Id. Click on the Project name to add it to your scope. You can select specific folders in a project by clicking on the caret.

Clicking on a Project or Folder will select it for the view.

The Scope section will now show each Project or Folder that you’ve selected. You can continue to add as many more containers as you’d like by using the Add container button. In this example, we’ve selected a total of 3 containers: 2 Projects (One Project to Rule Them All and the Wondrous Research Example), and a Folder (BAM) within the PCBC C4 Raw Data mRNA folder. Click Next to continue on and define the schema you’d like to use for your file view.

By default, all the file metadata will be populated. At the bottom, you can click the Add All Annotations button to populate every annotation across the scope as columns. If you’d like to enable faceted search on these columns, select Values or Range from the dropdowns under the Facet option. You can remove and reorder the columns as you’d like. If you remove any default columns that you’d like to restore, you can click the Add Default View Columns. Click Next to create the file view.

Query a File View

A file view can be queried exactly the same as any other Table in Synapse. Please see Tables for more examples.

The file 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 files in that view. In the example below, we’re selecting for all files that have a Cell Type of PSC.

Insert a View into a Wiki

File views can also be placed inside a Wiki once they have been created. You can embed the entire file view or a subset of a query on it.

To insert a file view with a synId of syn8146547:

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 file view.

See Also

Annotations and Queries, Tables, Wikis

Need More Help!

Try posting a question to our Forum.

Let us know what was unclear or what has not been covered. Reader feedback is key to making the documentation better, so please let us know or open an issue in our Github repository (Sage-Bionetworks/synapseDocs).

2016 Sage Bionetworks Contact us Creative Commons License